Skip to content

fix: run codeql inside sdlc ci - #113

Merged
fatherlinux merged 1 commit into
masterfrom
fix/1552-codeql-in-ci
Nov 5, 2026
Merged

fatherlinux merged 1 commit into
masterfrom
fix/1552-codeql-in-ci

Conversation

@fatherlinux

Copy link
Copy Markdown
Member

What

Removes [tool.sdlc.ci] skip = ["codeql"], so CodeQL runs in the required sdlc ci check.

Why

Constitution XII: "CI runs push's checks except Gourmand and Gatehouse." CodeQL is one of push's verdicts, and the two exclusions are the image's decision, not a repo's. With the skip, the only place a CodeQL finding could block was the pre-push hook — a developer's machine, one --no-verify away — while the required sdlc ci reported green.

The skip's comment claimed the CodeQL Action covered it. The CodeQL Action does run on pull requests here, but its check is advisory: no ruleset requires it, so a finding annotated the PR and merged anyway.

I wrote that skip during the RT#1552 conversion, into 24 of the 33 repos. This is one of the 24. python-sdlc#19 then makes resolve() refuse the config, so it cannot come back quietly.

What CodeQL found

With CodeQL in, one finding appears: py/overly-permissive-file at test/test_api.py:207 — the os.chmod(target, 0o644) in a finally that restores the mode the test took away to prove CrunchLog raises DataFileError on an unreadable file. The file is under tmp_path and the chmod is cleanup, not a permission the product sets. Recorded in .sdlc/codeql-baseline.json, so a new finding still fails.

Verification

sdlc ci run locally with CodeQL in it: exit 0.

🤖 Generated with Claude Code

https://claude.ai/code/session_01R7Y1jesjfgxHeqtKJCvay6

`[tool.sdlc.ci] skip = ["codeql"]` kept CodeQL out of the one tier anything
enforces. Constitution XII says CI runs push's checks except Gourmand and
Gatehouse; CodeQL is one of push's verdicts. With the skip in place the only
thing that could block on a CodeQL finding was the pre-push hook -- a
developer's machine, one `--no-verify` away -- while the required `sdlc ci`
reported green.

The comment justifying the skip said the CodeQL Action covered it. The Action
does run on pull requests here, but its check is advisory: no ruleset requires
it, so a finding annotated the PR and merged anyway.

With CodeQL in, one finding appears: `py/overly-permissive-file` at
test/test_api.py:207, the `os.chmod(target, 0o644)` in a `finally` that puts
back the mode the test took away to prove CrunchLog raises DataFileError on an
unreadable file. The file is in tmp_path and the chmod is the cleanup, not a
permission the product ever sets. Recorded in .sdlc/codeql-baseline.json, so a
new finding still fails.

One of 24 repos; python-sdlc#19 then refuses this config so it cannot come
back. RT#1552.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R7Y1jesjfgxHeqtKJCvay6
@fatherlinux
fatherlinux enabled auto-merge (squash) November 5, 2026 01:52

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gatehouse found no issues.

Full review.

3 finding(s) dropped: their evidence is not in the diff.

@fatherlinux
fatherlinux merged commit dd9022d into master Nov 5, 2026
31 checks passed
@fatherlinux
fatherlinux deleted the fix/1552-codeql-in-ci branch November 5, 2026 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant