Skip to content

ci(claude): clarify --allowedTools is convenience, not enforcement#70

Merged
heskew merged 1 commit intomainfrom
workflow/honest-allowlist-comments
May 5, 2026
Merged

ci(claude): clarify --allowedTools is convenience, not enforcement#70
heskew merged 1 commit intomainfrom
workflow/honest-allowlist-comments

Conversation

@heskew
Copy link
Copy Markdown
Member

@heskew heskew commented May 5, 2026

Summary

Mirror of `HarperFast/harper#473`. Same comment fix applied to oauth's `claude-mention.yml` and `claude-issue-to-pr.yml`.

The full rationale is in the harper PR. TL;DR: spike on harper PR #452's failed run found that `Bash(grep -rn …)` calls all executed (`permission_denials: []`) despite not matching any listed `Bash(...:*)` pattern. `--allowedTools` is additive, not exclusive — the listed entries pre-approve specific patterns, but tools not listed still execute in CI's non-interactive mode.

What this PR fixes

The comment block in `claude-mention.yml` and `claude-issue-to-pr.yml` claimed "Tool allowlist is a security boundary." Overstated. Real containment lives in:

  1. Token scope (repo-scoped, no cross-repo reach)
  2. Branch protection on protected refs (`main` / `release_` / `v.x`)
  3. Auth gate (CODEOWNERS-driven HarperFast team check)
  4. Allowed labels list (issue-to-pr only)
  5. Runner ephemerality
  6. Prompt-injection guards in the prompt itself

What this PR does NOT fix

`claude-review.yml` in this repo has the same misleading comment. Not touching it here — it'll be replaced by the caller pattern when `HarperFast/ai-review-prompts#8` (reusable workflow) lands and the oauth migration follows. PR #8 carries the corrected comment in the reusable `_claude-review.yml`.

Test plan

  • No behavior change. Comments-only.
  • Confirm `Auth gate invariants / validate` still passes.

🤖 Generated with Claude Code

Mirror of HarperFast/harper#473. Same fix applied to oauth's
claude-mention.yml and claude-issue-to-pr.yml.

Spike on harper PR #452's failed run found that `Bash(grep -rn …)`
calls all executed (`permission_denials: []`) despite not matching
any listed `Bash(...:*)` pattern. Per claude-code-action's
`docs/configuration.md` v1.0.110: `--allowedTools` is ADDITIVE,
not exclusive — base GitHub tools are always included; tools not
explicitly disallowed still execute. In CI's non-interactive
mode (no `canUseTool` callback set by the action), the SDK's
`default` permission mode falls through to "execute" rather than
prompting.

So the comment block claiming "Tool allowlist is a security
boundary" was overstated. Real containment lives in token scope,
branch protection on protected refs, the CODEOWNERS-driven auth
gate, allowed-labels narrowing (issue-to-pr only), runner
ephemerality, and the prompt-injection guards.

Comments-only. No behavior change.

`claude-review.yml` not touched here for the same reason as in
harper #473 — it'll be replaced by the caller pattern when
HarperFast/ai-review-prompts#8 lands and the oauth migration
follows. Fixing it here is unnecessary churn.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@heskew heskew requested a review from a team as a code owner May 5, 2026 20:19
@claude
Copy link
Copy Markdown

claude Bot commented May 5, 2026

Reviewed; no blockers found.

@heskew heskew merged commit 3967679 into main May 5, 2026
7 checks passed
@heskew heskew deleted the workflow/honest-allowlist-comments branch May 5, 2026 22:17
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