Skip to content

ci: use the shared scan-image and gate actions - #553

Merged
uniqueg merged 1 commit into
devfrom
ci/shared-actions
Oct 28, 2026
Merged

uniqueg merged 1 commit into
devfrom
ci/shared-actions

Conversation

@uniqueg

@uniqueg uniqueg commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Delete the local .github/actions/scan-image; ci.yml, release.yml and scan.yml use the shared elixir-cloud-aai/.github/actions/scan-image (identical steps; Trivy version now its trivy-version input, default v0.75.0 as before).
  • The gate passed ("CI passed") uses the shared elixir-cloud-aai/.github/actions/gate, with allow-skipped: push publish only if PUBLISH is exactly "false" (fails closed, as before). Job IDs and names unchanged, so no ruleset change.
  • Both pinned to a full commit SHA on main (10e8303…, comments # scan-image / # gate); the .github repository has no releases. Dependabot: the /.github/actions/scan-image directory entry is removed; the / entry covers the pins.
  • Docs (docs/contributing.md) and comments (.trivyignore.yaml, workflows) updated.

Closes #548
Closes #549

Verification

  • pre-commit run on the changed files: passed.
  • Reviews: adversarial and quality reviewers, no high findings; the quality reviewer's medium (format of allow-skipped) checked against the action: whitespace-separated IDs. Low findings fixed: comment wrapping, stale reference in .trivyignore.yaml.

Declined review findings

  • Link to the pinned commit instead of tree/main in the docs: the pin moves with Dependabot bumps; main is the documented source.
  • Pin comments with a version: the org decided on comments naming the action (no releases).

Open questions

None.

🤖 Generated with Claude Code

Summary by Sourcery

Adopt the organisation’s shared, pinned image-scanning and CI-gate actions across the project workflows.

Enhancements:

  • Use the shared, commit-pinned image scanning action across CI, release, and scheduled scan workflows.
  • Replace the local CI result gate with the shared gate action while preserving conditional handling of intentionally skipped publishing jobs.

CI:

  • Update Dependabot coverage and workflow documentation for the shared actions and their pinned references.

Documentation:

  • Update contributing guidance and scan-related comments to reference the shared image scanning action and its Trivy version configuration.

Chores:

  • Remove the repository-local image scanning action.

Replace the local scan-image action and the inline result checks of
the gate job with the shared actions of elixir-cloud-aai/.github,
pinned to a commit on main. Keep the job IDs and names and the
allowed skips (push and publish only if PUBLISH is "false").

Closes #548
Closes #549

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sourcery-ai

sourcery-ai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

The workflows now use organization-owned, full-SHA-pinned scanning and gating actions instead of local implementations, while preserving scanning inputs, security boundaries, gate job identity, and the conditional handling of intentionally skipped publish jobs. Documentation, comments, and Dependabot configuration were updated to reflect the shared actions and their maintenance model.

File-Level Changes

Change Details Files
Replace the repository-local image scanning implementation with the organization’s shared, commit-pinned action across all scanning workflows.
  • Delete the local scan-image composite action.
  • Reference the shared action at a full commit SHA in CI, release, and scheduled scan workflows.
  • Retain existing image, category, permissions, and vulnerability-scanning behavior while documenting the shared action and its default Trivy version.
.github/actions/scan-image/action.yml
.github/workflows/ci.yml
.github/workflows/release.yml
.github/workflows/scan.yml
.trivyignore.yaml
docs/contributing.md
Replace the inline CI result-validation script with the shared, commit-pinned gate action without changing job identities or skip semantics.
  • Pass the serialized needs results to the shared gate.
  • Allow push and publish to be skipped only when PUBLISH is exactly false, preserving fail-closed behavior.
  • Pin the gate action to the same full commit SHA and retain the existing gate job name and ID.
.github/workflows/ci.yml
Update dependency-management configuration for the shared action references.
  • Remove the deleted local scan-action directory from Dependabot coverage.
  • Rely on root-level Dependabot configuration to manage the shared action pins.
.github/dependabot.yml

Assessment against linked issues

Issue Objective Addressed Explanation
#548 Update ci.yml, release.yml, and scan.yml to use the shared scan-image action while preserving the existing image references, categories, permissions, and check names. ✅
#548 Delete the repository-local .github/actions/scan-image action and remove its directory from Dependabot configuration. ✅
#549 Replace the CI passed job’s local gate script with the shared elixir-cloud-aai/.github/actions/gate action, pinned to a commit SHA, and pass needs as JSON. ✅
#549 Preserve the passed job’s identity and required-check behavior, while allowing only the intended push and publish jobs to be skipped when PUBLISH is exactly false. ✅

Possibly linked issues

  • ci: use the shared scan-image action #548: The PR replaces local scan-image usage in all three workflows, deletes the local action, and removes its Dependabot directory entry.
  • #unknown: The PR implements the issue's requested shared gate action, passing needs and conditionally allowing skipped push and publish jobs.

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

@codecov

codecov Bot commented Oct 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (7032aa5) to head (e1d6384).

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #553   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           55        55           
  Lines         6667      6667           
=========================================
  Hits          6667      6667           
Flag Coverage Δ
test_unit 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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 28, 2026 16:59

@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!

Sourcery assessment

Needs a human reviewer. The security scan did not finish, and if the pinned shared scan action misses findings or the gate action treats failed checks as acceptable, vulnerable images could pass CI or be published; reverting restores the local scanner and gate, but does not undo images already released.


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

@uniqueg
uniqueg merged commit bd7edfd into dev Oct 28, 2026
31 checks passed
@uniqueg
uniqueg deleted the ci/shared-actions branch October 28, 2026 17:00
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 CI gate action ci: use the shared scan-image action

1 participant