Skip to content

ci: share the scan-image action #14

Closed

Description

@uniqueg

Summary

Move the scan-image composite action, which scans an image with Trivy and uploads the fixable findings as SARIF to code scanning, into .github as actions/scan-image. Callers pin it by SHA.

Why

foca, cloud-registry and proTES each have a copy in .github/actions/scan-image, marked "identical copies: change them together". They have already drifted: foca pins github/codeql-action/upload-sarif at v4.39.1, while cloud-registry and proTES pin v4.39.0, because Dependabot bumps each copy separately. With one shared copy, the drift ends.

Tasks

  • Add actions/scan-image in .github, based on foca's copy (the newest). It keeps the inputs (image reference, category, the Trivy version, the full-report option).
  • Add the action's directory to .github's dependabot.yml, so Dependabot updates the Trivy and CodeQL action pins inside it. The Trivy binary version (version: v0.75.0) is an input and Dependabot doesn't bump it, so note that in the action's docs.
  • Tests in the .github CI: scan a tiny image and check that the outputs and the failure on fixable CRITICAL/HIGH findings work.
  • Rollout, after a release of .github and tracked in each repo: foca, cloud-registry and proTES (later trs-filer) change their ci.yml, release.yml and scan.yml to uses: elixir-cloud-aai/.github/actions/scan-image@<sha> # vX.Y.Z, delete their local copy and remove the /.github/actions/scan-image entry from directories in their dependabot.yml.

What stays per repo

.trivyignore.yaml (the action runs in the caller's workspace, so it still applies), the image reference and category, the job's permissions: security-events: write, and keeping scans in jobs without registry credentials.

Check names don't change, so no ruleset changes are needed.

Part of the parent issue on sharing workflow steps as composite actions.

Activity

  1. added
    priority: medium
    status: blocked
    type: ci / cd
    workload: hours
    on Oct 27, 2026
  2. added
    status: triage
    and removed
    status: blocked
    on Oct 28, 2026
  3. added
    status: in progress
    and removed
    status: triage
    on Oct 28, 2026
  4. removed
    status: in progress
    on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: mediumtype: ci / cdworkload: hours

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions