File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313 type : string
1414 required : false
1515 default : " "
16+ outputs :
17+ version :
18+ description : The published image tag
19+ value : ${{ jobs.build.outputs.version }}
20+ image_repo :
21+ description : The image repository the build was published to (without tag)
22+ value : ${{ jobs.build.outputs.image_repo }}
1623 push :
1724 tags :
1825 - " re2-test-*"
3845 matrix :
3946 package : [supervisor]
4047 runs-on : warp-ubuntu-latest-x64-2x
48+ # Single-entry matrix, so these job outputs are unambiguous (consumed by the
49+ # scan-supervisor job in publish.yml).
50+ outputs :
51+ version : ${{ steps.get_tag.outputs.tag }}
52+ image_repo : ${{ steps.set_tags.outputs.image_repo }}
4153 env :
4254 DOCKER_BUILDKIT : " 1"
4355 steps :
8193 fi
8294
8395 echo "image_tags=${image_tags}" >> "$GITHUB_OUTPUT"
96+ echo "image_repo=${ref_without_tag}" >> "$GITHUB_OUTPUT"
8497 env :
8598 IMAGE_REGISTRY : ${{ inputs.image_registry || vars.IMAGE_REGISTRY || format('ghcr.io/{0}', github.repository_owner) }}
8699 STEPS_GET_REPOSITORY_OUTPUTS_REPO : ${{ steps.get_repository.outputs.repo }}
Original file line number Diff line number Diff line change @@ -97,10 +97,19 @@ jobs:
9797 permissions :
9898 contents : read
9999 packages : read # pull the just-published image from GHCR
100- uses : ./.github/workflows/trivy-image-webapp .yml
100+ uses : ./.github/workflows/trivy-image.yml
101101 with :
102102 image-ref : ${{ needs.publish-webapp.outputs.image_repo }}:${{ needs.publish-webapp.outputs.version }}
103103
104+ scan-supervisor :
105+ needs : [publish-worker-v4]
106+ permissions :
107+ contents : read
108+ packages : read # pull the just-published image from GHCR
109+ uses : ./.github/workflows/trivy-image.yml
110+ with :
111+ image-ref : ${{ needs.publish-worker-v4.outputs.image_repo }}:${{ needs.publish-worker-v4.outputs.version }}
112+
104113 # Announce the freshly published mutable `main` webapp image to subscriber
105114 # repos via repository_dispatch, handing them a digest-pinned ref to build or
106115 # deploy from. The repo, ref prefix, and dispatch target all default to the
Original file line number Diff line number Diff line change 1- name : Trivy Image Scan (webapp)
1+ name : Trivy Image Scan
22
3- # OS-level CVE scan of a published webapp image. Called by the publish pipeline
4- # (publish.yml) to scan each build right after it's pushed to GHCR — so every
3+ # OS-level CVE scan of a published image. Called by the publish pipeline
4+ # (publish.yml) to scan each image right after it's pushed to GHCR — so every
55# main build and every release is scanned, not rebuilt. Also runnable ad-hoc
66# via workflow_dispatch against any image ref.
77#
2727permissions : {}
2828
2929concurrency :
30- group : trivy-image-webapp- ${{ inputs.image-ref }}
30+ group : trivy-image-${{ inputs.image-ref }}
3131 cancel-in-progress : true
3232
3333jobs :
@@ -59,17 +59,17 @@ jobs:
5959 ignore-unfixed : true
6060 severity : HIGH,CRITICAL
6161 format : table
62- output : trivy-image-webapp .txt
62+ output : trivy-image.txt
6363
6464 - name : Job summary
6565 if : always()
6666 env :
6767 IMAGE_REF : ${{ inputs.image-ref }}
6868 run : |
6969 {
70- echo "## Trivy Image Scan (webapp) — \`${IMAGE_REF}\`"
70+ echo "## Trivy Image Scan — \`${IMAGE_REF}\`"
7171 echo '```'
7272 # GitHub step summary is capped at 1 MiB; truncate large reports.
73- head -c 900000 trivy-image-webapp .txt 2>/dev/null || echo "(no report produced)"
73+ head -c 900000 trivy-image.txt 2>/dev/null || echo "(no report produced)"
7474 echo '```'
7575 } >> "$GITHUB_STEP_SUMMARY"
You can’t perform that action at this time.
0 commit comments