You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(skills): narrow the broad allowed-tools grants the portal didn't flag — qa gh api, clean rm/find, setup curl/sed #1292
Tier: judgment Found: 2026-10-03, #1287 spec and QA (PR #1291)
Problem.#1287 narrowed the grants the plugin directory portal flagged: bare Bash, Bash(*), and wildcards after gh/git/npm/npx and runners. These allowed-tools entries on main grant comparable reach, but the portal didn't list them and #1287's gate doesn't reject them:
qa:Bash(gh api:*). Arbitrary REST/GraphQL calls, including -X DELETE and PATCH, run without a prompt while /qa is active. The qa body uses gh api for reads (PR body, check-runs, closing references).
clean:Bash(rm:*), Bash(mv:*), Bash(find:*). find … -delete and rm -rf <any path> are pre-approved.
setup:Bash(curl:*), Bash(sed:*) (sed -i on any file), Bash(cat:*), Bash(cp:*), Bash(jq:*).
test:Bash(jq:*). Low risk (jq can't execute), listed for completeness.
Like #1287, this affects interactive use only. sequant run phases use bypassPermissions.
AC
AC-1: Each entry above is narrowed to the subcommands or paths its skill body and references/ actually run, or removed, or kept with a one-line reason in the PR. Evidence: a PR-body table, one row per entry
Scope update (2026-10-03): setup's Bash(curl:*) was dropped in PR #1291. The plugin directory portal flagged it under the same hold as #1287, and setup's body never runs curl. The remaining items here are qagh api:*, cleanrm/mv/find, setupsed/cat/cp/jq, and testjq. The #1287 gate also rejects curl */wget * now.
1. #1287's gate rejects only one exact pattern.src/lib/__tests__/skill-allowed-tools-gate.test.ts:47 rejects an entry only when cmd === "<tool> *" for a tool in BROAD_TOOLS. Two consequences:
Bash(gh api:*) passes, because the wildcard follows a subcommand. gh api can still send -X DELETE and PATCH.
rm, mv, find, sed and cp are not in BROAD_TOOLS at all.
The gate encodes the portal's definition of "broad" (it runs code) as a denylist. Commands that can delete or overwrite files are outside that definition, so the gate never sees them. AC-2 adds more names to the denylist. That fixes this round, and the next unlisted command will need its own issue.
Decision for this issue: extend the denylist (AC-2 as written), or switch to an allowlist of reviewed entries, each with a reason, so a new broad entry fails by default. The allowlist costs one review line per new grant.
2. gh api in qa bypasses the platform layer.qa/SKILL.md:973-979 (check-runs, annotations) and :2241-2260 (comment-marker reads) call gh api directly from the skill markdown. GitHubProvider is meant to own gh. If a sequant subcommand did those reads, the grant could be removed rather than narrowed. A narrow alternative is to grant only the endpoints the skill calls: Bash(gh api repos/*/commits/*/check-runs*) and similar, with no -X.
3. clean's rm and find follow from what the skill does. That isn't a design problem. Scope them to the paths the skill cleans, for example worktree dirs and .sequant/ artifacts.
Implement AC-2 as written. Reject the listed entries unless an allowlist entry names them with a reason. My earlier comment's denylist-vs-allowlist question is not for this run. If the owner wants a default-deny gate, that is a separate follow-up.
Producer and mirrors. Edit templates/skills/<name>/SKILL.md and .claude/skills/<name>/SKILL.md. Regenerate plugin/skills/ with npx tsx scripts/check-skill-sync.ts --fix, then run npm run lint:skill-sync && npm run lint:skill-calls. The gate walks every SKILL_ROOTS root.
qa's gh api. Every gh api call in qa/SKILL.md and its references/ is a GET. Narrow the grant to the endpoints those calls use, or remove it and list the new prompts. Don't grant -X.
The PR body's AC-1 table needs one row per entry: qa gh api, clean rm/mv/find, setup sed/cat/cp/jq, test jq. List each command that will now prompt.
Phase rules (all phases):
Commit early. Make a WIP commit at least every 10 minutes. Each phase has a hard 30-minute wall, and committed work survives it.
exec: run the full suite at most once, in the foreground, under timeout 900, and only after a WIP commit. Otherwise run named vitest files only. No Monitor, no run_in_background.
qa phase: do not run npm test. Run named vitest files only. CI runs the full suite.
Complexity: Standard (2 ACs, 4 directories: .claude/skills, templates/skills, plugin/skills, src/lib/__tests__)
AC Quality Check
AC-1: Both lines have Evidence: clauses and are measurable. AC-1 offers three dispositions: narrow, remove, or keep with a reason. Each entry's recommended disposition is in the plan below, so exec does not have to choose.
AC-2: The evidence is not vacuous. On main, clean grants Bash(rm:*) and the gate passes, so the mutation (re-adding Bash(rm:*)) does not fail today. It fails only once the new rule exists.
Non-Goals: headless phase permissions, and anything the portal already flagged (#1287).
Metric
Value
Status
Feature count
1
✅
AC items
2
✅
Directory spread
4 (3 are mirrors of one tree)
✅
Verdict: ✅ SCOPE_OK
Acceptance Criteria
AC-1: Each listed grant is narrowed, removed, or kept with a reason
Verification: Manual Test. Review the PR-body table against the frontmatter diff. Scenario: Given the 9 entries (qa gh api; clean rm/mv/find; setup sed/cat/cp/jq; test jq) → when exec edits the frontmatter → then the PR body has one row per entry with its disposition and the commands that will now prompt. Assumptions: These need checking before coding:
Claude Code permission rules accept * mid-pattern, as in Bash(mv * docs/archive/*).
Quoted arguments match the same way unquoted ones do.
Recommended dispositions. Exec may deviate if it records why.
Skill
Entry
What the body runs
Recommended
qa
Bash(gh api:*)
3 GETs: check-runs (SKILL.md:973), gh api "$url" for annotations (:979), issues/comments?per_page=100 --paginate (:2260)
Remove. The annotations call takes a runtime URL, so no pattern can cover it. Both call sites sit inside $(…)/while pipelines, which likely prompt anyway. Any endpoint pattern with a trailing * also matches an appended -X. The new prompts are bounded: the check-runs path runs only when every check fails. List them in the PR.
clean
Bash(mv:*)
Moves files into the archive trees
Narrow to Bash(mv * docs/archive/*) and Bash(mv * scripts/archive/*)
clean
Bash(rm:*)
No rm in the body. Removing .DS_Store files and empty dirs is described in prose only.
Remove. Those deletions will prompt.
clean
Bash(find:*)
No find in the body. Scanning uses Glob.
Remove.find … -delete/-exec is the risk.
setup
Bash(sed:*)
Read-only sed in pipes (:78,124,130,133,148), plus sed -i.bak "s/{{PROJECT_NAME}}/…/g" .claude/memory/constitution.md (:335)
Narrow to Bash(sed -i.bak * .claude/memory/constitution.md). Don't write {{ literally: the gate's AC-3 placeholder rule rejects it. The pipe sed calls prompt or are auto-read-only; record which.
Keep with reason, same as setup. Optionally narrow to Bash(jq * .sequant/settings.json).
AC-2: The gate rejects gh api/rm/curl/sed wildcards unless allowlisted with a reason
Verification: Unit Test, mutation-verified. Scenario: Given Bash(rm:*) is re-added to .claude/skills/clean/SKILL.md → when npx vitest run src/lib/__tests__/skill-allowed-tools-gate.test.ts runs → then the .claude/skills policy case fails and names clean/SKILL.md: Bash(rm:*). Restore, and the test passes. Assumptions:violation() normalizes X:* to X *, so gh api:* becomes gh api *. This is already true at skill-allowed-tools-gate.test.ts:121.
Implementation Plan
Phase 1: Gate first (red)
In src/lib/__tests__/skill-allowed-tools-gate.test.ts, add FILE_WRITE_TOOLS = ["gh api", "rm", "mv", "find", "sed", "cp"]. Add BROAD_ALLOWLIST: Record<string, string> (entry → reason), shaped like RUNNER_ALLOWLIST. violation() returns "file-writing or API wildcard not in BROAD_ALLOWLIST (#1292)" when cmd === "<t> *" and the entry is not allowlisted. curl is already in BROAD_TOOLS.
Add an it.each over the 4 literal entries the AC names (Bash(gh api:*), Bash(rm:*), Bash(curl:*), Bash(sed:*)), asserting violation() is non-null. This proves the rule without depending on current skill content. Update the file's header doc block.
Run the named test file. It should now fail on the existing qa/clean/setup entries. WIP commit.
Phase 2: Narrow the grants (green)
Edit .claude/skills/{qa,clean,setup,test}/SKILL.md frontmatter per the AC-1 table. Mirror the edits into templates/skills/…. Regenerate plugin/skills/ with npx tsx scripts/check-skill-sync.ts --fix.
Run npx vitest run src/lib/__tests__/skill-allowed-tools-gate.test.ts, npm run lint:skill-sync, and npm run lint:skill-calls. WIP commit.
Phase 3: Mutation and PR record
Commit, then re-add Bash(rm:*) to .claude/skills/clean/SKILL.md, confirm the policy case fails, and restore. Put the record in exec's ## Summary, which the runner uses for the PR body (investigation(run): the exec output handed to createPR was not exec's final message — PR #1310 got the placeholder body although exec ended with a full ## Summary #1311): Mutation-verified: AC-2 — re-added Bash(rm:*) to .claude/skills/clean/SKILL.md; <case> failed; restored. and <!-- SEQUANT_MUTATION: {"ac":"AC-2","mutation":"re-add Bash(rm:*) to .claude/skills/clean/SKILL.md","failedTest":"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 placeholder"} -->. The test file path comes first in failedTest, and the case title must match the real test title after any rename.
Add the AC-1 table to the Summary: one row per entry, with the commands that now prompt.
What's the simplest correct approach? Extend the existing gate with one tool list and one allowlist, matching the existing RUNNER_ALLOWLIST idiom. Rejected alternative: a default-deny allowlist of every reviewed grant. The owner deferred it in the 2026-10-05 runner comment, so it does not belong in this PR. That is a deferral, not a design choice in the plan, so no ADR is needed.
"Why not narrow qa's gh api to endpoints?" The annotations call (gh api "$url") can't be expressed as a pattern, and a trailing * still matches -X DELETE.
"Is mv * docs/archive/* actually safe?" The * matches spaces, so a multi-source mv still lands inside the archive tree. That is acceptable, but record it.
Every producer and consumer of the artifact. Producers: .claude/skills/<s>/SKILL.md (source per SKILL_SOURCE_ROOT) and templates/skills/<s>/SKILL.md, both hand-edited. plugin/skills/<s>/SKILL.md is generated by check-skill-sync.ts --fix. Consumers:
Claude Code's permission matcher (interactive only)
skill-allowed-tools-gate.test.ts, which walks SKILL_ROOTS
check-skill-sync.ts, which checks parity
sequant sync/update, which copy the skills to user projects
The skill-sync guard already covers parity across the producers.
Feature Quality Planning
All standard checks pass. Notable items:
Sibling grants (not in scope; recommend a follow-up):clean also grants Bash(git clean:*), Bash(git checkout:*) and Bash(git push:*). git clean -fdx and git checkout -- . destroy work, and git push origin main is what the body runs. The gate passes these because the wildcard follows a subcommand. Same class as gh api:*.
setup runs rm -f …constitution.md.bak and rm -rf ".claude/skills/$dir" with no rm grant. They already prompt, and Claude Code's native rm analyzer covers them. No change.
The UX cost is new prompts in interactive /qa (all-failing CI path), /clean (deletions), and /setup (pipe sed). The PR must list them; this is what AC-1 asks for.
qa gh api: remove, or narrow to endpoints? Recommendation: remove. Impact if wrong: if prompts annoy interactive /qa users, add Bash(gh api repos/{owner}/{repo}/issues/comments*) later. GitHub has no POST/DELETE on that collection path.
Should mv/find/cp join rm/sed in the new gate list? AC-2 names only 4. Recommendation: include them, so the AC-1 decisions can't regress. Impact if wrong: at worst a future skill needs an allowlist line.
Do pipe-stage read-only sed calls prompt without a grant? Unknown. Exec should check once in an interactive session if feasible, or record "unverified" in the AC-1 table.
Recommended Workflow
Phases: spec → exec → qa Quality Loop: disabled Reasoning: A frontmatter edit plus one gate test with a single mutation record. Exec writes the test itself, so testgen adds nothing. No UI, and not security-review sized: the change narrows permissions.
Label Review
Current: enhancement Recommended: enhancement, planned Reason: Matches the plan. No complexity labels are warranted. Quality Loop: Won't auto-enable; scope is OK.
Default-deny allowlist gate follow-up was deferred but never filed — ⚠️ unresolved
clean's destructive git subcommand wildcards are out of scope here and not filed — ⚠️ unresolved
Required CI checks (test, canary) never dispatched on the PR head
The gate only matches exact patterns, so prefix variants bypass it. It rejects only cmd === "<tool> *". I added Bash(rm -rf:*) and Bash(gh api -X:*) to clean/SKILL.md, and the gate still passed 10/10. Those two entries are broader in effect than the ones this issue removed. AC-2 is literally met, but the next regression would most likely look like this. It is the same class as the "Upstream causes §1" comment and the spec's Design Review item 3.
Suggestions:
Reject any FILE_WRITE_TOOLS entry whose cmd starts with <tool> and ends in *, unless it is in the allowlist. Alternatively, file the default-deny gate follow-up that the spec recommended "before merge".
Fix the off-by-one line references in the PR table.
Read the frontmatter diff in all 3 skill roots and the PR table
✅ qa gh api:* removed (every qa gh api call is a GET, but one URL is built at runtime). clean rm/find removed, mv limited to the archive trees. setup cp/cat/sed narrowed. jq kept in setup and test, with a reason
AC-2
Ran skill-allowed-tools-gate.test.ts
✅ 15/15 after the runner fix below
Fixed beyond exec's work (cb3ffdd1): QA found the new rule matched only the exact <tool> * form, so Bash(rm -rf:*) and Bash(gh api -X:*) passed. Those are broader than what this issue removed. The rule now rejects any wildcard entry for gh api/rm/mv/find/sed/cp unless BROAD_ALLOWLIST names it with a reason. The 5 narrowed entries are allowlisted. I mutation-verified it: adding Bash(rm -rf:*) to .claude/skills/clean/SKILL.md failed exactly the .claude/skills case (1 failed / 14 passed), and I restored the file. The marker is in the PR body and parses.
Known limit, stated in the allowlist reason:sed -i.bak * .claude/memory/constitution.md is narrower than sed:*, but * can also match extra file arguments.
Activity
admarble commentedon Oct 4, 2026
Scope update (2026-10-03):
setup'sBash(curl:*)was dropped in PR #1291. The plugin directory portal flagged it under the same hold as #1287, and setup's body never runs curl. The remaining items here areqagh api:*,cleanrm/mv/find,setupsed/cat/cp/jq, andtestjq. The #1287 gate also rejectscurl */wget *now.admarble commentedon Oct 5, 2026
Upstream causes (2026-10-05)
1. #1287's gate rejects only one exact pattern.
src/lib/__tests__/skill-allowed-tools-gate.test.ts:47rejects an entry only whencmd === "<tool> *"for a tool inBROAD_TOOLS. Two consequences:Bash(gh api:*)passes, because the wildcard follows a subcommand.gh apican still send-X DELETEandPATCH.rm,mv,find,sedandcpare not inBROAD_TOOLSat all.The gate encodes the portal's definition of "broad" (it runs code) as a denylist. Commands that can delete or overwrite files are outside that definition, so the gate never sees them. AC-2 adds more names to the denylist. That fixes this round, and the next unlisted command will need its own issue.
Decision for this issue: extend the denylist (AC-2 as written), or switch to an allowlist of reviewed entries, each with a reason, so a new broad entry fails by default. The allowlist costs one review line per new grant.
2.
gh apiinqabypasses the platform layer.qa/SKILL.md:973-979(check-runs, annotations) and:2241-2260(comment-marker reads) callgh apidirectly from the skill markdown.GitHubProvideris meant to owngh. If asequantsubcommand did those reads, the grant could be removed rather than narrowed. A narrow alternative is to grant only the endpoints the skill calls:Bash(gh api repos/*/commits/*/check-runs*)and similar, with no-X.3.
clean'srmandfindfollow from what the skill does. That isn't a design problem. Scope them to the paths the skill cleans, for example worktree dirs and.sequant/artifacts.admarble commentedon Oct 5, 2026
Runner context (2026-10-05, before
sequant run)templates/skills/<name>/SKILL.mdand.claude/skills/<name>/SKILL.md. Regenerateplugin/skills/withnpx tsx scripts/check-skill-sync.ts --fix, then runnpm run lint:skill-sync && npm run lint:skill-calls. The gate walks everySKILL_ROOTSroot.gh api. Everygh apicall inqa/SKILL.mdand itsreferences/is a GET. Narrow the grant to the endpoints those calls use, or remove it and list the new prompts. Don't grant-X.gh api, cleanrm/mv/find, setupsed/cat/cp/jq, testjq. List each command that will now prompt.Phase rules (all phases):
timeout 900, and only after a WIP commit. Otherwise run named vitest files only. NoMonitor, norun_in_background.npm test. Run named vitest files only. CI runs the full suite.## Summary(investigation(run): the exec output handed to createPR was not exec's final message — PR #1310 got the placeholder body although exec ended with a full ## Summary #1311). Put everySEQUANT_MUTATIONmarker in that Summary, in the CLAUDE.md format, with the test file path first infailedTest.npm publish,git tag, a push tomain, or a directory-portal Submit.admarble commentedon Oct 5, 2026
Complexity: Standard (2 ACs, 4 directories:
.claude/skills,templates/skills,plugin/skills,src/lib/__tests__)AC Quality Check
Evidence:clauses and are measurable. AC-1 offers three dispositions: narrow, remove, or keep with a reason. Each entry's recommended disposition is in the plan below, so exec does not have to choose.main,cleangrantsBash(rm:*)and the gate passes, so the mutation (re-addingBash(rm:*)) does not fail today. It fails only once the new rule exists.setup'sBash(curl:*)in PR fix(#1287): skills stop pre-approving broad shell access in allowed-tools #1291, and the gate already rejectscurl *. AC-2 still namesBash(curl:*). Keep it in the literal-entry test as a regression check, but no skill change is needed for it.Scope Assessment
Non-Goals: headless phase permissions, and anything the portal already flagged (#1287).
Verdict: ✅ SCOPE_OK
Acceptance Criteria
AC-1: Each listed grant is narrowed, removed, or kept with a reason
Verification: Manual Test. Review the PR-body table against the frontmatter diff.
Scenario: Given the 9 entries (qa
gh api; cleanrm/mv/find; setupsed/cat/cp/jq; testjq) → when exec edits the frontmatter → then the PR body has one row per entry with its disposition and the commands that will now prompt.Assumptions: These need checking before coding:
*mid-pattern, as inBash(mv * docs/archive/*).Recommended dispositions. Exec may deviate if it records why.
Bash(gh api:*)SKILL.md:973),gh api "$url"for annotations (:979),issues/comments?per_page=100 --paginate(:2260)$(…)/whilepipelines, which likely prompt anyway. Any endpoint pattern with a trailing*also matches an appended-X. The new prompts are bounded: the check-runs path runs only when every check fails. List them in the PR.Bash(mv:*)Bash(mv * docs/archive/*)andBash(mv * scripts/archive/*)Bash(rm:*)rmin the body. Removing.DS_Storefiles and empty dirs is described in prose only.Bash(find:*)findin the body. Scanning uses Glob.find … -delete/-execis the risk.Bash(sed:*)sedin pipes (:78,124,130,133,148), plussed -i.bak "s/{{PROJECT_NAME}}/…/g" .claude/memory/constitution.md(:335)Bash(sed -i.bak * .claude/memory/constitution.md). Don't write{{literally: the gate's AC-3 placeholder rule rejects it. The pipesedcalls prompt or are auto-read-only; record which.Bash(cp:*)cp "$CONST_SRC" .claude/memory/constitution.md(:328),cp -R "$SKILLS_SRC/$dir" ".claude/skills/$dir"(:363)Bash(cp * .claude/memory/constitution.md)andBash(cp -R * .claude/skills/*)Bash(cat:*)cat package.json(:119,249)Bash(cat package.json)Bash(jq:*)Bash(jq:*)jq -r '.run.staleBranchThreshold…' .sequant/settings.json(:124)Bash(jq * .sequant/settings.json).AC-2: The gate rejects
gh api/rm/curl/sedwildcards unless allowlisted with a reasonVerification: Unit Test, mutation-verified.
Scenario: Given
Bash(rm:*)is re-added to.claude/skills/clean/SKILL.md→ whennpx vitest run src/lib/__tests__/skill-allowed-tools-gate.test.tsruns → then the.claude/skillspolicy case fails and namesclean/SKILL.md: Bash(rm:*). Restore, and the test passes.Assumptions:
violation()normalizesX:*toX *, sogh api:*becomesgh api *. This is already true atskill-allowed-tools-gate.test.ts:121.Implementation Plan
Phase 1: Gate first (red)
src/lib/__tests__/skill-allowed-tools-gate.test.ts, addFILE_WRITE_TOOLS = ["gh api", "rm", "mv", "find", "sed", "cp"]. AddBROAD_ALLOWLIST: Record<string, string>(entry → reason), shaped likeRUNNER_ALLOWLIST.violation()returns"file-writing or API wildcard not in BROAD_ALLOWLIST (#1292)"whencmd === "<t> *"and the entry is not allowlisted.curlis already inBROAD_TOOLS.it.eachover the 4 literal entries the AC names (Bash(gh api:*),Bash(rm:*),Bash(curl:*),Bash(sed:*)), assertingviolation()is non-null. This proves the rule without depending on current skill content. Update the file's header doc block.Phase 2: Narrow the grants (green)
.claude/skills/{qa,clean,setup,test}/SKILL.mdfrontmatter per the AC-1 table. Mirror the edits intotemplates/skills/…. Regenerateplugin/skills/withnpx tsx scripts/check-skill-sync.ts --fix.npx vitest run src/lib/__tests__/skill-allowed-tools-gate.test.ts,npm run lint:skill-sync, andnpm run lint:skill-calls. WIP commit.Phase 3: Mutation and PR record
Bash(rm:*)to.claude/skills/clean/SKILL.md, confirm the policy case fails, and restore. Put the record in exec's## Summary, which the runner uses for the PR body (investigation(run): the exec output handed to createPR was not exec's final message — PR #1310 got the placeholder body although exec ended with a full ## Summary #1311):Mutation-verified: AC-2 — re-added Bash(rm:*) to .claude/skills/clean/SKILL.md; <case> failed; restored.and<!-- SEQUANT_MUTATION: {"ac":"AC-2","mutation":"re-add Bash(rm:*) to .claude/skills/clean/SKILL.md","failedTest":"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 placeholder"} -->. The test file path comes first infailedTest, and the case title must match the real test title after any rename.Design Review
Where does this logic belong? The skill frontmatter (the grants) and the existing fix(skills): narrow broad allowed-tools grants — bare Bash, Bash(*), and runner wildcards hold the directory listing for review #1287 gate test. No runtime TypeScript reads
allowed-tools.What's the simplest correct approach? Extend the existing gate with one tool list and one allowlist, matching the existing
RUNNER_ALLOWLISTidiom. Rejected alternative: a default-deny allowlist of every reviewed grant. The owner deferred it in the 2026-10-05 runner comment, so it does not belong in this PR. That is a deferral, not a design choice in the plan, so no ADR is needed.What existing pattern does this follow, and how often has it been re-patched? The denylist gate from fix(skills): narrow broad allowed-tools grants — bare Bash, Bash(*), and runner wildcards hold the directory listing for review #1287, which PR fix(#1287): skills stop pre-approving broad shell access in allowed-tools #1291 extended with
curl/wget. This is the second issue on the class: fix(skills): narrow broad allowed-tools grants — bare Bash, Bash(*), and runner wildcards hold the directory listing for review #1287, then fix(skills): narrow the broad allowed-tools grants the portal didn't flag — qa gh api, clean rm/find, setup curl/sed #1292. Deliberately local, reason: the owner directed "implement AC-2 as written" (runner context, 2026-10-05). The class, an unlisted broad command passing by default, is not yet tracked. Recommend filing the default-deny follow-up before merge. A third issue on this class would cross the ≥2-prior-fixes stop.What would a senior reviewer challenge?
gh apito endpoints?" The annotations call (gh api "$url") can't be expressed as a pattern, and a trailing*still matches-X DELETE.mv * docs/archive/*actually safe?" The*matches spaces, so a multi-sourcemvstill lands inside the archive tree. That is acceptable, but record it.Every producer and consumer of the artifact. Producers:
.claude/skills/<s>/SKILL.md(source perSKILL_SOURCE_ROOT) andtemplates/skills/<s>/SKILL.md, both hand-edited.plugin/skills/<s>/SKILL.mdis generated bycheck-skill-sync.ts --fix. Consumers:skill-allowed-tools-gate.test.ts, which walksSKILL_ROOTScheck-skill-sync.ts, which checks paritysequant sync/update, which copy the skills to user projectsThe skill-sync guard already covers parity across the producers.
Feature Quality Planning
All standard checks pass. Notable items:
cleanalso grantsBash(git clean:*),Bash(git checkout:*)andBash(git push:*).git clean -fdxandgit checkout -- .destroy work, andgit push origin mainis what the body runs. The gate passes these because the wildcard follows a subcommand. Same class asgh api:*.setuprunsrm -f …constitution.md.bakandrm -rf ".claude/skills/$dir"with normgrant. They already prompt, and Claude Code's native rm analyzer covers them. No change./qa(all-failing CI path),/clean(deletions), and/setup(pipesed). The PR must list them; this is what AC-1 asks for.Conflict Risk
qa/setupSKILL.mdbodies, not frontmatter. Expect a textual merge at most, and mirrors regenerate via--fix. Low risk.Open Questions
gh api: remove, or narrow to endpoints? Recommendation: remove. Impact if wrong: if prompts annoy interactive/qausers, addBash(gh api repos/{owner}/{repo}/issues/comments*)later. GitHub has no POST/DELETE on that collection path.mv/find/cpjoinrm/sedin the new gate list? AC-2 names only 4. Recommendation: include them, so the AC-1 decisions can't regress. Impact if wrong: at worst a future skill needs an allowlist line.sedcalls prompt without a grant? Unknown. Exec should check once in an interactive session if feasible, or record "unverified" in the AC-1 table.Recommended Workflow
Phases: spec → exec → qa
Quality Loop: disabled
Reasoning: A frontmatter edit plus one gate test with a single mutation record. Exec writes the test itself, so testgen adds nothing. No UI, and not security-review sized: the change narrows permissions.
Label Review
Current: enhancement
Recommended: enhancement, planned
Reason: Matches the plan. No complexity labels are warranted.
Quality Loop: Won't auto-enable; scope is OK.
admarble commentedon Oct 5, 2026
QA Verdict: AC_MET_BUT_NOT_A_PLUS
AC coverage: 2/2 met
Gaps:
cmd === "<tool> *". I addedBash(rm -rf:*)andBash(gh api -X:*)toclean/SKILL.md, and the gate still passed 10/10. Those two entries are broader in effect than the ones this issue removed. AC-2 is literally met, but the next regression would most likely look like this. It is the same class as the "Upstream causes §1" comment and the spec's Design Review item 3.Suggestions:
FILE_WRITE_TOOLSentry whosecmdstarts with<tool>and ends in*, unless it is in the allowlist. Alternatively, file the default-deny gate follow-up that the spec recommended "before merge".fix(#1292): reject flag-prefixed wildcards for file-writing tools in …
admarble commentedon Oct 5, 2026
Runner verification (2026-10-05): PR #1323
QA returned AC_MET_BUT_NOT_A_PLUS (2/2).
gh api:*removed (every qagh apicall is a GET, but one URL is built at runtime). cleanrm/findremoved,mvlimited to the archive trees. setupcp/cat/sednarrowed.jqkept in setup and test, with a reasonskill-allowed-tools-gate.test.tsFixed beyond exec's work (
cb3ffdd1): QA found the new rule matched only the exact<tool> *form, soBash(rm -rf:*)andBash(gh api -X:*)passed. Those are broader than what this issue removed. The rule now rejects any wildcard entry forgh api/rm/mv/find/sed/cpunlessBROAD_ALLOWLISTnames it with a reason. The 5 narrowed entries are allowlisted. I mutation-verified it: addingBash(rm -rf:*)to.claude/skills/clean/SKILL.mdfailed exactly the.claude/skillscase (1 failed / 14 passed), and I restored the file. The marker is in the PR body and parses.Known limit, stated in the allowlist reason:
sed -i.bak * .claude/memory/constitution.mdis narrower thansed:*, but*can also match extra file arguments.Follow-up ledger:
git clean/checkout/pushwildcards: filed as fix(skills): destructive git wildcards (git push/checkout/clean) pass the allowed-tools gate — decide default-deny #1324.fix(#1292): narrow the broad allowed-tools grants the portal didn't f…
docs(release): bring docs and README up to date for 2.20 (#1343)