Skip to content

Commit

Permalink
chore: make both trivy scan use ignore list and pin
Browse files Browse the repository at this point in the history
Use trivy ignore list for both scanners
Pin trivy action to a tag
  • Loading branch information
06kellyjac committed Jan 2, 2024
1 parent 80d4c48 commit fdfc065
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,14 @@ jobs:
push: false

- name: Run Trivy vulnerability scanner on the dev image
uses: aquasecurity/trivy-action@master
uses: aquasecurity/trivy-action@0.16.0
with:
image-ref: 'controlplane/simulator:dev'
format: 'table'
exit-code: '1'
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
trivyignores: './.trivy-config/.trivyignore'

- name: Build and tag simulator image
uses: docker/build-push-action@v5
Expand All @@ -86,7 +87,7 @@ jobs:
push: false

- name: Run Trivy vulnerability scanner on simulator image
uses: aquasecurity/trivy-action@master
uses: aquasecurity/trivy-action@0.16.0
with:
image-ref: controlplane/simulator:${{ github.sha }}
format: 'table'
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,14 @@ jobs:
push: false

- name: Run Trivy vulnerability scanner on the dev image
uses: aquasecurity/trivy-action@master
uses: aquasecurity/trivy-action@0.16.0
with:
image-ref: 'controlplane/simulator:dev'
format: 'table'
exit-code: '1'
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
trivyignores: './.trivy-config/.trivyignore'

- name: Build and tag simulator image
uses: docker/build-push-action@v5
Expand All @@ -67,7 +68,7 @@ jobs:
push: false

- name: Run Trivy vulnerability scanner on simulator image
uses: aquasecurity/trivy-action@master
uses: aquasecurity/trivy-action@0.16.0
with:
image-ref: controlplane/simulator:${{ github.ref_name }}
format: 'table'
Expand Down

0 comments on commit fdfc065

Please sign in to comment.