Repository navigation
Conversation
The main ruleset has a code_scanning rule for CodeQL. No workflow produced results, so the rule waited and every merge bypassed it. Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: DAVID AMID <[email protected]>
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: DAVID AMID <[email protected]>
amiddavid
left a comment
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 2 (glm, user of @amiddavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.319 | offload-review skill, @amiddavid's session | fresh | 2 of 2 | 1 of 2 | 1bcab631e0fc |
approve |
Verdict: approve
Findings
None.
Non-blocking
.github/workflows/codeql.yaml:31— the scan covers only the default build.go build ./...runs without build tags. Code behindcg_skeleton(tree-sitter parsers) andcg_record(the OTLP session recorder, which adds a network listener) is not analyzed. The comment in the file says this is deliberate: one command, same asmake build. If you want the recorder scanned, add a second job that builds with-tags cg_record. Not needed for this PR..github/workflows/codeql.yaml:19— the job sets notimeout-minutes. The GitHub default is 360 minutes. A hung scheduled run blocks a runner for up to 6 hours.timeout-minutes: 30would be enough; the live run took 1m43s. Style point only;ci.yamlsets none either..github/workflows/codeql.yaml:12—actions: readis not needed. The repo is public. GitHub requires that permission only for private repositories. Harmless to keep.
What I checked
- Read the full diff: one new file,
.github/workflows/codeql.yaml(41 lines). No code, no library, no proxy change. The fail-open and data-dependence rules do not apply. - Verified the action inputs against the real
github/codeql-actionat tagv4: the tag exists, andinitacceptsbuild-mode: manualfor compiled languages, including Go. - Verified the run on this PR (run 42475718773). The
analyzejob passed in 1m43s. The log shows:--build-mode=manualdatabase init, the tracedgo build ./...with the CodeQL Go extractor environment set, TRAP files imported, 36 queries evaluated (including theExtractionErrorsandSuccessfullyExtractedFilesdiagnostics), and the SARIF uploaded. The scan is not empty. - Verified the stated goal: the ruleset's
CodeQLcheck now reportspasson this PR. Before this workflow, that check had no result source, as the first commit message says. - Compared with
ci.yaml: sameactions/checkout@v4, sameactions/setup-go@v5withgo-version-file: go.mod, sameCGO_ENABLED: "0"for plain builds. Therecordjob inci.yamlalready provesgo build ./...succeeds withCGO_ENABLED=0. - Checked the triggers: push and pull_request target
mainonly; the weekly cron17 5 * * 1matches the comment "Monday 05:17 UTC". No paths filter on pull_request is deliberate and documented in the file: the code_scanning rule needs a result on every PR. - Checked the permissions block:
contents: read,security-events: writeare the minimum for uploading CodeQL results. - Checked both commit messages: DCO sign-off present,
Assisted-By:attribution, conventional-commit titles.
amiddavid
left a comment
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 1 (glm, user of @amiddavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.319 | offload-review skill, @amiddavid's session | fresh | 1 of 2 | 1 of 2 | 1bcab631e0fc |
blocking |
Verdict: blocking
Findings
- .github/workflows/codeql.yaml:38 — the scan sees no test code:
go build ./...never compiles_test.gofiles, so 664 of 992 tracked Go files stay outside the CodeQL database- What fails: CodeQL in manual build mode extracts only what the build step compiles.
go build ./...compiles no test file. So the scan skips every one of the 664_test.gofiles (67% of the Go code). The PR title says "a CodeQL scan of the Go code", and the ruleset now tells every PR "CodeQL passed". A reader will believe tests are scanned. They are not. Nothing in the workflow or the PR says so. - Proof:
- GitHub docs, "CodeQL code scanning for compiled languages": "For C/C++, C#, Go, Java, Kotlin, and Swift, CodeQL will analyze whatever source code is built by your specified build steps." Troubleshooting page: "CodeQL only scans files that are built during the analysis."
- CodeQL Go extractor source,
go/extractor/cli/go-extractor/go-extractor.goingithub/codeql(fetched today): during a traced manual build the CLI re-runs extraction with--mimic go <command>. Test extraction turns on only for thetestsubcommand:return parseFlags(args[i+1:], true, command == "test"). The comment at the top says extractTests is set "(b) if we're mimicking ago testcommand". Forgo build,packages.Loadruns withTests: false. The env optionCODEQL_EXTRACTOR_GO_OPTION_EXTRACT_TESTScannot override this: the--mimicbranch discards it. go build ./...does not compile test files. This is Go toolchain behavior.- Counts at this head:
git ls-files '*_test.go'= 664; non-test*.go= 328.
- Fix: make the Build step compile the tests too, for example:
run: | go build ./... go test -p 1 -count=1 -run='^$' ./...
-run='^$'selects no test, so the binaries only compile and start.-p 1runs them one at a time; ci.yaml serializes test binaries for the same reason. Or, if test code is out of scope on purpose, say so in the workflow comment and the PR description. Then no reader believes tests are scanned.
- What fails: CodeQL in manual build mode extracts only what the build step compiles.
Non-blocking
- Tagged build variants are outside the scan.
go build ./...passes no tags, so the 5cg_recordfiles and 6cg_skeletonfiles are never extracted. The release binary is the untagged build, so the scan matches what ships. If you want the recorder variant scanned, add one more build command with-tags cg_record(it is pure Go). - The job sets no
timeout-minutes. A hung analysis holds a runner for the 6-hour default. GitHub's own CodeQL examples settimeout-minutes. - The workflow sets no
concurrencygroup. Rapid pushes tomainrun scans in parallel. ci.yaml has the same gap, so this is optional.
What I checked
- The full diff of both commits (
63fa6631,1bcab631). One new file, 41 lines, no code outside.github/workflows/. - YAML syntax, triggers, and permissions.
security-events: writeandactions: readare both present.actions: readis required by the analyze step; codeql-action issue #2117 documents the failure without it. build-mode: manualis valid for Go when one language runs per job (init action.yml of codeql-action). No matrix here, so the input applies.go-version-file: go.mod— same pattern as ci.yaml. go.mod declaresgo 1.26.4.CGO_ENABLED: "0"matchesmake buildand the shipped binary. The goreleaser config builds untagged,CGO_ENABLED=0.- The
mainruleset claim in the comment. Verified through the GitHub API: the ruleset has acode_scanningrule with toolCodeQL, alerts thresholderrors, security alerts thresholdhigh_or_higher. The comment is accurate. - Fork PR behavior. Fork
pull_requestruns get a read-onlyGITHUB_TOKEN. GitHub's code-scanning docs say upload is always allowed when thepull_requestevent triggers the run, so the required check still gets its result. - No Dependabot config exists in the repo, so the known Dependabot read-only failure mode does not apply.
- Live tests were not run (not approved). All evidence above comes from the diff, the repo, the CodeQL action and extractor sources, and GitHub docs.
Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: DAVID AMID <[email protected]>
|
Round 1 replies.
|
amiddavid
left a comment
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 1 (glm, user of @amiddavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.319 | offload-review skill, @amiddavid's session | resumed | 1 of 2 | 2 of 2 | cc190a958871 |
approve |
Verdict: approve
Findings
None.
Earlier findings
-
Reviewer 1, round 1 — test code outside the scan. The author rejected the "compile the tests" fix and chose the other fix I offered: document the scope. Commit
cc190a95adds the scope note to the Build step (.github/workflows/codeql.yaml:37-40), and the PR body has a new "What is scanned" section.- I checked the rejection reason. The ruleset blocks a merge on any error or high+ security alert from CodeQL. Test code and the
cg_record/cg_skeletontags are not in the release binary (the goreleaser config builds the untagged binary only). So an alert in test code would block merges for code no user runs. The reason is right. I accept it. - My defect claim was "nothing says tests are out of scope". That is fixed, in both the workflow and the PR body.
- I checked the rejection reason. The ruleset blocks a merge on any error or high+ security alert from CodeQL. Test code and the
-
Reviewer 1, round 1 (non-blocking) — no
timeout-minutes. Fixed incc190a95: the job now setstimeout-minutes: 30. Reviewer 2 measured the live run at 1m43s, so 30 minutes is ample. -
Reviewer 1, round 1 (non-blocking) — tagged variants outside the scan. Covered by the same documented scope decision. Not changed. Fine.
-
Reviewer 1, round 1 (non-blocking) — no
concurrencygroup. Rejected:ci.yamlhas none either. Was optional. Fine. -
Reviewer 2, round 1 —
actions: readnot needed. Rejected: harmless, and needed if the repo becomes private. Checked: the starter workflow marksactions: readas required only for private repositories. Keeping it is safe. Fine.
Non-blocking
- None new. The
concurrencysuggestion stays declined and that is fine.
What I checked
- Last review: round 1,
1bcab631e0fc80ed2453b81436b7a85a4adac686, 2026-11-08T11:43:00Z. - New commits read: 1 —
cc190a95"ci: add a time limit to CodeQL and say what it scans". - Read in full: 2 reviews, 2 comments, 0 inline comments (from the three saved files).
- New items since my last review:
- Commit
cc190a95: 5 added lines in.github/workflows/codeql.yaml.timeout-minutes: 30at job level, correct placement. The new comment states the scan scope. Its claims match what I proved in round 1:go build ./...covers only the untagged, non-test code. - Author comment at 2026-11-08T11:44:06Z: the round-1 replies. Each reply checked above.
- Updated PR body: new "What is scanned" section. Read in full. It states the scope and the reason, and both are accurate.
- Reviewer 2's round-1 review (posted 11:30:51Z, before my round-1 post; I read it now for the first time per round-2 rules). It approved with three non-blocking notes. I checked each: scan scope (same as my finding, resolved by documentation), timeout (fixed),
actions: read(declined, fine). I agree with its conclusions; nothing new to add. - GitHub bot comment at 11:25:14Z: the standard code-scanning welcome note. Nothing to do.
- Commit
- The full diff from base
f43d9fa5to headcc190a95: one file, 47 lines, CI only. No library, proxy, or behavior change. No data dependence. - Live tests were not run (not approved).
amiddavid
left a comment
There was a problem hiding this comment.
| Reviewer | Kind | Started by | Context | Review | Round | Head | Verdict |
|---|---|---|---|---|---|---|---|
| Reviewer 2 (glm, user of @amiddavid) | GLM rits/zai-org/glm-5-3 via Claude Code 2.1.319 | offload-review skill, @amiddavid's session | resumed | 2 of 2 | 2 of 2 | cc190a958871 |
approve |
Verdict: approve
Findings
None.
Earlier findings
- My round-1 notes: all addressed or accepted.
- Scan scope (tests and tagged variants not scanned): the author documented the scope in the workflow comment and a new "What is scanned" section in the PR body. I checked both; see below. Accepted.
- No
timeout-minutes: fixed incc190a95. The job now setstimeout-minutes: 30. The live run on the new head took 1m33s, so 30 minutes leaves room. actions: readnot needed: the author kept it, with the reason "the repo needs it if it becomes private". The reason is right. Harmless today. Closed.
- Reviewer 1, finding 1 (test code is not scanned): the facts are right, and I accept the author's rejection. I checked the core claim myself:
go build ./...compiles no_test.gofile, and CodeQL manual build mode extracts only what the build compiles. So test code is outside the database. The author's reason is sound: the ruleset blocks a PR on an error-level alert, and test code does not run in the shipped binary. The scope is now stated in the workflow (lines 37-40) and in the PR body. A reader can no longer believe tests are scanned. I do not repeat the finding.
Non-blocking
.github/workflows/codeql.yaml:37— "the code in the shipped (untagged) binary only" is broader in reality.go build ./...compiles every untagged non-test package, includingdash,examples/llm-d-serviceand other commands that are not in the release binary. The scan covers more than the shipped binary. The excluded items (tests,cg_record,cg_skeleton) are stated correctly, so the comment does its job. If you touch the file again, say "untagged non-test Go code" instead of "the shipped binary".
What I checked
- Last review: round 1, 1bcab63, 2026-11-08T11:30:51Z.
- New commits read: 1 (
cc190a95, "ci: add a time limit to CodeQL and say what it scans"). - Read in full: 2 reviews, 2 comments, 0 inline comments (from the three files). No inline comments exist on this PR.
- New items since my last review, and what I did about each:
- Reviewer 1's round-1 review (11:43:00Z, blocking, one finding). Read in full. Checked the finding's facts myself; see "Earlier findings".
- The author's round-1 replies (11:44:06Z). Read in full. Verified each claim:
timeout-minutes: 30is incc190a95; the workflow scope comment is incc190a95; the "What is scanned" section is in the current PR body;actions: readand noconcurrencygroup are unchanged, as stated. - New commit
cc190a95. Read the full diff (5 added lines) and the whole workflow file around it. The commit adds the time limit and the scope comment. No behavior or code change outside.github/workflows/codeql.yaml. - The
github-advanced-security[bot]comment (11:25:14Z) is a boilerplate setup notice. Nothing to act on.
- Verified the new head's checks (run 42477032377):
analyzepassed in 1m33s, and the ruleset'sCodeQLcheck reportspass. - Checked the new commit message: conventional title, DCO sign-off,
Assisted-By:attribution. - Live tests were not run (not approved). All evidence comes from the diff, the repo, the PR conversation, and GitHub check runs.
check-ready.sh now fails a PR whose head has no passing CodeQL check run from GitHub's code-scanning app. RELEASING.md gets new rules: a PR opened before #945 needs a new push before it merges; after an --admin merge, read the merge's rule results and tell the owner of any failed rule other than the review rule; a PR's scan covers only its changed lines, so read main for all open alerts; a false positive is dismissed only with the owner's yes. Why: on 2026-11-08 #943, #937 and #944 merged past the code-scanning rule because they were opened before the CodeQL workflow (#945). CodeQL scans of main afterwards found no new alert. --admin does not say which rules it bypasses, and the script did not check code scanning. New integrator rule: an integrator talks with many sessions and with the owner, so its main session must stay free. Implementation work goes to subagents, and the main session only coordinates. The owner asked for this. Behavior change: none. Release scripts and docs only. Data dependence: none. The script reads GitHub check runs only. Reviews: 2 offload reviews (GLM), round 3 (owner granted round 3), both approve at df9d719. Assisted-By: Claude Opus 5.5 <[email protected]> Signed-off-by: DAVID AMID <[email protected]>
Summary
mainruleset needs CodeQL results. Until now none came, so every merge bypassed the rule.What changed
.github/workflows/codeql.yaml.main, on pull requests tomain, and weekly.CGO_ENABLED=0 go build ./.... The default build is pure Go. One explicit command is the same asmake build.paths-ignore: the rule needs a result on every PR.No behavior change of the proxy or library. No data dependence (CI only).
What is scanned
_test.gofiles are not scanned.cg_recordandcg_skeletonbuild tags are not scanned.How it was tested
Open questions
🤖 Generated with Claude Code