fix: workflow permission to upload trivy sarif report (#7234)

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>
pull/7239/head
Chaminda Divitotawela 5 months ago committed by GitHub
parent db9710b2aa
commit aef938964d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      .github/workflows/container-security-scan.yml

@ -14,6 +14,9 @@ on:
jobs: jobs:
scan-sarif: scan-sarif:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps: steps:
- name: Checkout - name: Checkout

Loading…
Cancel
Save