Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(references): reject quoted version numbers as file references - #525

Open
goodhee wants to merge 1 commit into
NVIDIA:mainfrom
goodhee:fix/524-quoted-version-metadata-reference
Open

fix(references): reject quoted version numbers as file references#525
goodhee wants to merge 1 commit into
NVIDIA:mainfrom
goodhee:fix/524-quoted-version-metadata-reference

Conversation

@goodhee

@goodhee goodhee commented Sep 11, 2026

Copy link
Copy Markdown

Summary

  • reject quoted/code-span reference candidates whose extension is purely
    numeric (e.g. "1.2", "v1.2", "1.2.0-beta.1")
  • add a regression test covering quoted version metadata

Before this change, metadata.version: "1.2" in SKILL.md frontmatter matched
the quoted-path pattern (name="1", ext="2") and was treated as a missing
local file reference, flipping an otherwise clean scan from
SAFE/is_complete: true to CAUTION/is_complete: false.

Fixes #524.

Testing

  • uv run pytest tests/nodes/test_security_remediation.py -q (310 passed)
  • uv run ruff check src/ tests/
  • uv run ruff format --check src/ tests/

metadata.version values like "1.2" matched the quoted/code-span path
pattern (name="1", ext="2"), so a version-only metadata field made an
otherwise clean scan report is_complete=false and raised the
recommendation from SAFE to CAUTION. Reject candidates whose
extension is purely numeric ("1.2", "v1.2", "1.2.0-beta.1"), since
real file extensions are never all digits.

This is the same class of ambiguity as NVIDIA#451 for NVIDIA#450: a bare version
number is indistinguishable from a root-level file name without
another path signal, so this only narrows the existing quoted/code
path pattern rather than trying to fully disambiguate intent.

Fixes NVIDIA#524.

Signed-off-by: goodhee <[email protected]>
@goodhee
goodhee force-pushed the fix/524-quoted-version-metadata-reference branch from f785d45 to 1f2739f Compare September 11, 2026 01:52

@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]

Reviewed head 1f2739f1fbe004fa10a3a8a809609f25473a646c — REQUEST_CHANGES.

  • src/skillspector/references.py:137: the numeric-suffix heuristic rejects real paths, including paths with an explicit directory signal such as docs/tool.1. Numeric extensions are valid (manual pages and numbered artifacts are common), and this rejection happens before the resolver can check known_paths, so a shipped, explicitly referenced file becomes invisible to reference coverage. Apply the version heuristic only to genuinely ambiguous metadata tokens, or first preserve candidates that resolve to a known bundled path. Add a regression for a known docs/tool.1 reference.

Required checks pass, but the correctness regression and mergeStateStatus=BEHIND block merging.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Quoted version metadata creates a false missing-file reference and changes score 0 from SAFE to CAUTION

2 participants