Repository navigation
fix(security): compare rule-level and partial parser coverage - #91
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A scanner can finish while reporting that one rule/file or source span was not analyzed. Comparing only repository/scanner names could then call a missing observation fixed when those gaps changed.
Coverage fingerprints now include Semgrep's explicit rule/file gaps and partial-parsing file/span positions. The existing comparison guard refuses fixed-observation claims when those fingerprints differ. Malformed gap metadata fails instead of disappearing. Existing run records are not rewritten; retained raw reports can be fingerprinted into a separately documented derived baseline. Observation identifiers and the strict incomplete-run guard stay unchanged.
Validation: 117 tests pass, 98.48% lines / 97.65% statements / 94.83% branches / 98.13% functions. Tests prove changed rule/span coverage blocks fixed claims, malformed gaps fail, and deriving fingerprints leaves raw evidence unchanged. Lint, type checks, docs, build and Bun smoke pass. The raw-report collector also loops over observations instead of spreading an unbounded list into call arguments.