Skip to content

release scan: scan a published or deployed release again and record it #5466

Closed

Description

@lex00

A published release, and every release an environment runs, can be scanned again against today's vulnerability database, and the result is recorded beside the scan made at publish.

Epic: #5452. Found in #5447 (RA-5, SI-2, CA-7): FedRAMP Moderate asks for monthly scanning and remediation of high findings within 30 days, and a scan made once before the stage can't show either.

What exists, checked at chant cee8937 (the ci-hardening branch)

  • lifecycle/publish-scan.ts scans what a publish would put out, before the stage, and nowhere else. It appends a scanned or scan-failed line to _releases/publishes.jsonl and pushes a scan.json referrer on each image.
  • The SBOMs it scanned stay where the publish put them: OCI referrers of the image, files beside a forge release, files inside npm packages. The publish record names their digests.
  • <env>/releases.jsonl says which release each environment runs.
  • No command scans a release after it shipped, and chant release has no subcommand for it.

What it should be

  • chant release scan <label|digest> fetches the SBOMs the publish recorded, by digest, scans them with the same scanner and vulnPolicy the publish uses (grype, trivy or Wiz from ci hooks: Sonar, Mend and Wiz presets, with findings in the plan note and scan gate #5451), and appends a rescanned line with the scanner, the database's version and build time, and every finding with what the policy made of it. It exits non-zero when the policy blocks a finding.
  • --deployed [<env>] scans every release the latest deploy record of each environment names.
  • The record is append-only like the rest of publishes.jsonl, and a reader can list a release's scans in order. chant release list --json or release status shows the newest one.
  • chant release workflow can render a scheduled job that runs --deployed. The profile in security profiles: fedramp-moderate and cccs-medium, with checks of their own #5464 can ask for it.
  • Nothing is pushed to a registry. A new scan.json referrer is out of scope; the record is the evidence.

Done when

  • With the fake scanner fixtures, a release published clean reports a finding once the fake database gains one, and the line is recorded.
  • --deployed scans only what environments run.
  • A golden file shows the scheduled job on GitHub, GitLab and Forgejo.
  • The supply-chain guide describes the command and the record.

Activity

  1. added
    epic:ci-hardening
    on Nov 22, 2026
  2. lex00 commented on Nov 22, 2026

    @lex00
    ContributorAuthor

    Built with these limits. chant release scan fetches the SBOM an image's publish attached, from its registry by the referrer's digest. The SBOMs beside a forge release and inside npm packages are not fetched: each is listed under skipped in the rescanned line and on stderr, and a rescan that scanned nothing exits 1 (release-scan-nothing) instead of passing. Wiz scans an image archive, which a rescan does not have, so the SBOM goes to grype or trivy. The newest scan is shown as scan on each release in chant release list --json. The scheduled job is release.scan.schedule (a cron expression); chant release workflow then writes chant-release-scan.yml beside the publish workflow on GitHub and Forgejo, and .gitlab/chant-release-scan.yml for a GitLab pipeline schedule.

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

    epic:ci-hardening

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions