Skip to content

fix(ea1): bound wildcard-tool-access match to a single line and a sta… - #417

Merged
rng1995 merged 1 commit into
NVIDIA:mainfrom
benedictkwok:fix/ea1-wildcard-line-boundary
Aug 24, 2026
Merged

fix(ea1): bound wildcard-tool-access match to a single line and a sta…#417
rng1995 merged 1 commit into
NVIDIA:mainfrom
benedictkwok:fix/ea1-wildcard-line-boundary

Conversation

@benedictkwok

Copy link
Copy Markdown
Contributor

…ndalone asterisk

Two independent EA1 false positives, both confirmed against the official anthropics/skills repo (mcp-builder/SKILL.md):

  • The pattern used bare \s* between the colon and the expected wildcard value. Python's \s matches newlines, so the gap could span a blank line and bridge two unrelated headings ("For each tool:" + blank line + "Input Schema:"). Changed to [ \t]* so the match is bounded to a single line.

  • Nothing required the matched * to be a standalone token, so the first

    • of a closing ** bold-markdown span satisfied it ("API Coverage vs. Workflow Tools:" matched as "Tools:*"). Added a negative lookahead (?!*|\w) so the asterisk must not be immediately followed by another asterisk or a word character.

New test file added (test_ea1_wildcard_line_boundary.py) covering both false-positive cases plus regression tests confirming genuine single-line wildcard grants (tools: "", tools: [], permissions: '*', tools: *) still fire.

Testing:

  • make test (unit + integration): 2804 passed, 31 passed, 0 failed
  • make lint: clean
  • make format: clean

Closes #405

…ndalone asterisk

Two independent EA1 false positives, both confirmed against the official
anthropics/skills repo (mcp-builder/SKILL.md):

- The pattern used bare \s* between the colon and the expected wildcard
  value. Python's \s matches newlines, so the gap could span a blank line
  and bridge two unrelated headings ("For each tool:" + blank line +
  "**Input Schema:**"). Changed to [ \t]* so the match is bounded to a
  single line.

- Nothing required the matched * to be a standalone token, so the first
  * of a closing ** bold-markdown span satisfied it ("**API Coverage vs.
  Workflow Tools:**" matched as "Tools:*"). Added a negative lookahead
  (?!\*|\w) so the asterisk must not be immediately followed by another
  asterisk or a word character.

New test file added (test_ea1_wildcard_line_boundary.py) covering both
false-positive cases plus regression tests confirming genuine single-line
wildcard grants (tools: "*", tools: [*], permissions: '*', tools: *)
still fire.

Testing:
- make test (unit + integration): 2804 passed, 31 passed, 0 failed
- make lint: clean
- make format: clean

Closes NVIDIA#405

Signed-off-by: Benedict Kwok <bkwok.oracle@gmail.com>

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[SkillSpector Review]\n\nApproved. The EA1 boundary change correctly limits whitespace to the current line and rejects wildcard prefixes while preserving true wildcard declarations. The dedicated regression matrix is strong. This overlaps PR #414, so maintainers should merge only the preferred implementation. Current required checks pass.

@rng1995

rng1995 commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

[SkillSpector Maintainer]

Selecting this implementation over #414. Both PRs apply the same production regex correction, but #417 carries the broader focused regression matrix: it also covers a single-newline boundary, an unquoted wildcard grant, and bolded named-tool prose. The reviewed head is clean and all required checks pass.

Merged via the repository's squash convention. Thank you @benedictkwok for the fix, the issue-specific test coverage, and the clear validation notes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants