Skip to content

Make the release security scan a gate now that govulncheck is clean #196

Closed

Description

@scttfrdmn

security-scan in release.yml scans the exact binary publish is about to attach, which is the right shape — the job it replaced wget-ed the asset from a release page that had to already exist, so it could only ever scan something users could already download.

But it does not currently fail on anything. trivy-action's exit-code has no default, so findings upload as SARIF and the step passes.

That was deliberate for v0.10.1 and the reason is recorded inline in the workflow: the first real run of this scan found a genuine MODERATE advisory in the pinned aws-sdk-go-v2 (#195), and making every release from that point contingent on a scan whose output nobody had yet triaged would have blocked the release on a dependency bump it did not carry.

That reasoning has expired. #195 is fixed — govulncheck reports 0 vulnerabilities and the trivy binary scan is clean — so the gate can be turned on from a known-clean baseline, which is the only state in which a gate like this is worth having.

Work

  • exit-code: 1 on the security-scan step in release.yml
  • An explicit severity floor rather than the default UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL. HIGH,CRITICAL is the defensible line for blocking a release; MEDIUM findings should still upload and be visible without stopping a publish
  • Decide ignore-unfixed. A vulnerability with no available fix cannot be actioned by a release, and blocking on one means the project cannot ship until an upstream maintainer acts
  • Update the comment above the job, which currently explains why it is not a gate
  • Same decision for govulncheck in security.yml, which already exits non-zero and so is already a hard gate on main and every PR — note that this asymmetry is accidental rather than designed, and worth making deliberate in one direction or the other

The trade to be explicit about

A hard gate on a release means a newly published advisory in a transitive dependency can block a release that has nothing to do with it, at the least convenient moment — a scan is a moving target even when the code is frozen. A severity floor plus ignore-unfixed keeps that to the cases where there is something to actually do.

Worth pairing with a scheduled scan on main so a new advisory surfaces on its own schedule rather than being discovered by someone trying to cut a release.

Activity

  1. added
    type: security
    type: ci-cd
    priority: medium
    effort: medium
    on Aug 2, 2026
  2. scttfrdmn commented on Aug 3, 2026

    @scttfrdmn
    OwnerAuthor

    Landed in 2eee49d on v0.11.0-cli-subcommands.

    All five checkboxes, and verifying the baseline first turned up something to fix.

    exit-code: 1, severity: HIGH,CRITICAL, ignore-unfixed: true, scanners: vuln on the release binary scan. Reasoning as the issue framed it: MEDIUM and below still upload and stay visible on the security tab without stopping a publish; an advisory with no released fix cannot be actioned by a release, so blocking on one means the project cannot ship until an upstream maintainer acts; and secret/misconfig scanning on an unpacked static binary does not answer the question this job asks.

    One thing the issue did not list: the SARIF upload needed if: always(). Without it a HIGH stops the job at the scan step and uploads nothing, so the gate fails with an exit code and no way to see what caused it — the worst possible version of a gate.

    The govulncheck asymmetry is resolved toward gating, and the repo-wide trivy fs scan in security.yml is deliberately still not a gate, which is now stated in the file rather than being an absence. It scans the source tree, not what ships: dependencies reached only by tests, files in no artifact, every finding under sdks/. The gates on what is distributed are govulncheck (which exits non-zero, and so has gated main and every PR all along) and the binary scan. The fs scan picks up the same severity floor and ignore-unfixed anyway, so a finding in one place means what a finding in the other means.

    Verifying the clean baseline found a real finding. govulncheck reports 0 called vulnerabilities — but one under "packages you import": GO-2026-5841, an out-of-bounds read in klauspost/compress/s2, fixed in v1.18.7. Unreachable from this code, and present in the module the binary is built from, which is precisely what a binary scan sees by module version and what the new gate would have failed on at the next release. Bumped v1.18.0 → v1.18.7. That module is the zstd codec on the write path, so the compress → PUT → GET → decompress round-trip fuzzer was run against the new version: 12,482 executions, 84 corpus entries, pass. govulncheck is now clean in both categories.

    Not done here, and it is the pairing the issue itself suggests: the weekly main scan already exists in security.yml, so a new advisory does surface on its own schedule rather than being discovered by someone cutting a release. What that schedule cannot do is notify — a scheduled run's findings land on the security tab and nothing points at them. Worth its own issue if that turns out to matter.

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

    effort: mediumpriority: mediumtype: ci-cdtype: security

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions