Repository navigation
Conversation
Replace bare Bash, Bash(*), tool wildcards and runner wildcards with the subcommands each skill runs; add a frontmatter gate test over all four skill roots. Entire-Checkpoint: 55ad47f69a09
… exact grants, gate rejects git -C/gh -R wildcards Entire-Checkpoint: bb9a68d54186
2 tasks
…ipts, package-manager --version wildcards, curl; gate rejects all three Entire-Checkpoint: 21b8dfad8bd5
…ls-narrow-broad-allowed-tools-grants-bare-
6 tasks
…ls-narrow-broad-allowed-tools-grants-bare-
admarble
deleted the
feature/1287-fix-skills-narrow-broad-allowed-tools-grants-bare-
branch
October 4, 2026 17:38
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
Skills no longer pre-approve broad shell access in
allowed-tools. These entries are gone or narrowed in every skill:BashBash(*)Bash(git *),Bash(gh *),Bash(git:*),Bash(npm run *),Bash(npx *))npx …:*,npm install:*,node -e:*)git -C:*)./scripts/new-feature.sh:*) and package-manager flag wildcards (npm --version:*, which the portal reads as any npm command)curl:*{{PM_RUN}}entryEach list now names the subcommands its skill's body and
references/run. Edits were made in.claude/skills(canonical) and synced totemplates/,skills/andplugin/. A new gate,src/lib/__tests__/skill-allowed-tools-gate.test.ts, checks the frontmatter of every skill in all four roots.Phases started by
sequant runusebypassPermissions, so they are unaffected. Only interactive use changes: see New prompts below.Fixes #1287
AC
Bash,Bash(*), orBash(<gh|git|npm|npm run|npx|…> *)/:*entry in any root. The gate normalizesX:*toX *and also rejectsgit -C/-candgh -R/--repowildcards, where the subcommand falls inside the wildcard.npx/node/tsx/npm install|ci|exec/bash/python/uv runentry ending in*, except the twoRUNNER_ALLOWLISTentries (npx sequant worktree resolve */verify *; the wildcard is an issue number or path). Removed because no body or reference runs them:exec:npx tsc:*,npm install:*upstream:npx tsx *test:npx tsx:*, a per-feature seed pathsetup:node -e:*test'sBash({{PM_RUN}} dev:*)is replaced by literalnpm run dev:*,pnpm dev:*,pnpm run dev:*,yarn dev:*andbun run dev:*. The gate rejects{{anywhere in anallowed-toolsblock. It is scoped to the frontmatter, because the body's{{DEV_URL}}/{{PM_RUN}}still render for consumers viainit.ts.Write/Edit/Skillare kept, each with a reason. See the table./verify+/fullsolverun on a scratch issue. Phase agents run underbypassPermissionsand can't observe prompts. No interactive run was performed.plugin, atfda34ab: the "Pre-approves broad shell access in allowed-tools" hold is gone (11 → 8 policy holds). See Portal result below.Mutation-verified: AC-1 — re-added bare
Bashto .claude/skills/verify/SKILL.md and synced; 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 failed (reported "verify/SKILL.md: Bash — bare Bash (AC-1)", same case in all 4 roots); restored.Mutation-verified: AC-2 — re-added
Bash(npx tsc:*)to .claude/skills/exec/SKILL.md and synced; 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 failed ("runner wildcard not in RUNNER_ALLOWLIST (AC-2)"); restored.Mutation-verified: AC-3 — re-added
Bash({{PM_RUN}} dev:*)to .claude/skills/test/SKILL.md and synced; 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 failed ("unrendered placeholder (AC-3)"); restored.The same case also fails, each with its own reason, when any of these is re-added:
Bash(git -C:*)tospecBash(curl:*)orBash(npm --version:*)tosetupBash(./scripts/new-feature.sh:*)toexecPortal result (AC-6)
The owner's session drove Validate in Claude in Chrome. It was a draft "Submit new" form, never submitted.
fccaab9: the hold had 3 findings, down from 9 onmain:exec:./scripts/new-feature.sh:*,./scripts/cleanup-worktree.sh:*fullsolve: the same two plus./scripts/list-worktrees.sh:*setup:npm/yarn/pnpm --version:*andcurl:*fda34ab: none of these are run by the skill bodies, so all were dropped. The relative scripts are the user's project scripts, and exec's body says never to runnew-feature.sh. The gate now rejects all three forms.fda34ab:Validation passed: 5 warnings, 8 policy holds, and "Pre-approves broad shell access in allowed-tools" is absent.These holds remain, and none is part of this issue:
hooks/post-tool.sh)These notes remain too: "Allowed tools unscoped write" (9) and "Allowed tools skill any" (
fullsolve). They are covered by the AC-4 table.AC-4: bare
Write/Edit/SkillPath-scoped
Write(...)/Edit(...)rules in skill frontmatter weren't verified against the CLI. Scoping them blind risks a silently dead grant, so every row is "kept, with a reason". The path candidates are noted for a later pass./spec,/exec,/test,/qa,/loop. Per-skillSkill(<name>)rules not verified in the CLI.docs/admin/ordocs/features/. Path-scoping candidate..sequant/settings.jsonand.sequant-manifest.json. Path-scoping candidate..sequant/upstream/<version>.md. Path-scoping candidate.references/documentation-tiers.md: project memory)New prompts (interactive use only)
With a broad grant gone, these now ask before running:
/verify: every command it executes. Its job is to run the user's own commands, soBash(*)is now a prompt per command. This is the intended trade-off./fullsolve,/loop,/test: any shell command outside the listedgh/git/npm test/npm run build/worktree-script grants./spec:git -C <path> diff …(per-worktree overlap check). The path sits before the subcommand, so no prefix grant can narrow it./exec:npm install,npx tsc,./scripts/new-feature.sh,./scripts/cleanup-worktree.sh./fullsolve: also./scripts/new-feature.sh,cleanup-worktree.sh,list-worktrees.sh./setup:node -e …andcurl. The body runs neither, nor the npm/yarn/pnpm version checks./improve,/upstream,/assess,/solve,/merger:gh/gitsubcommands outside each skill's new list.Follow-ups
qagh api:*;cleanrm:*/mv:*/find:*;setupsed:*/cat:*/cp:*/jq:*) are tracked in fix(skills): narrow the broad allowed-tools grants the portal didn't flag — qa gh api, clean rm/find, setup curl/sed #1292.qa's semgrep-scan: QA round 1 found thatreferences/semgrep-rules.mdruns it. Restored in this PR as two exact grants with no wildcard (npx tsx scripts/semgrep-scan.tsand… --changed-only).Writefor docs/setup/upstream, andSkill(<name>)for fullsolve: dropped from this PR, reason in the AC-4 table. The owner can reopen them if the AC-6 portal run flags "unscoped write".Test plan
npx vitest run src/lib/__tests__/skill-allowed-tools-gate.test.ts src/lib/__tests__/fullsolve-merge-gate-skill.test.ts: 47/47 passnpm run lint:skill-sync(47 synced),npm run lint:skill-calls(no violations),npx tsc --noEmit: cleanRunner notes
QA round 1 returned AC_NOT_MET. After it, the runner made these changes:
spec'sBash(git -C:*).qa's semgrep-scan as exact grants.fda34ab).docs/reference/permissions.mdnow says frontmatter grants pre-approve rather than restrict.🤖 Generated with Claude Code