Skip to content

ci: use the shared scan-image action - #343

Merged
uniqueg merged 2 commits into
devfrom
ci/shared-scan-action
Oct 30, 2026
Merged

uniqueg merged 2 commits into
devfrom
ci/shared-scan-action

Conversation

@uniqueg

@uniqueg uniqueg commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Summary

The CI, release and weekly scan workflows now scan images with the shared scan-image action of elixir-cloud-aai/.github v1.0.0, pinned to its commit. The repository's own copy in .github/actions/scan-image is deleted. Cloud Registry uses the same action.

  • What the shared action changes: it matches the deleted copy except for two things. It has a trivy-version input whose default is v0.75.0, the version the copy hard-coded, and it pins a newer patch release of codeql-action/upload-sarif (v4.39.1). The Trivy version is now bumped in the shared action.
  • What stays: .trivyignore.yaml is still resolved from the checked-out commit. The image references, categories, upload/report values, job permissions and check names are unchanged, so the ruleset needs no update.
  • Dependabot: dependabot.yml no longer lists the deleted directory. The workflow pins of the shared actions are covered by directory: /.
  • Tests: tests/test_workflows.py now refuses local actions (./), which was the TODO left in ci: use the shared CI gate action #342.
  • Docs: docs/development.md, the workflow comments and the .trivyignore.yaml comment 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.
  • actionlint 1.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.
  • CI on this PR: all checks passed, including Scan image run with the shared action (CI passed, Chart, Test, Lint, Docs, Smoke test, CodeQL, Codecov, Read the Docs). Sourcery: no findings.
  • Reviews: adversarial and quality reviewer subagents, full lane because release.yml changes.
    • Adversarial reviewer: no findings. It compared the shared action at the pin with the deleted copy (inputs, defaults, steps, file and artifact names), checked that .trivyignore.yaml resolves from the workspace in all three workflows, including the release checkout at the release commit, and found permissions, secrets and check names unchanged.
    • Quality reviewer, fixed: the shared action is now linked in the docs, as in Cloud Registry; the Dependabot comment and the workflow comments were reworded and reflowed.

Declined review findings

  • Moving the local-action assertion into its own test: it stays in the pin test, as in Cloud Registry, so the two repositories' tests stay alike.

Open questions

None.

🤖 Generated with Claude Code

uniqueg and others added 2 commits October 30, 2026 19:45
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]>
@sourcery-ai

sourcery-ai Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

The PR migrates CI, release, and weekly image scanning from the deleted local composite action to the shared elixir-cloud-aai/.github action pinned to v1.0.0, updates Dependabot and documentation for centralized versioning, and extends workflow tests to reject local actions.

Sequence diagram for release image scanning

sequenceDiagram
    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
Loading

Flow diagram for pinned shared-action validation

flowchart 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
Loading

File-Level Changes

Change Details Files
Replace the repository-local image scanner with the shared, commit-pinned action across all image-scanning workflows.
  • Switch CI, release, and scheduled scan jobs to elixir-cloud-aai/.github/actions/scan-image@... # v1.0.0.
  • Delete the local composite action while preserving scan inputs, image references, reports, permissions, and ignore-file behavior.
.github/actions/scan-image/action.yml
.github/workflows/ci.yml
.github/workflows/release.yml
.github/workflows/scan.yml
Align dependency automation and documentation with shared-action ownership and versioning.
  • Remove the deleted local action directory from Dependabot and document updates to shared action pins.
  • Document the shared scanner, release pinning, and centralized Trivy version bump process.
.github/dependabot.yml
docs/development.md
.trivyignore.yaml
Strengthen workflow validation to prohibit local action references.
  • Assert that workflow steps do not use ./ actions while continuing to enforce commit-pinned shared actions and matching release comments.
tests/test_workflows.py

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 proTES | 🛠️ Build #35531463 | 📁 Comparing 6807c6e against latest (eed105d)

  🔍 Preview build  

1 file changed
± development/index.html

@codecov

codecov Bot commented Oct 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (eed105d) to head (6807c6e).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@uniqueg
uniqueg marked this pull request as ready for review October 30, 2026 18:53

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@uniqueg
uniqueg merged commit 61b963a into dev Oct 30, 2026
19 checks passed
@uniqueg
uniqueg deleted the ci/shared-scan-action branch October 30, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: use the shared scan-image action

1 participant