Skip to content

Commit 1eef816

Browse files
authored
Add dependency scanning to CI pipeline (#610)
This enables dependency scanning via trivy. Signed-off-by: Juan Antonio Osorio <[email protected]>
1 parent e9a04cc commit 1eef816

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/security.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Security
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
schedule:
9+
- cron: '0 0 * * *'
10+
11+
jobs:
12+
dependencies:
13+
runs-on: ubuntu-latest
14+
name: Dependencies & Secrets Scan
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18+
19+
- name: Code Security Scan
20+
uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # v0.29.0
21+
with:
22+
scan-type: 'fs'
23+
scanners: vuln,secret
24+
trivy-config: .trivy.yml
25+
exit-code: 1
26+
ignore-unfixed: true
27+
env:
28+
TRIVY_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db
29+
TRIVY_USERNAME: ${{ github.actor }}
30+
TRIVY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)