chore(ci): file prod container scans under main - #1434
Conversation
Prod deploys from a version tag, so its Trivy container scans were filed under refs/tags/v*, and code scanning only shows the default branch. The alerts on main were left describing the last one-off main deploy rather than what is running in prod. Prod now files the container-scan-api and container-scan-lambda uploads under refs/heads/main; staging keeps its own ref.
|
Change classification: normal — platform or application code changed. A normal change carries a documented automated review on this pull request before merge, in place of a second human approver. The |
|
@claude please review this PR |
|
Claude finished @jfrench9's task in 1m 51s —— View job Claude finished @jfrench9's taskReviewThe mechanics of the change are sound: One correctness question worth resolving before you rely on this, tied to the "for review" note in the PR body about The PR's premise is that a tag-triggered prod deploy's commit "is on Concretely: after any hotfix ships, the deployed This doesn't need to block the PR — the testing section already flags this as unverified pending a real tag deploy — but it's worth explicitly checking against a post-hotfix release too, not just a normal one, since that's the scenario where the No other issues found — the diff is minimal, workflow-only, and matches its stated scope (staging/dependency-scan untouched, both container scans updated symmetrically). |
Summary
Prod deploys from a version tag, so the Trivy container scans in
build.ymlwere filed underrefs/tags/v*. Code scanning only shows the default branch, so the container alerts onmainnever got updated by a normal release. They only updated on a one-off deploy frommain.That's why the
soupsievealerts are still open after v1.12.8 shipped the fix. v1.12.8's scan dropped both findings, but it was filed underrefs/tags/v1.12.8, and the latest scan onmainis still from the v1.12.7 one-off. This PR files prod's container scans undermain, so those alerts describe what is deployed.Changes
.github/workflows/build.ymlsarif_ref(default empty).container-scan-api,container-scan-lambda) now passref: ${{ inputs.sarif_ref || github.ref }}andsha: ${{ github.sha }}. Whensarif_refis empty, this behaves as before..github/workflows/prod.yml: passessarif_ref: refs/heads/main.main.test-ci.ymlalready runsdependency-scanonmain.For review:
upload-sarifdescribesshaas the latest commit on the ref. On a tag deploy it will be the release commit, which is onmainbut not the latest commit there.Breaking Changes
None. CI only; the API and SDKs are unaffected.
Testing
actionlintonbuild.yml,prod.ymlandstaging.yml: clean.just test-all: not run. The change is workflow-only.container-scan-apiandcontainer-scan-lambdascans are filed underrefs/heads/main(gh api repos/RoboFinSystems/robosystems/code-scanning/analyses);soupsievealerts close.Certification
🤖 Generated with Claude Code