ci(codeql): build the Go leg explicitly instead of autobuild (REL-12) - #333
Closed
phsb5321 wants to merge 1 commit into
Closed
ci(codeql): build the Go leg explicitly instead of autobuild (REL-12)#333phsb5321 wants to merge 1 commit into
phsb5321 wants to merge 1 commit into
Conversation
codeql.yml:30 set build-mode: autobuild for the Go matrix leg. CodeQL autobuild guesses how the project builds; when the guess is wrong it silently analyses a partial call graph and the security gate goes green with missed alerts — the worst failure mode for a gate whose whole point is that a green check means coverage. Switch the Go leg to build-mode: manual with an explicit CGO_ENABLED=0 go build ./... step between init and analyze, so the analysed artifact is the same one the release builds (CGO-free is the repo-wide invariant). The step is guarded with if: matrix.language == 'go' so the actions leg (build-mode: none, workflow-YAML analysis, no build) stays untouched. No action versions bumped, no permissions changed, no new jobs, no paths-ignore / query-suite narrowing — the analysis surface is unchanged, only the build is now explicit. Verified: actionlint 1.7.12 clean; zizmor 1.24.1 --persona=auditor clean (self-hosted-runner exception does not apply — this job runs on ubuntu-latest). Signed-off-by: Pedro H S Balbino <30302237+phsb5321@users.noreply.github.com>
Contributor
Author
|
Closing as a duplicate of #334 — not a quality judgement, a collision: two seats picked up REL-12 in parallel (my dispatch went to w8:p2, and the audit-sweep slice reached the same finding independently). Both carry a byte-equivalent Keeping #334, per the ownership rule (take over one, close the duplicate — never park both). Nothing from this PR is lost. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Slice brief
wa-eng (w8:p2) — REL-12(/tmp/sp-dispatch/wa-brief-rel12.md). Huly6a75e2505b05a27b0b06a819.The finding (cited
file:line).github/workflows/codeql.yml:30— the Go matrix leg setbuild-mode: autobuild. CodeQL autobuild guesses how the project builds; when the guess is wrong it silently analyses a partial call graph, and the security gate returns a green check with missed alerts — the worst failure mode for a gate whose entire point is that green means coverage.issues.mdREL-12 (LOW).The fix
Go leg (
codeql.yml:30):build-mode: autobuild→build-mode: manual.New build step between
initandanalyze, guarded to the Go leg only:CGO_ENABLED=0keeps the repo-wide CGO-free invariant — the analysed artifact is the same one the release builds. Theif:guard means theactionsleg (:32,build-mode: none, workflow-YAML analysis with no build) does not run it.actionsleg: unchanged (build-mode: noneremains correct).Every SHA pin +
# vX.Y.Zcomment byte-identical; no action versions bumped, nopermissions:change, no new jobs, nopaths-ignore/query-suite narrowing.Verification
actionlint1.7.12 — clean.zizmor1.24.1--persona=auditor— clean (this job runs onubuntu-latest, so the self-hosted-runner exception is not involved).CodeQL (go)(must show the Build step in the run log, not skipped),CodeQL (actions)(must stay green onnone),workflow static analysis.Acceptance-gate checklist (brief's falsifier)
CodeQL (go)green withbuild-mode: manualand thego build ./...step visible in the run log (pending)CodeQL (actions)green, stillbuild-mode: none(pending).github/workflows/codeql.ymlonlyworkflow static analysis— actionlint + zizmor verified clean locallyfile:lineand states the merge class (below)Merge class
[pending] Pedro: merge #333 — this PR touches
.github/workflows/→ Actions class, gated per AGENTS.md R33. Not self-merging; same handling as #325/#326.Revert path:
git revert <merge-sha>— one-file additive change.Note on a sibling worktree
wa-333-audit-sweep(a sibling session's worktree) contained an uncommitted, unpushed draft of the same REL-12 change (verified: same shape — manual + guardedgo build+CGO_ENABLED: 0). To avoid two competing PRs for one fix, this PR is the single landed change; the sibling's draft was left untouched in its own worktree. If that sibling is still mid-task, the duplicate is this one — please close/coordinate via the orch seat.