[FEATURE] Support wildcards for piped bash commands in permissions

Resolved 💬 1 comment Opened Dec 2, 2025 by fr-mccarty Closed Dec 2, 2025

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Problem

The current permission system doesn't support granting
permission to piped bash commands without being either too
specific or too general.

## Current Behavior

  • "Bash(tail:*)" - Only matches tail commands without pipes
  • "Bash(tail * | grep *)" - Not supported (wildcards in middle

of commands)

  • "Bash(tail -50 file.txt | grep pattern)" - Too specific,

must list every exact command

  • "Bash" - Too general, grants all bash access

Proposed Solution

## Desired Behavior
Support permission patterns like:

  • "Bash(tail:* | *)" - Allow any tail command piped to

anything

  • "Bash(* | grep:*)" - Allow any command piped to grep
  • "Bash(tail:* | grep:*)" - Allow tail piped to grep

specifically

## Proposed Solution
Extend the permission syntax to support pipe operators with
wildcards, allowing granular control over compound commands
while maintaining security.

Alternative Solutions

  1. "Bash(tail | grep )" - Rejected by settings validation with error: "Wildcards in the middle of commands are not supported"
  2. "Bash(tail | )" - Same validation error (wildcards in middle not supported)
  3. "Bash(cat | grep )" - Same validation error
  4. "Bash(grep | )" - Same validation error
  5. "Bash(tail:*)" (prefix matching) - Already in config, but doesn't work for piped commands. The permission system treats tail -50 file.txt | grep pattern as a different command type

than tail -50 file.txt

  1. Exact command string: "Bash(tail -50 /tmp/test-output.log | grep -A 20 \"failed\\|passed\")" - Would work but too specific, doesn't help with command variations
  2. "Bash" (unrestricted) - Would work but too permissive, grants all bash access

Priority

Medium - Would be very helpful

Feature Category

CLI commands and flags

Use Case Example

## Use Case
Inspecting test output with commands like tail -50
/tmp/test-output.log | grep -A 20 "failed\|passed"
requires
clicking "Allow" every time, but granting full "Bash"
permission is too permissive.

Additional Context

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗