Skip to content

chore(claude): add read-only permission allowlist#88

Merged
hyperpolymath merged 2 commits into
mainfrom
worktree-chore+permission-allowlist
Jul 17, 2026
Merged

chore(claude): add read-only permission allowlist#88
hyperpolymath merged 2 commits into
mainfrom
worktree-chore+permission-allowlist

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

What

Adds .claude/settings.json with a small permissions.allow list, derived from scanning the 50 most-recently-modified session transcripts (~1,734 Bash calls) in ~/.claude/projects/.

# Pattern Count Notes
1 Bash(uuidgen *) 31 deterministic/namespaced UUID generation, no side effects
2 Bash(git ls-tree *) 14 read-only git plumbing used in repo sweeps
3 Bash(asciidoctor --version) 6 exact form only — toolchain presence check

Why the list is short

The scan's main finding is that the allowlist was never the bottleneck. After filtering, almost all repeated Bash traffic falls into one of three buckets:

  • Already auto-allowedecho, grep/rg, ls, head/tail, wc, find, sed, sort, jq, plus every read-only git (status, log, diff, show, branch, worktree list) and gh (pr view, repo view, api GET) subcommand. These never prompt, so an entry would be inert.
  • Mutatingrm (86), git add (55), git commit (50), cp (49), git push (45), mkdir (41), chmod, tee. Excluded by design.
  • Arbitrary code executionawk (73), python3 (60), bash (48), powershell.exe (27), just (17), deno, idris2. Excluded on principle: a wildcard on any interpreter or task runner grants the same power as a shell.

awk is the notable judgement call — it's the single most-used non-auto-allowed command, but awk has system() and print > file, which makes Bash(awk *) an arbitrary-execution grant rather than a text-processing one.

Two things worth a look

  1. Bash(python3 *) is already allowed in .claude/settings.local.json. That is a standing arbitrary-code-execution grant. Worth removing if it wasn't a deliberate trade.
  2. settings.local.json has ~15 one-off rg entries (Bash(rg -rn "sustainabot" -i /path -l) and similar) — exact-command approvals that will never match a second time. They're harmless but dead weight; rg is auto-allowed anyway.

Scope

No deny / ask entries; no other settings touched. .claude/settings.json is tracked (only *.local.json is gitignored), so this applies to anyone cloning the repo.

🤖 Generated with Claude Code

Scanned the 50 most recent session transcripts for repeated tool calls.
Nearly all of the observed Bash traffic is already auto-allowed by Claude
Code (echo/grep/ls/head/git status/git log/gh pr view/...), so only three
patterns clear the bar of "repeated, read-only, and not already allowed".

Deliberately excluded: awk, python3, bash, powershell.exe, just, deno,
idris2 (interpreters / task runners — a wildcard on any of these is
equivalent to allowing arbitrary code execution), and all mutating
commands (rm, cp, mkdir, chmod, tee, git add/commit/push/worktree).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 282 issues detected

Severity Count
🔴 Critical 44
🟠 High 133
🟡 Medium 105

⚠️ Action Required: Critical security issues found!

View findings
[
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/tools/auth-method-batch-fix/main.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/tools/category-batch-fix/main.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/tools/missing-fields-batch-fix/main.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/tools/cartridge-minter/mint.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/tools/validate-cartridges/main.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/tools/validate-cartridges/main_test.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/cartridges/domains/code-quality/sanctify-mcp/adapter/mod.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/cartridges/domains/infrastructure/hesiod-mcp/adapter/mod.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/cartridges/domains/research/bofig-mcp/adapter/mod.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/cartridges/domains/research/academic-workflow-mcp/adapter/mod.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

@hyperpolymath
hyperpolymath marked this pull request as ready for review July 17, 2026 10:42
@hyperpolymath
hyperpolymath enabled auto-merge (squash) July 17, 2026 10:42
@hyperpolymath
hyperpolymath disabled auto-merge July 17, 2026 10:42
@hyperpolymath
hyperpolymath merged commit d1454f7 into main Jul 17, 2026
26 of 27 checks passed
@hyperpolymath
hyperpolymath deleted the worktree-chore+permission-allowlist branch July 17, 2026 10:42
@github-actions

Copy link
Copy Markdown

🔍 Hypatia Security Scan

Findings: 282 issues detected

Severity Count
🔴 Critical 44
🟠 High 133
🟡 Medium 105

⚠️ Action Required: Critical security issues found!

View findings
[
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/tools/auth-method-batch-fix/main.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/tools/category-batch-fix/main.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/tools/missing-fields-batch-fix/main.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/tools/cartridge-minter/mint.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/tools/validate-cartridges/main.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/tools/validate-cartridges/main_test.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/cartridges/domains/code-quality/sanctify-mcp/adapter/mod.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/cartridges/domains/infrastructure/hesiod-mcp/adapter/mod.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/cartridges/domains/research/bofig-mcp/adapter/mod.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  },
  {
    "reason": "TypeScript file detected -- banned language",
    "type": "banned_language_file",
    "file": "/home/runner/work/boj-server-cartridges/boj-server-cartridges/cartridges/domains/research/academic-workflow-mcp/adapter/mod.ts",
    "action": "flag",
    "rule_module": "cicd_rules",
    "severity": "critical"
  }
]

Powered by Hypatia Neurosymbolic CI/CD Intelligence

hyperpolymath added a commit that referenced this pull request Jul 17, 2026
…y) (#92)

Follow-up to #88 (read-only permission allowlist, merged). A second
`/fewer-permission-prompts` pass over the 50 most-recent transcripts
(2,132 Bash calls) surfaced two more repeated, read-only,
not-already-allowed, non-arbitrary-execution entries:

| Pattern | Count | Notes |
|---------|-------|-------|
| `Bash(actionlint *)` | 16 | GitHub Actions workflow linter — pure
static analysis, no execution; heavily used by the ongoing CI/CD cleanup
campaign |
| `mcp__claude-in-chrome__get_page_text` | 3 | read-only page-text read
|

Deliberately excluded (same discipline as #88): mutation (`rm`, `git
add/commit/push`, `cp`, `mkdir`, `chmod`), arbitrary execution
(`python3`, `awk`, `bash`, `powershell.exe`, `idris2`, `zig`, `just`,
`curl`), and `asciidoctor *` (it *writes* rendered output — only the
already-listed `asciidoctor --version` is read-only).

Base `.claude/settings.json` already carried the three #88 entries; this
adds two, no removals.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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