Skip to content

Commit 19be62f

Browse files
author
BRUVRY-LAGADEC
committed
fix: 👷 Github actions shared
add security-events: write permission
1 parent a98b880 commit 19be62f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/component-container-image-security.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ jobs:
1717
security-dependency-trivy:
1818
name: Trivy dependency scan
1919
permissions:
20-
contents: read # for actions/checkout to fetch code
21-
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
22-
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
20+
# Required for uploading sarif file
21+
security-events: write
2322
runs-on: ubuntu-latest
2423
steps:
2524
- name: Checkout code
@@ -47,12 +46,13 @@ jobs:
4746
TRIVY_JAVA_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-java-db,aquasec/trivy-java-db,ghcr.io/aquasecurity/trivy-java-db
4847
with:
4948
image-ref: "${{ steps.format.outputs.image-path }}:${{ steps.format.outputs.image-tag }}"
50-
format: 'sarif'
49+
format: 'template'
50+
template: '@/contrib/sarif.tpl'
5151
output: 'trivy-results.sarif'
52-
exit-code: "1"
53-
ignore-unfixed: true
5452
vuln-type: "os,library"
5553
severity: "CRITICAL,HIGH"
54+
exit-code: "1"
55+
ignore-unfixed: true
5656
- name: Upload Trivy scan results to GitHub Security tab
5757
uses: github/codeql-action/upload-sarif@v3
5858
if: always()

0 commit comments

Comments
 (0)