Skip to content

fix: suppress Sigstore certificate payload false positives - #337

Open
koriyoshi2041 wants to merge 1 commit into
NVIDIA:mainfrom
koriyoshi2041:fix-sigstore-certificate-false-positives
Open

fix: suppress Sigstore certificate payload false positives#337
koriyoshi2041 wants to merge 1 commit into
NVIDIA:mainfrom
koriyoshi2041:fix-sigstore-certificate-false-positives

Conversation

@koriyoshi2041

Copy link
Copy Markdown
Contributor

Summary

  • mask only certificate rawBytes inside structurally valid Sigstore v0.3 skill.oms.sig bundles before static pattern matching
  • preserve byte-for-character offsets so findings in every other bundle field keep correct locations
  • keep malformed bundles, differently named files, and non-certificate payloads fully visible to analyzers

Why this approach

Signed skills currently receive SC3 and MP2 findings from base64-encoded DER certificates. Skipping the whole signature file would create a forgeable analysis bypass; this instead implements the narrow field-level suppression suggested in the review of #261. Unknown fields and attacker-controlled content remain scanned.

Closes #336.

Validation

  • uv run pytest tests/nodes/analyzers/test_static_runner_filtering.py tests/nodes/analyzers/test_static_patterns.py tests/nodes/analyzers/test_mp2_regex_backtracking.py -q — 139 passed
  • uv run ruff check src/skillspector/nodes/analyzers/static_runner.py tests/nodes/analyzers/test_static_runner_filtering.py
  • uv run ruff format --check src/skillspector/nodes/analyzers/static_runner.py tests/nodes/analyzers/test_static_runner_filtering.py
  • git diff --check

Risk

The exemption is limited to the exact certificate chain path in a valid v0.3 bundle named skill.oms.sig. It does not verify the signature or attest trust; it only prevents opaque certificate bytes from reaching generic content heuristics.

Signed-off-by: kigland <shuaizhicheng336@gmail.com>
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.

SC3 flags skill.oms.sig as obfuscated code, once per certificate, on every signed skill

1 participant