Skip to content

chore(settings): allowlist the merge gate, six suites, shellcheck and gh reads - #607

Open
BaseInfinity wants to merge 2 commits into
mainfrom
chore/allowlist-merge-script
Open

chore(settings): allowlist the merge gate, six suites, shellcheck and gh reads#607
BaseInfinity wants to merge 2 commits into
mainfrom
chore/allowlist-merge-script

Conversation

@BaseInfinity

Copy link
Copy Markdown
Owner

Why

The auto-mode classifier refused scripts/merge-pr.sh outright, so a merge cleared by two reviewers could not be executed from the session that earned the clearance. The classifier's own denial message names a Bash permission rule as the remedy; this is that rule.

The entry authorises invoking the gate, not bypassing it. merge-pr.sh still enforces every check it always did — CI green, no test deletions, no version bump, a CERTIFIED clearance artifact at round >= 2 bound to the head SHA, and a byte-match of itself against origin/main.

The rest

From a frequency scan of the 50 most recent session transcripts: six test suites that were being run without an entry, shellcheck, and the gh read subcommands (issue/pr/run/repo) that are not auto-allowed.

Deliberately NOT added

  • python3 (345 uses), bash, codex exec — a wildcard on any of these is arbitrary code execution
  • anything mutating: git add/push/commit/checkout/stash, cp, chmod, mkdir, curl
  • the read-only commands Claude Code already auto-allows — grep, sed, cat, ls, git status/diff/log, gh api GET — where an entry buys nothing

Nothing removed, nothing reordered. deny and ask untouched.

Scope note

Repo-local only. scripts/merge-pr.sh deliberately does not ship, so no consumer inherits either the script or this entry. A proposal to document the allowlist requirement in AI_SETUP_LANES.md was dropped on both reviewers' ruling: it would describe a script consumers never receive, and a classifier that can change under us.

… gh reads

The auto-mode classifier refused `scripts/merge-pr.sh` outright, so a merge
cleared by two reviewers could not be executed from the session that earned the
clearance. Its own denial message names a Bash permission rule as the remedy;
this is that rule. The script still enforces every clearance check — the entry
authorises invoking the gate, not bypassing it.

The rest come from a frequency scan of the 50 most recent session transcripts:
six test suites that were being run without an entry, shellcheck, and the gh
read subcommands (issue/pr/run/repo) that are not auto-allowed.

Deliberately NOT added: python3, bash and codex exec (arbitrary code
execution); anything mutating; and the read-only commands Claude Code already
auto-allows, where an entry buys nothing.
@BaseInfinity

Copy link
Copy Markdown
Owner Author

Refreshed this, then falsified my own premise and dropped it. Recording why, because the finding is more useful than the PR was.

The premise does not reproduce

This PR exists because the auto-mode classifier refused scripts/merge-pr.sh, so a merge cleared by two reviewers could not be executed from the session that earned the clearance.

That no longer reproduces. Today I ran ./scripts/merge-pr.sh 669 --dual-certified to completion from a clean main worktree — with this PR's entry absent from that tree and my refresh stashed. The classifier allowed it. The merge landed.

So the one entry I was calling PROVEN NEEDED is not currently needed, and every other entry in the refresh was already labelled precautionary. That leaves 27 entries with zero demonstrated need, which is config churn, not a change.

How I caught it, and why late

skills/sdlc/SKILL.md:159"FALSIFY YOUR OWN WORK FIRST — the reviewer is not your test phase. A risk worth naming in the prompt was worth testing before you sent it."

I had written a review prompt asking a reviewer to falsify whether Bash(./scripts/merge-pr.sh *) over-grants, without running one falsifier myself. Running the cheapest one — is the entry present in the tree where the gate actually ran? — took one command and killed the premise. This is the same class as the standing rule verify the output, not the input: a settings edit reaches no reviewer, so nothing else would have surfaced it.

What the refresh did find, worth keeping

Independent of the premise, #607 as written had defects:

  • Nine gh read entries that buy nothing. main allowlists zero gh commands, yet gh pr view / run list / pr checks / pr create all ran with no permission prompt. They are already auto-allowed. This PR's own "deliberately NOT added" section states that principle and then violates it.
  • Five duplicate entries — four internal to this PR (shellcheck *, test-version-logic.sh *, test-hook-stdin-bounded.sh *, test-analysis-schema.sh *), plus a fifth duplicating one main already carries.

One genuinely reusable check fell out

Allowlist entries name real paths, so they can go stale when a suite is renamed or deleted — a second source of truth to reconcile against, which is exactly the case SKILL.md:281 says survives the sole-oracle config exemption. Ran it by hand: 45 path-bearing entries, all resolve. No staleness today, so there is nothing to fix and no reason to ship a guard for a problem that has not happened.

Disposition

Closing is the maintainer's call. My recommendation: close it. If the classifier refuses merge-pr.sh again, the entry is one line and the incident will be fresh evidence rather than a nine-day-old memory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant