fix: suppress Sigstore certificate payload false positives - #337
fix: suppress Sigstore certificate payload false positives#337koriyoshi2041 wants to merge 1 commit into
Conversation
Signed-off-by: kigland <shuaizhicheng336@gmail.com>
|
Heads-up from an independent check, in case it saves a rebase surprise: #261 merged to Measured on three real catalog bundles (they carry
So the certificate masking here does reduce the noise (4→1) and clears #336's synthetic bundle, but each real bundle keeps one For context, the design lineage still looked live rather than settled at merge: #261's review flagged that a structural-only exemption is forgeable (a plausible unverified bundle could hide content from every analyzer), and field-level masking — this PR's shape — is the direction that avoids whole-file exclusion. If maintainers want that hardening on top of #261, this branch would need a rebase onto the recognizer plus coverage of the non-certificate base64 fields. Maintainers' call — just flagging the merge and the real-bundle numbers. |
Hey sorry yes I noticed these two PRs had some overlap. I meant to also put a comment here yesterday.Thanks for the thoughtful alternative, especially the offset-preserving masking and tests that keep unrelated bundle fields visible. We had an internal review with our security SMEs, we chose the design implemented in #261 instead. The agreed boundary is that a recognized root-level We intentionally do not treat that recognition as signature authentication. Full verification needs publisher-trust configuration and adds a tight dependency on the signing ecosystem, while still not eliminating all publisher-controlled metadata fields. Authenticity of signatures should be established by a downstream signature-verification workflow. Given that decision, certificate-only masking would create a different, static-analyzer-specific policy while other analysis stages see different content. We prefer the single, transparent scope boundary in #261. We’ll therefore proceed with #261 rather than this alternative. Thanks again for the careful implementation and for spelling out the trade-offs. |
|
I'm closing this PR but pls do feel free to followup if you think we should still consider this. |
Summary
rawBytesinside structurally valid Sigstore v0.3skill.oms.sigbundles before static pattern matchingWhy 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 passeduv run ruff check src/skillspector/nodes/analyzers/static_runner.py tests/nodes/analyzers/test_static_runner_filtering.pyuv run ruff format --check src/skillspector/nodes/analyzers/static_runner.py tests/nodes/analyzers/test_static_runner_filtering.pygit diff --checkRisk
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.