Repository navigation
ci: use the shared scan-image action - #343
Conversation
Scan images with the shared `scan-image` action of elixir-cloud-aai/.github v1.0.0 (pinned to its commit) in the CI, release and scan workflows, and delete the local copy, which it replaces unchanged except for newer pins and a `trivy-version` input with the same default. Dependabot no longer watches the local action, and the workflow tests now refuse local actions. The Trivy version is bumped in the shared action. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Link the shared action in the development docs, as Cloud Registry does, and reflow the workflow comments. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideThe PR migrates CI, release, and weekly image scanning from the deleted local composite action to the shared Sequence diagram for release image scanningsequenceDiagram
participant Release as Release workflow
participant Image as Pushed image digest
participant Scan as Shared scan-image action
participant Trivy as Trivy
participant Gate as Release gate
Release->>Image: push image
Release->>Scan: scan image@digest
Scan->>Trivy: scan image
Trivy-->>Scan: findings and report
Scan-->>Gate: pass or fail
Gate-->>Release: continue release only if scan passes
Flow diagram for pinned shared-action validationflowchart LR
Workflows[Workflow files] --> Test[test_workflows.py]
Test --> Local{Local action reference ./?}
Local -- Yes --> Fail[Validation fails]
Local -- No --> Pin{Shared action pinned to release commit?}
Pin -- Yes --> Pass[Validation passes]
Pin -- No --> Fail
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #343 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 27 27
Lines 2195 2195
=========================================
Hits 2195 2195 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Linked issues
#329 ci: use the shared scan-image action · 4 of 4 met
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | Use the release-pinned shared scan-image action in ci.yml, release.yml, and scan.yml. | ✅ Met | All three workflows use the shared action pinned to the v1.0.0 commit. |
| 2 | Delete .github/actions/scan-image. | ✅ Met | The local action directory is deleted. |
| 3 | Remove /.github/actions/scan-image from Dependabot directories. | ✅ Met | The GitHub Actions Dependabot entry now watches only the repository root. |
| 4 | Keep .trivyignore.yaml, image references and categories, job permissions, and check names unchanged. | ✅ Met | The diff updates only the ignore-file comment and action references; the scan inputs, permissions, and check names remain unchanged. |
Sourcery assessment
Needs a human reviewer. The security scan did not finish, and CI and release jobs now run the pinned shared action instead of the local scanner; if it fails to report fixable critical or high vulnerabilities, an image could pass the release gate and be signed and tagged. Reverting restores the local action, but it cannot undo exposure from an image already published.
Summary
The CI, release and weekly scan workflows now scan images with the shared
scan-imageaction of elixir-cloud-aai/.github v1.0.0, pinned to its commit. The repository's own copy in.github/actions/scan-imageis deleted. Cloud Registry uses the same action.trivy-versioninput whose default is v0.75.0, the version the copy hard-coded, and it pins a newer patch release ofcodeql-action/upload-sarif(v4.39.1). The Trivy version is now bumped in the shared action..trivyignore.yamlis still resolved from the checked-out commit. The image references, categories,upload/reportvalues, jobpermissionsand check names are unchanged, so the ruleset needs no update.dependabot.ymlno longer lists the deleted directory. The workflow pins of the shared actions are covered bydirectory: /.tests/test_workflows.pynow refuses local actions (./), which was the TODO left in ci: use the shared CI gate action #342.docs/development.md, the workflow comments and the.trivyignore.yamlcomment now refer to the shared action, and the docs explain how the Trivy version is bumped, as in Cloud Registry.Closes #329
Verification
pytest tests/test_workflows.py: 9 passed. The new assertion failed before the workflows were switched over.actionlint1.7.12: passed.pre-commit run --all-files: passed. Locally, the actionlint hook ran as the standalone binary instead, and mypy ran on its own, also passing.mkdocs build --strict: passed.release.ymlchanges..trivyignore.yamlresolves from the workspace in all three workflows, including the release checkout at the release commit, and found permissions, secrets and check names unchanged.Declined review findings
Open questions
None.
🤖 Generated with Claude Code