Skip to content

Commit

Permalink
fix: workflow permission to upload trivy sarif report (#7234)
Browse files Browse the repository at this point in the history
Trivy scan result upload to GitHub fails due to permission issue. Added permission security-events=write to the workflow file as a fix. Since workflow permission explicitly defined, it requires contents=read explicity set as well

Signed-off-by: Chaminda Divitotawela <cdivitotawela@gmail.com>
  • Loading branch information
cdivitotawela committed Jun 18, 2024
1 parent db9710b commit aef9389
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/container-security-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
jobs:
scan-sarif:
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write

steps:
- name: Checkout
Expand Down

0 comments on commit aef9389

Please sign in to comment.