Repository navigation
fix: run codeql inside sdlc ci - #64
Conversation
| "Bash(git -C /var/home/fatherlinux/Documents/Professional/Projects/crunchtools/mcp-wordpress diff)", | ||
| "Bash(git -C /var/home/fatherlinux/Documents/Professional/Projects/crunchtools/mcp-wordpress log --oneline -5)", | ||
| "Bash(git -C /var/home/fatherlinux/Documents/Professional/Projects/crunchtools/mcp-wordpress add src/mcp_wordpress_crunchtools/client.py src/mcp_wordpress_crunchtools/server.py src/mcp_wordpress_crunchtools/tools/media.py)", | ||
| "Bash(git -C:*)", |
There was a problem hiding this comment.
HIGH (Security Scan): This wildcard allows any git -C command without approval. Git aliases can execute shell commands, so a command such as git -C /tmp -c alias.run='!curl ...' run can use this permission to run arbitrary commands and access data available to the user.
Suggestion: Remove the wildcard and allow only the specific Git operations needed, with constrained arguments.
Evidence:
"Bash(git -C:*)"
There was a problem hiding this comment.
fixed in a096606 — and the finding was right to fire. .claude/settings.local.json is a per-machine Claude Code permission file and should never have been in this diff; my conversion script ran git add -A, which picked it up as an untracked file. No repo in the org tracks it, so this pull request would have been the first. The amended commit removes it from the tree and adds it to .gitignore. The diff is now .gitignore and pyproject.toml only. (The Bash(git -C:*) allowance it reported is a real local-settings problem, not a repository one — it is mine to narrow on this machine, and it is no longer being published.)
| "Bash(CLAUDECODE= claude mcp add mcp-wordpress-crunchtools --env WORDPRESS_URL --env WORDPRESS_USERNAME --env WORDPRESS_APP_PASSWORD -s user -- podman run -i --rm -v /tmp:/tmp:Z -e WORDPRESS_URL -e WORDPRESS_USERNAME -e WORDPRESS_APP_PASSWORD localhost/mcp-wordpress-crunchtools:dev)", | ||
| "Bash(CLAUDECODE= claude mcp add mcp-wordpress-crunchtools -s user -- podman run -i --rm -v /tmp:/tmp:Z -e WORDPRESS_URL -e WORDPRESS_USERNAME -e WORDPRESS_APP_PASSWORD localhost/mcp-wordpress-crunchtools:dev)", | ||
| "Bash(CLAUDECODE= claude mcp add mcp-wordpress-crunchtools -s user -- podman run -i --rm -v /tmp/mcp-uploads:/tmp/mcp-uploads:Z -e WORDPRESS_URL -e WORDPRESS_USERNAME -e WORDPRESS_APP_PASSWORD localhost/mcp-wordpress-crunchtools:dev)", | ||
| "Bash(git -C /var/home/fatherlinux/Documents/Professional/Projects/crunchtools/mcp-wordpress status:*)", |
There was a problem hiding this comment.
LOW (General Review): These permissions depend on the repository being checked out at one user's absolute home-directory path. In a different checkout, the Git commands will not match, making this configuration machine-specific and less maintainable if shared.
Suggestion: Use repository-relative permission patterns where supported, or keep this personal configuration out of shared repository settings.
Evidence:
"Bash(git -C /var/home/fatherlinux/Documents/Professional/Projects/crunchtools/mcp-wordpress status:*)"
There was a problem hiding this comment.
fixed in a096606 — the file is out of the diff and now git-ignored, so the machine-specific absolute paths are not being shared. Same cause as the HIGH above: git add -A in my conversion script swept up an untracked local settings file.
`[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 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. Gate run locally with codeql in: `sdlc ci` exits 0. 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
bedf7ec to
a096606
Compare
What
Removes
[tool.sdlc.ci] skip = ["codeql"], so CodeQL runs in the requiredsdlc cicheck.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-verifyaway — while the requiredsdlc cireported 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.Verification
sdlc cirun locally with CodeQL in it: exit 0,codeql: 0 new, 0 in the baseline.🤖 Generated with Claude Code
https://claude.ai/code/session_01R7Y1jesjfgxHeqtKJCvay6