Skip to content

Commit

Permalink
trivy permission change
Browse files Browse the repository at this point in the history
Signed-off-by: David <62899351+davidclaveau@users.noreply.github.com>
  • Loading branch information
davidclaveau committed Jul 25, 2024
1 parent 41efc4a commit c16db08
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,26 @@ on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review, converted_to_draft]
schedule:
- cron: "0 11 * * 0" # 3 AM PST = 12 PM UDT, runs sundays
workflow_dispatch:
- cron: "29 22 * * 4"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read

jobs:
# https://github.com/marketplace/actions/aqua-security-trivy
trivy:
permissions:
contents: read
security-events: write
name: Trivy Security Scan
if: ${{ ! github.event.pull_request.draft }}
runs-on: ubuntu-22.04
timeout-minutes: 1
steps:
- uses: actions/checkout@v4
- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@0.24.0
- name: Checkout code
uses: actions/checkout@v3

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.22.0
with:
format: "sarif"
output: "trivy-results.sarif"
Expand All @@ -33,6 +35,6 @@ jobs:
severity: "CRITICAL,HIGH"

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: "trivy-results.sarif"

0 comments on commit c16db08

Please sign in to comment.