fix: wire allowed_tools/disallowed_tools inputs through to Claude SDK
The disallowed tools env var read in run.ts was DISALLOWED_TOOLS_INPUT (raw user input) instead of DISALLOWED_TOOLS (computed value including WebSearch/WebFetch defaults). This meant default tool disallowance was never enforced. Also removes orphaned ALLOWED_TOOLS env var export from createPrompt() (tag mode passes allowed tools via claudeArgs instead), extracts shared parseToolsInput utility to eliminate duplication, and adds tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
29a1032aa6
commit
df7afc08d4
7 files changed
+112
-8
No files matched your search
+11
@@ -77,6 +77,14 @@ inputs:
|
||||
required: false
|
||||
default: "false"
|
||||
|
||||
allowed_tools:
|
||||
description: "Comma-separated list of additional tools to allow (e.g., 'WebSearch,WebFetch,Bash(npm test:*)'). These are merged with the default tag-mode tools."
|
||||
required: false
|
||||
default: ""
|
||||
disallowed_tools:
|
||||
description: "Comma-separated list of tools to disallow (e.g., 'WebSearch'). Overrides defaults."
|
||||
required: false
|
||||
default: ""
|
||||
claude_args:
|
||||
description: "Additional arguments to pass directly to Claude CLI"
|
||||
required: false
|
||||
@@ -254,6 +262,9 @@ runs:
|
||||
INCLUDE_FIX_LINKS: ${{ inputs.include_fix_links }}
|
||||
ADDITIONAL_PERMISSIONS: ${{ inputs.additional_permissions }}
|
||||
CLAUDE_ARGS: ${{ inputs.claude_args }}
|
||||
# _INPUT suffix = raw user input; createPrompt() computes DISALLOWED_TOOLS from these
|
||||
ALLOWED_TOOLS_INPUT: ${{ inputs.allowed_tools }}
|
||||
DISALLOWED_TOOLS_INPUT: ${{ inputs.disallowed_tools }}
|
||||
ALL_INPUTS: ${{ toJson(inputs) }}
|
||||
|
||||
# Base-action inputs
|
||||
|
||||
Reference in new issue
Block a user