Skip to content

fix(security): fall back to managed SkillSpector for suffixed versions - #903

Open
cby0730 wants to merge 3 commits into
NVIDIA:mainfrom
cby0730:fix/skillspector-version-suffix
Open

cby0730 wants to merge 3 commits into
NVIDIA:mainfrom
cby0730:fix/skillspector-version-suffix

Conversation

@cby0730

@cby0730 cby0730 commented Nov 26, 2026

Copy link
Copy Markdown

Summary

Automatically discovered SkillSpector builds with a version suffix, such as
2.13.7.post1 or 2.13.7+local, passed the >= 2.13.7 stable-release check
added in #901. SkillSpector reports that same importlib.metadata version in
metadata.skillspector_version. The security validator requires a plain X.Y.Z
(SEMVER_RE.fullmatch, security.py around 4175) and, when it matches, splits
the string into an integer tuple (around 4182). The Tier 1 security scan
therefore ended incomplete instead of falling back to the managed pinned
runtime.

A stock SkillSpector 2.13.7 install reports 2.13.7 and is still accepted.
Developmental versions were already rejected by Version.is_prerelease.

_accept_skillspector_candidate now also requires the discovered version to
match the existing SEMVER_RE, so discovery accepts only versions the
validator accepts. I tightened discovery rather than relaxing the validator
because the validator parses the version as three integers. Explicit
SKILLEVALUATOR_SKILLSPECTOR_PATH overrides are unchanged.

#901 is unreleased, so instead of a new Fixed entry this updates #901's
Changed entry, and the matching sentence in docs/installation-options.mdx.

Fixes #902

Verification

  • I am familiar with the Contributing Guidelines

  • Added or updated focused tests

  • Updated documentation for user-visible changes

  • Ran make lint

  • Ran make test

  • Ran make build

  • Did not add credentials, private datasets, or proprietary benchmark content

  • Added SkillSpector v2.13.7.post1 and SkillSpector v2.13.7+local to the
    parametrized test_unsupported_or_unverified_version_runs_pinned_wheel. Both
    fail on main (the discovered scanner runs) and pass with this change.
    tests/utils/test_tool_runner.py: 79 passed.

  • fern check reports 0 errors. Its only warning is the unauthenticated
    redirects check.

  • The full suite does not pass in this environment. uv run pytest -q -n auto
    (CI's command) reported failures that also fail on unmodified main at
    5efcbac: Harbor secure-environment tests that require a Docker executable,
    and test_windows_transfer_repeated_cancellation_reaps_process_and_removes_partial_output,
    which hangs on main as well. None are in the tool-runner or SkillSpector
    version tests. I'm relying on CI for a green full suite.

Release Impact

  • No user-visible release note needed
  • Updated CHANGELOG.md

Signed-off-by: cby0730 <85448144+cby0730@users.noreply.github.com>
Comment thread src/skillevaluator/utils/tool_runner.py Resolved

@chrisknvidia chrisknvidia 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.

I took a second look at this one. I reproduced the problem on main with a stub scanner on PATH reporting SkillSpector v2.13.7.post1 and v2.13.7+local: discovery kept the stub and ran it. At this head both switch to the managed 2.13.7 wheel, a plain 2.13.7 on PATH still runs directly, and the decision now agrees with the validator's SEMVER_RE for every shape I tried (rc, dev, post, local, epoch, two- and four-part, leading zeros), so any version discovery accepts is one the report check will also accept. The fallback fails closed too: with no uv and no cached wheel the run ends with the configuration error about the pinned runtime, with uv present but the wheel unavailable it surfaces that error, and the --version probe output is never returned as a success for a rejected candidate. Both new parametrized cases fail against main's tool_runner and pass at head. Not blocking: with the SEMVER_RE gate in front, Version() can no longer raise InvalidVersion and is_prerelease is always false, so the try/except and that condition are dead now and could be dropped. I agree with the open thread that the warning should name the version format as the reason, since expected a stable release >= 2.13.7 reads as satisfied by 2.13.7.post1.

Signed-off-by: cby0730 <85448144+cby0730@users.noreply.github.com>
…allback

Signed-off-by: cby0730 <85448144+cby0730@users.noreply.github.com>
@cby0730

cby0730 commented Nov 26, 2026

Copy link
Copy Markdown
Author

700b512 already names the plain X.Y.Z format in the shared warning, so both the managed fallback and an unavailable runtime say why a suffixed PATH install was skipped. be3c15a removes the try/except InvalidVersion and the is_prerelease check; with SEMVER_RE in front they could not change the result, so discovery behavior is the same.

This branch has not been deployed

No deployments
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.

[BUG]: Tier 1 runs a discovered SkillSpector 2.13.7.post1 or 2.13.7+local and the security scan ends incomplete

2 participants