Skip to content

refactor(ci): use dedicated trivy image scan workflow - #247

Draft
marcusburghardt wants to merge 1 commit into
complytime:mainfrom
marcusburghardt:refactor/use-trivy-image-scan-workflow
Draft

refactor(ci): use dedicated trivy image scan workflow#247
marcusburghardt wants to merge 1 commit into
complytime:mainfrom
marcusburghardt:refactor/use-trivy-image-scan-workflow

Conversation

@marcusburghardt

Copy link
Copy Markdown
Member

Summary

Switch the scan-image-beacon-distro stage from reusable_vuln_scan.yml to the new
reusable_trivy_image_scan.yml which was extracted in org-infra to avoid forcing
elevated permissions (packages: write, id-token: write) on callers that only
need source/dependency scanning.

Changes to ci_publish_ghcr.yml:

  • scan-source: removed packages: write, id-token: write, and enable_trivy_image input (no longer needed after the trivy_image job was extracted from the reusable workflow)
  • scan-image-beacon-distro: switched to reusable_trivy_image_scan.yml, removed enable_osv/enable_trivy_source/enable_trivy_image inputs, trimmed permissions to only what the image scan job needs

Related Issues

Review Hints

  • This PR is a draft and must remain so until refactor(ci): extract trivy image scan into separate reusable workflow org-infra#290 is merged and tagged. The pinned SHA in the uses: directives must be updated to the new release SHA before merging.

  • The diff is small (3 insertions, 11 deletions). Review the permission trimming on scan-source and the workflow switch on scan-image-beacon-distro together.

  • The pipeline flow is unchanged: scan-source -> build-beacon-distro -> scan-image-beacon-distro -> sign-beacon-distro -> summary. Only the reusable workflow reference and its inputs changed in stages 1 and 3.

Switch scan-image-beacon-distro from reusable_vuln_scan.yml to the new
reusable_trivy_image_scan.yml which was extracted in org-infra to avoid
forcing elevated permissions (packages: write, id-token: write) on
callers that only need source/dependency scanning.

Changes:
- scan-source: remove packages:write, id-token:write, enable_trivy_image
  input (no longer needed after the trivy_image job was extracted)
- scan-image-beacon-distro: switch to reusable_trivy_image_scan.yml,
  remove enable_osv/enable_trivy_source/enable_trivy_image inputs,
  trim permissions to only what the image scan needs

Depends-on: complytime/org-infra#TBD

Assisted-by: OpenCode (claude-opus-4-6)
Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants