EA1: YAML block-list and JSON quoted-key wildcard grants are never detected
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 17.9k
- Forks
- 1.5k
- Avg merge
- 5d 10h
- Merged PRs (30d)
- 66
Description
Summary
The EA1 wildcard-tool-access pattern only matches when the * value sits inline after the key on the same starting position. The two most idiomatic real-world encodings of exactly this grant have never matched — in the pre-#417 pattern or the current one:
Case 1: YAML block list
tools:
- "*"
The block-sequence dash is not part of the pattern, so the value branch fails at -. This is the idiomatic frontmatter form for agent/skill manifests (e.g. allowed-tools: style lists).
Case 2: JSON quoted key
"tools": ["*"]
The pattern's key prefix (?:tools?|permissions?)\s*: requires the colon immediately after the key word, so the closing quote of a JSON key breaks the match. MCP server configs and agent manifests are JSON — the quoted-key form is arguably the most common encoding of a wildcard tool grant.
Also related: an inline list where the wildcard is not the first element is missed today:
tools: ["search", "*"]
(the pattern requires the * right after the opening bracket).
Proposed fix
- Allow an optional quote around the key:
['\"]?(?:tools?|permissions?)['\"]?. - Add a block-list branch bounded to a single newline plus one dash item (
:[ \t]*\r?\n[ \t]*-[ \t]+['\"]?\*...) so #405's cross-heading bridge cannot come back — a blank line still breaks the match, and the standalone-*lookahead still rejects markdown bold/italic in the item. - For inline lists, allow a quoted
*anywhere inside the same-line brackets (\[[^\]\r\n]*['\"]\*['\"]). Quoted-only, so markdown link/bold text inside square brackets cannot satisfy it.
Scope note: the block-list branch intentionally matches only the first item. A wildcard buried later in a multi-item block list stays out of scope until there's evidence it occurs in practice — matching arbitrary item positions across lines widens the false-positive surface for markdown lists.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the EA1 wildcard-tool-access pattern and its existing tests, then run the relevant EA1 test suite to establish the current matching behavior. Add coverage for YAML block lists, quoted JSON keys, and non-first inline wildcard items while preserving the stated newline, quote, and markdown boundaries; done means these grants match without reintroducing cross-heading or markdown false positives.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100