Skip to content

Bash:* wildcard permission not working in settings.local.json #3428

Closed

Description

@o2alexanderfedin

Description

The "Bash:*" wildcard permission in .claude/settings.local.json does not allow all bash commands as expected. Even with this permission set, Claude still prompts for approval for individual bash commands.

Steps to Reproduce

  1. Add "Bash:*" to the allow list in .claude/settings.local.json
  2. Restart Claude
  3. Try to run any bash command (e.g., ls, cp, etc.)
  4. Claude still shows permission prompt

Expected Behavior

"Bash:*" should allow all bash commands without prompting for permission.

Actual Behavior

Permission prompts still appear for each bash command, requiring manual approval or selection of option 2 to allow commands for specific directories.

Configuration

{
  "permissions": {
    "allow": [
      "Bash:*",
      "Read",
      "Write",
      "Edit",
      "MultiEdit",
      "Glob",
      "Grep",
      "LS",
      "TodoRead",
      "TodoWrite",
      "WebFetch",
      "WebSearch",
      "NotebookRead",
      "NotebookEdit",
      "Task",
      "exit_plan_mode",
      "mcp__*"
    ],
    "deny": []
  }
}

Environment

  • OS: macOS
  • Claude Code installation via official app

Additional Context

This appears to be a bug in how Claude interprets the wildcard permission syntax. The mcp__* wildcard works correctly for MCP tools, but Bash:* does not work for bash commands.

Activity

  1. added
    bug
    has repro
    platform:macos
    on Jul 13, 2025
  2. xshapira commented on Jul 13, 2025

    @xshapira

    Description

    The "Bash:*" wildcard permission in .claude/settings.local.json does not allow all bash commands as expected. Even with this permission set, Claude still prompts for approval for individual bash commands.

    Steps to Reproduce

    1. Add "Bash:*" to the allow list in .claude/settings.local.json
    2. Restart Claude
    3. Try to run any bash command (e.g., ls, cp, etc.)
    4. Claude still shows permission prompt

    Expected Behavior

    "Bash:*" should allow all bash commands without prompting for permission.

    Actual Behavior

    Permission prompts still appear for each bash command, requiring manual approval or selection of option 2 to allow commands for specific directories.

    Configuration

    {
    "permissions": {
    "allow": [
    "Bash:",
    "Read",
    "Write",
    "Edit",
    "MultiEdit",
    "Glob",
    "Grep",
    "LS",
    "TodoRead",
    "TodoWrite",
    "WebFetch",
    "WebSearch",
    "NotebookRead",
    "NotebookEdit",
    "Task",
    "exit_plan_mode",
    "mcp__
    "
    ],
    "deny": []
    }
    }

    Environment

    • OS: macOS
    • Claude Code installation via official app

    Additional Context

    This appears to be a bug in how Claude interprets the wildcard permission syntax. The mcp__* wildcard works correctly for MCP tools, but Bash:* does not work for bash commands.

    Instead of:
    Bash:*

    You should try this:
    Bash(*) or Bash(*:*)

  3. rboyce-ant commented on Jul 13, 2025

    @rboyce-ant
    Contributor

    That's not valid syntax. Claude Code doesn't actually support wildcards, the Bash(cmd:*) syntax is just for prefix matching. If you want to allow all Bash commands, simply add the full tool Bash as an allow rule.

  4. dreamerhyde commented on Jul 22, 2025

    @dreamerhyde

    Has this issue been resolved? Recently, using the * symbol still has no effect.

  5. github-actions commented on Jul 29, 2025

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  6. locked as resolved and limited conversation to collaborators on Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:securityarea:toolsbughas reproplatform:macos

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions