Bash permission glob wildcard (*) does not match double quote characters

Resolved 💬 4 comments Opened Mar 27, 2026 by AmaralVini Closed Mar 27, 2026

Summary

The * wildcard in settings.local.json Bash allow rules fails to match commands containing double quote characters ("), regardless of quoting style.

Reproduction

Given this allow rule:

"Bash(grep *)"

These commands are auto-allowed (no prompt):

  • grep -h type file.json | sort -u
  • grep -h \"type\" file.json | head -5 (unquoted escaped — shell strips \)

These commands prompt for permission despite matching the pattern:

  • grep -h '"type":' file.json — single quotes wrapping double quotes
  • grep -oP "\"type\"\s*:\s*\"[^\"]*\"" file.json — escaped double quotes inside double quotes

Additional finding

&& chains are correctly split and each command is matched individually — this is expected. But within each segment, * still cannot match through ".

Impact

Any Bash command with literal " in arguments triggers a permission prompt, even when the command prefix is explicitly allowed. This affects jq filters, grep patterns, awk scripts, sed expressions, and any tool that takes quoted strings.

There is no workaround — shell variable assignment (filter='...'; cmd "$filter") also contains " and triggers the same issue.

Expected behavior

* in permission glob patterns should match all characters including ".

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗