Repository navigation
fix(#1292): narrow the broad allowed-tools grants the portal didn't flag — qa gh api, clean rm/find, setup curl/sed - #1323
Merged
admarble merged 4 commits intoOct 5, 2026
Conversation
Entire-Checkpoint: 81d4cc290c1e
Entire-Checkpoint: 772d614ad4ea
Entire-Checkpoint: 434e8e22ecdb
…the allowed-tools gate QA showed Bash(rm -rf:*) and Bash(gh api -X:*) passed the exact <tool> * match. Any wildcard entry for gh api/rm/mv/find/sed/cp is now rejected unless BROAD_ALLOWLIST names it with a reason; the five narrowed clean/setup entries are allowlisted. Entire-Checkpoint: 392eb207a31d
admarble
deleted the
feature/1292-fix-skills-narrow-the-broad-allowed-tools-grants-t
branch
October 5, 2026 19:01
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.
Summary
allowed-toolsentries inqa,cleanandsetup. I keptjqinsetupandtest, each with a reason. The same frontmatter is in.claude/skills,templates/skillsandplugin/skills(the plugin copy was regenerated withcheck-skill-sync.ts --fix).src/lib/__tests__/skill-allowed-tools-gate.test.ts). It now rejects any wildcard entry forgh api,rm,mv,find,sedandcp, unlessBROAD_ALLOWLISTnames the entry with a reason. That includes flag-prefixed forms such asBash(rm -rf:*)andBash(gh api -X:*). The allowlist holds the 5 narrowedclean/setupentries, each with its reason. New cases check thatBash(gh api:*),Bash(rm:*),Bash(curl:*),Bash(sed:*)and four prefix variants are rejected, and that wildcard-free commands are kept.cb3ffdd1): QA found that the first version matched only the exact<tool> *form, soBash(rm -rf:*)andBash(gh api -X:*)passed the gate while being broader than the removed entries. The rule is now a prefix match with a reviewed allowlist. The allowlistedsed -i.bak * .claude/memory/constitution.mdis narrower thansed:*but not exact:*can also match extra file arguments, and its reason says so.[Unreleased] / Fixed.AC-1: one row per entry
Bash(gh api:*)gh api "$url"with a URL built at runtime, so no pattern can cover it. Any endpoint pattern ending in*would also match an appended-X DELETE.gh api …/check-runsandgh api "$url", which run only when every CI check fails (SKILL.md:973,979);gh api 'repos/{owner}/{repo}/issues/comments?per_page=100' --paginate(:2260)Bash(mv:*)Bash(mv * docs/archive/*)andBash(mv * scripts/archive/*). The*also matches spaces, so a move with several sources still has to land in an archive tree.mvwhose target is outside the two archive treesBash(rm:*)rm. Deleting.DS_Storefiles and empty folders is described in prose only.Bash(find:*)find; it scans with Glob.find, including-delete/-execBash(sed:*)Bash(sed -i.bak * .claude/memory/constitution.md), the only in-place edit (:335)sedcalls inside$(…)pipelines (:78,124,130,133,148). Whether those prompt was not checked, because there was no interactive session.Bash(cp:*)Bash(cp * .claude/memory/constitution.md)andBash(cp -R * .claude/skills/*)(:328,363)cpBash(cat:*)Bash(cat package.json)(:119,249)catBash(jq:*)Bash(jq:*)Bash(curl:*)AC verification
FILE_WRITE_TOOLSandBROAD_ALLOWLISTadded to the gate, plus therejects %s (#1292)case. Mutation-verified (below).Mutation-verified: AC-2 — re-added
Bash(rm:*)to.claude/skills/clean/SKILL.md;src/lib/__tests__/skill-allowed-tools-gate.test.ts > skill allowed-tools grant no broad shell access (#1287) > .claude/skills — no bare Bash, Bash(*), tool or runner wildcard, or placeholderfailed withclean/SKILL.md: Bash(rm:*) — file-writing or API wildcard not in BROAD_ALLOWLIST (#1292); restored, and all 10 cases pass.I ran this marker through
parseMutationMarkersand it parses with every field intact.Mutation-verified: AC-2 — added
Bash(rm -rf:*)to.claude/skills/clean/SKILL.md(prefix variant, runner fixcb3ffdd1);src/lib/__tests__/skill-allowed-tools-gate.test.ts > skill allowed-tools grant no broad shell access (#1287) > .claude/skills — no bare Bash, Bash(*), tool or runner wildcard, or placeholderfailed withclean/SKILL.md: Bash(rm -rf:*) — file-writing or API wildcard not in BROAD_ALLOWLIST (#1292), 1 failed / 14 passed; restored.Checks
npm run buildnpm run lintnpm run lint:skill-sync/lint:skill-callscb3ffdd1(10/10 before; it was red on exactly the 6 target entries before the frontmatter edits)Fixes #1292
🤖 Generated by
sequant run