Repository navigation
ci(audit): allow the read-only commands the first run was denied - #1776
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed
Widens the weekly audit's Bash allow list with read-only commands, and tells Claude how to call Bash so that it stays inside the list.
Added to the allow list:
ls,head,tail,wc,sortanduniq.git status *.git -C .lemmiwinks log|show|ls-files.python3 scripts/check_docs.py *.Added to the deny list:
git -C * push|commit.The prompt gains a Tools section: one command per Bash call, with no
cd,&&,;or redirects. Files are read with Read, Glob and Grep. Git in Lemmiwinks runs asgit -C .lemmiwinks ….Why
The first run (actions run 45906142767, which opened the audit ledger PR) reported 3 permission denials. Its PR body says Claude's own
check_docs.pyrun was blocked. Under--permission-mode dontAsk, each part of a compound command has to match a rule, socd .lemmiwinks && git logorcheck_docs.py 2>&1 | tailis denied. The action hides which commands they were, andshow_full_outputwould publish them in a public log, so this covers the likely shapes rather than the exact three.Blast radius
CI only. Every added rule is read-only. Nothing gives Claude write access outside
docs/**andREADME.md, and the PR job's path guard is unchanged.secrets/*.sops.yamlVerification
actionlint,yamllint --strictandzizmor --offline .github/workflows: clean.The
settingsblock parses as JSON.python scripts/check_docs.py:docs OK.check_close_keywords.py --texton the prompt: PASS.After merge,
gh workflow run weekly-audit.yml -f focus=5should reportpermission_denials_count: 0in the Audit log.make validatepasses (not run: CI only)Deployed to the lab and confirmed working (n/a)
Docs updated (the prompt in
.claude/commands/weekly-audit.md)🤖 Generated with Claude Code