From 91709d1404d684bd53abf79ef5789fc14039a901 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 20 Nov 2026 09:06:41 +0000 Subject: [PATCH] ci(trivy): authenticate to GHCR so the weekly image scan can pull The weekly Trivy scan targets the private CamCore image ghcr.io/team-camcore/seerr:latest but never authenticated, so every run failed with 'UNAUTHORIZED: authentication required'. Grant the job packages: read and pass the workflow's own GITHUB_TOKEN to Trivy. The image is published by this repository, so no new secret is needed. Refs: OPS-1507 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01RnghqAkpHr5qF3HeAS1oti --- .github/workflows/trivy-scan.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/trivy-scan.yml b/.github/workflows/trivy-scan.yml index e7c61b3ff6..eab7fd374f 100644 --- a/.github/workflows/trivy-scan.yml +++ b/.github/workflows/trivy-scan.yml @@ -27,6 +27,7 @@ jobs: permissions: contents: read + packages: read security-events: write env: @@ -49,6 +50,12 @@ jobs: - name: Run Trivy image scan uses: aquasecurity/trivy-action@v0.36.0 + env: + # ghcr.io/team-camcore/seerr is private. It is published by this + # repository's CamCore Seerr Image workflow, so the job's own token + # can pull it with packages: read (OPS-1507). + TRIVY_USERNAME: ${{ github.repository_owner }} + TRIVY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} with: image-ref: ghcr.io/team-camcore/seerr:latest format: sarif