-
Notifications
You must be signed in to change notification settings - Fork 1
backlog(B-0107): add P3 row — CodeQL dismiss pattern for peer-call siblings #897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
AceHack
merged 3 commits into
main
from
backlog/B-0107-codeql-peer-call-dismiss-pattern-2026-04-30
Apr 30, 2026
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
88 changes: 88 additions & 0 deletions
88
docs/backlog/P3/B-0107-codeql-peer-call-dismiss-pattern-2026-04-30.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| --- | ||
| id: B-0107 | ||
| priority: P3 | ||
| status: open | ||
| title: CodeQL `js/indirect-command-line-injection` dismissal pattern for peer-call siblings (gemini.ts, codex.ts) | ||
| tier: factory-hygiene | ||
| effort: S | ||
| ask: surfaced during slice-15 PR #896 review on 2026-04-30 | ||
| created: 2026-04-30 | ||
| last_updated: 2026-04-30 | ||
| composes_with: [B-0086] | ||
| tags: [ci-codeql, peer-call, by-design-suppression, missing-mechanism] | ||
| --- | ||
|
|
||
| # CodeQL by-design dismissal pattern for peer-call siblings | ||
|
|
||
| When porting `tools/peer-call/grok.sh` to TS in slice 15 (PR #896), | ||
| CodeQL flagged `js/indirect-command-line-injection` (medium severity) | ||
| on the `runContextCmd` shell-out. This is **by-design** — the script | ||
| contract is "user explicitly supplies a shell command via | ||
| `--context-cmd`"; same trust boundary as the bash original's `eval`. | ||
|
|
||
| Resolution on PR #896: dismiss the alert via API with a 280-char | ||
| justification: | ||
|
|
||
| ```bash | ||
| gh api repos/Lucent-Financial-Group/Zeta/code-scanning/alerts/<N> \ | ||
| -X PATCH \ | ||
| -f state=dismissed \ | ||
| -f "dismissed_reason=won't fix" \ | ||
| -f "dismissed_comment=<280-char justification>" | ||
| ``` | ||
|
|
||
| The two sibling ports — `tools/peer-call/gemini.sh` and | ||
| `tools/peer-call/codex.sh` — will hit the same alert when ported | ||
| (slices 16 + 17 candidates) since they have the same `runContextCmd` | ||
| pattern. | ||
|
|
||
| ## Two options | ||
|
|
||
| **A — Per-PR dismissal (status quo)** | ||
|
|
||
| - Each sibling-port PR triggers the alert + needs the same | ||
| dismissal API call. | ||
| - Cost: ~30 seconds per PR. | ||
| - Pro: explicit per-instance acknowledgment. | ||
| - Con: repeated boilerplate; reviewer fatigue; drift risk if a | ||
| future sibling port subtly changes the shape. | ||
|
|
||
| **B — Structural exclusion in `.github/codeql/codeql-config.yml`** | ||
|
|
||
| - One-time exclusion of the rule for `tools/peer-call/*.ts`. | ||
| - Cost: ~1 PR (small YAML change). | ||
| - Pro: drift-resistant; no per-PR work; consistent across siblings. | ||
| - Con: blanket suppression — if a real injection bug landed in a | ||
| future peer-call refactor, CodeQL wouldn't catch it. | ||
|
|
||
| ## Recommendation | ||
|
|
||
| Option B with a tight path scope (`tools/peer-call/*.ts`) and a | ||
| comment in the YAML referencing this row. The `runContextCmd` | ||
| helper has a stable shape; if it ever changes form (e.g., to use | ||
| `shell-quote` per CodeQL's recommendation), the exclusion can be | ||
| removed in the same PR. | ||
|
|
||
| ## Acceptance criteria | ||
|
|
||
| - `.github/codeql/codeql-config.yml` adds a CodeQL filter that | ||
| scopes `js/indirect-command-line-injection` to exclude | ||
| `tools/peer-call/*.ts`. The exact syntax should be verified | ||
| during implementation: CodeQL supports `query-filters` (rule- | ||
| scoped) and `paths-ignore` (path-scoped); per-rule + per-path | ||
| scoping requires combining them or using a custom suite — see | ||
| CodeQL docs at <https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning> | ||
| before committing the form. | ||
| - Comment in YAML cites this row + slice 15 + by-design justification. | ||
| - New PR for slice 16 (gemini port) does NOT raise the alert. | ||
|
|
||
| ## Composes with | ||
|
|
||
| - **B-0086** — TS+Bun migration trajectory. | ||
| - **PR #896** — slice 15 (peer-call/grok) where the dismissal pattern | ||
| first surfaced. | ||
|
|
||
| ## Effort | ||
|
|
||
| **S (small)** — ~10 lines of YAML + commit + verify on next sibling | ||
| PR. | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.