Skip to content

fix(ci): scan release tags with CodeQL - #344

Open
vincentkoc wants to merge 2 commits into
mainfrom
fix/codeql-release-tag-scans-20261123
Open

vincentkoc wants to merge 2 commits into
mainfrom
fix/codeql-release-tag-scans-20261123

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Every main push currently starts CodeQL even though normal PR scans already run. Simply removing that trigger would leave the release gate waiting for its required analyze check at the frozen release commit.

User Impact

Maintainers keep PR security checks and weekly main scans, with automatic CodeQL coverage for each version-tag push. Untagged release dry runs and recovery use the documented manual scan at the exact target SHA. There is no user-visible CLI change.

Why This Change Was Made

The existing shared release gate accepts tag-push and manual checks and waits up to 15 minutes on the frozen target SHA. This changes only the CodeQL push trigger, preserves its analysis settings and required check name, and documents the cadence in .ci-policy.md. Recovery instructions distinguish a green job from a confirmed processed analysis.

Current revision — November 27

The branch is rebased onto bd265ffba6a0f7df3dd9516384440e2e72d3930f; current head is 54f74996cc8e2015f83a18c0302ce0e1a1b5fd0d. The only conflict was the changelog: the original note remains under Unreleased and the new 0.12.0 release notes are preserved. Workflow, policy note, and contributor guidance are byte-identical to the previously reviewed head. Normal PR CodeQL coverage, including fork PRs, is unchanged.

Local source review found no code or security findings. Both rewritten commits verify, and git diff --check passes. The local full workflow-lint attempt was stopped at a five-minute bound without a verdict; the current-head hosted lint and analyze jobs have succeeded. All current-head required checks now pass: deps, lint, test, release-check, analyze, docker, and Scan for Verified Secrets. The required non-author Code Owner review remains outstanding. Repository auto-merge is disabled, so no automatic landing is queued. The approved cadence and historical processed-analysis proof below address the source review recommendations; these older runs are not claimed as executions of the new head.

Historical evidence — 70db9c5a760ca32e60a0b6c7fd19c43026e75a72

  • Targeted workflow syntax validation (actionlint .github/workflows/codeql.yml) and git diff --check pass. A source comparison confirms PR, weekly, manual, language, action pins, permissions, and cache settings are unchanged.
  • Tests of the actual shared release gate at 9d81ab3d2877f9900ef787e6dbcf4d9af96eb013 confirm tag/manual acceptance, pending missing or running checks, failed-check rejection, and the 15-minute timeout.
  • Independent source review passed at 70db9c5a760ca32e60a0b6c7fd19c43026e75a72.
  • Remote make check passed dependency verification, formatting, vet, vulnerability and dead-code checks, full workflow lint, and the full race suite. Its smoke step rejected dirty Go VCS metadata caused by the test runner's untracked metadata directory. Running only the remaining make smoke snapshot steps in a clean detached checkout of the same commit passed, including Linux/macOS amd64/arm64 snapshot builds. The initial command itself exited nonzero; the affected steps passed on the clean-fixture rerun.
  • Automatic pull_request runs appeared after the PR was marked ready: CI, CodeQL, and Docker all succeeded. Normal PR execution is observed, not merely inferred from the trigger configuration.
  • Manual CodeQL succeeded at the exact candidate SHA. Analysis 2225979135 matches that SHA and branch; analysis 2225981180 covers PR merge SHA 1c403478ff4fb33ca21ad45ddb5f62a31f51382e. Both use category .github/workflows/codeql.yml:analyze, CodeQL 2.27.5, and 34 rules, with zero results and empty analysis errors/warnings. Both corresponding SARIF uploads report processing complete with no errors.
  • The release-tag trigger is verified from source and dependency contracts. No release or tag was created for validation; snapshot output was not published.

@clawsweeper

clawsweeper Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@vincentkoc
vincentkoc marked this pull request as ready for review November 23, 2026 00:18
@vincentkoc
vincentkoc requested a review from a team as a code owner November 23, 2026 00:18
@clawsweeper clawsweeper Bot added P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Nov 23, 2026
@clawsweeper

clawsweeper Bot commented Nov 23, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge.

What this changes

This PR replaces CodeQL scans on main pushes with version-tag scans and documents exact-commit release recovery.

Example: A maintainer pushes release tag v0.11.1.

  • Before: The tag push does not trigger CodeQL; main pushes do.
  • After: The tag push triggers CodeQL at the release commit; main pushes no longer trigger it.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, owner-directed workflow change with successful hosted execution and a verified release-gate contract; tag-push execution itself was not exercised.
Proof confidence 🐚 platinum hermit (4/6) This CI-only change requires no user-facing runtime proof; actual manual and PR CodeQL workflows succeeded, while tag execution is supported by source and contracts rather than an intentionally created validation tag.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Maintenance · Worth it: Yes · Fix scope: Complete
User problem: Maintainers run duplicate main-push security scans while releases still need an analyze check on the exact frozen commit.
Reason: The maintainer-authored direction trades main-push scans for release-tag coverage while retaining PR, weekly, and manual scans.

Merge readiness

✅ Ready for maintainer review

Keep this PR open: the maintainer-approved cadence change is absent from main, and review found no actionable defect.

Priority: P3
Reviewed head: 70db9c5a760ca32e60a0b6c7fd19c43026e75a72

Before merge

None.

Findings

None.

Agent review details

How this fits together

GitHub Actions events start the CodeQL analyze job, whose commit-associated check is consumed by the shared release gate.

flowchart LR
  A[Pull request] --> D[CodeQL analyze]
  B[Version tag push] --> D
  C[Weekly or manual event] --> D
  D --> E[Commit check and analysis]
  E --> F[Shared release gate]
Loading

Technical review

Best possible solution:

Land the focused trigger change with its documented manual qualification and recovery path.

Do we have a high-confidence way to reproduce the issue?

Current main directly shows the main-push trigger; this PR changes an intentional CI cadence rather than repairing a reproduced runtime bug.

Is this the best way to solve the issue?

The two-line workflow change uses the existing analysis owner and preserves the required check name; the added documentation addresses exact-SHA dry runs and recovery.

AGENTS.md: not found in the target repository.

Codex review notes: model internal, reasoning medium; reviewed against 4891b84fb285.

Provenance checked

  • CodeQL push cadence changes intended behavior with a stated reason (6765759: The original commit added CodeQL and control gates, including main-push, PR, scheduled, and manual scans.)
  • Release qualification instructions keeps the original intent (chore(release): prepare 0.10.4 with signed release tags #296: The signed-release preparation retained a non-publishing dry run before creating and publishing an approved annotated tag.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit c98146f adds CONTRIBUTING.md:67 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c98146fdcd36; files: CONTRIBUTING.md)

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P3: This is a bounded CI efficiency and release-process improvement with no CLI behavior change or demonstrated urgent failure.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is a bounded CI efficiency and release-process improvement with no CLI behavior change or demonstrated urgent failure.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 22, 2026, 7:38 PM ET / November 23, 2026, 00:38 UTC.

@vincentkoc
vincentkoc force-pushed the fix/codeql-release-tag-scans-20261123 branch from 70db9c5 to 54f7499 Compare November 27, 2026 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix other P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant