ci(claude): clarify --allowedTools is convenience, not enforcement#70
Merged
ci(claude): clarify --allowedTools is convenience, not enforcement#70
Conversation
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>
|
Reviewed; no blockers found. |
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
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:
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
🤖 Generated with Claude Code