Repository navigation
fix(tier1): gate unmodeled hooks and explain AE1 reference gaps - #459
Conversation
…issing references SkillSpector marks the analysis partial when the skill's instructions name a file the skill does not bundle, such as a file it writes at run time, although every bundled file is still inspected. The Tier 1 security scan then stopped as INCOMPLETE. Accept such a report with a warning when every ledger row is a nonfatal reference_resolution row: reference_missing on any version, or, before SkillSpector 2.12.0, reference_unresolved whose line the report's references list records as missing. Each row must name exactly one listed component that is a regular, single-link file under the scanned root, reached without following a link. The report must also have no partially or entirely uninspected file, no filtered finding, no limitation, no fatal scope exclusion, and universal analyzers that completed every component. A reference that matches several bundled files stays INCOMPLETE. The path check, row predicate and warning text are module-level helpers so later SkillSpector report rules can reuse them. Tests use real offline SkillSpector 2.11.2, 2.12.0 and 2.13.3 reports. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
… left out of the scan SkillEvaluator scans a copy of the skill without artifact directories such as evals/, versions/ and node_modules/, and SkillSpector leaves links out of its inventory. A reference to a script there is reported as missing, so the missing-reference rule turned an INCOMPLETE scan into a pass although the script was never inspected. A missing-reference row is now accepted only when: - the report's references list records a missing reference on the row's line, for every SkillSpector version, and that entry's evidence matches the line read from the scanned file; - that line names no entry of the skill that SkillSpector did not inspect: a link, a file the report does not list, or the outermost directory that holds no listed file, and every file inside such a directory. Names are compared case-folded, as written and in NFC, with Markdown escapes removed and with percent-escapes decoded, and must not adjoin another name character. The walk does not follow links and stops at 50,000 entries. A single-file scan root is now read through SecureRoot too, so it must be a single-link file of at most 1,000,000 bytes. A lone SKILL.md is scanned this way, and SkillSpector 2.13.3 reports every reference in it as missing. The warning now says that every file SkillSpector scanned was inspected and that those lines name no file left out of the scan. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
A skill whose SKILL.md shows an image and names a file it writes at run time got both gaps in one partial SkillSpector report, and stayed INCOMPLETE because each rule required its gap to be the only one. _skillspector_missing_reference_notes now separates the reference rows. They pass the same checks as before; the other rows must be referenced images that _skillspector_passive_raster_note accepts, which accounts for the counts, analyzers and limitations. The scan then carries both warnings. A report with images only still goes to the image rule alone. The new fixture is a real SkillSpector 2.13.3 --no-llm report of such a skill. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d why The docs and CHANGELOG said that every bundled file is inspected and that the warning quotes the references. SkillEvaluator leaves artifact directories out of the scanned copy, and the warning names only the file and line, so both now say what is checked: the references list, the line, and the files and directories left out of the scan. They also say that missing references may come with accepted referenced images, that the rule covers SkillSpector v2.10 to v2.13.3, and that v2.13.4 and later report these scans as complete_with_caveats, which is not accepted yet. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nned files Follow-ups to accepting SkillSpector missing references: - A single-file scan root, such as `security-scan path/to/SKILL.md`, now counts every entry beside the file as not inspected, because SkillSpector scans that file alone. Before, a line that named a script beside it passed. - A directory that holds an uninspected entry (an unlisted file, a link or a left-out subtree) is named too, even when it also holds listed files. - A left-out `.git` directory counts by its own name and its hooks other than `*.sample` templates, so `config`, `HEAD` or branch names no longer keep a scan INCOMPLETE. - When the validator's `skillspector_reference_root` is not the scanned root, as for a skill scanned inside a plugin, a missing reference is never accepted, because the line may name a file elsewhere in that artifact. - Tests for each case, and a unit test that patches `stat_is_link_or_reparse` so the reparse-point branch is covered on every OS. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
… missing references - A lone file is scanned on its own, so a line that names a file beside it keeps the scan INCOMPLETE. - A skill scanned on its own inside a plugin keeps its missing references INCOMPLETE. - Only `.git` itself and its active hooks count as names inside `.git`, and a directory that holds a left-out entry counts too. - No finding may be filtered out, for example by `--skillspector-baseline`. - When one check covers several skills, such as `security-scan` on a folder, a passing skill is listed without its warnings. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…er scan `security-scan` on a folder, and `validate` or `tier1` on a folder without a configured reference root, scan each skill found in it on its own. A line in such a skill may name a file elsewhere in the folder, such as a plugin's `scripts/install.sh`, that the skill's scan never inspects, yet the missing-reference rule accepted it because the reference root was unset. While a target that is a directory but not a skill is walked, use it as the reference root, so those skills' missing references keep the scan INCOMPLETE as on main. A skill directory, a lone file and a folder with no skill (scanned as a whole) are unchanged. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…cter reference resolved The check that a missing reference's line names no file left out of the scan removed only the escapes SkillSpector strips itself (`\\`, `\(`, `\)`, `\<`, `\>`). A Markdown renderer also resolves a backslash escape of any ASCII punctuation and HTML character references, so `[the setup script](node\_modules/run\_all.sh)` or `[the setup script](versions/install.sh)` named a left-out file and still passed. Also read the line with backslash escapes of all ASCII punctuation removed, HTML character references resolved and percent-escapes decoded, up to three of these steps in any order, so either line keeps the scan INCOMPLETE. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ges and for a lone file The warning said "every file SkillSpector scanned was inspected", which is not true when an accepted referenced image is the other gap: the next warning says SkillSpector's text analyzers could not read it. It also said "Files outside the skill were not scanned", although for a lone SKILL.md the files beside it inside the skill are not scanned either. Say instead that SkillSpector reported no other gap for these references, and that files not in the scan, including any outside the scanned path, were not inspected. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ditions The docs and CHANGELOG said that a scan in which `--skillspector-baseline` suppresses a finding stays INCOMPLETE. SkillSpector 2.10.0 to 2.13.3 count findings after filtering as every finding up to the report cap, so a baseline does not change `findings_before_filtering` or `findings_after_filtering`; such a scan passes with the missing-reference warning and the baseline's suppression note. State the actual condition, that the two counts match. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nces accepted A folder that holds no skill is scanned as one target, so it is its own reference root and the folder-scan rule leaves its accepted missing references unchanged. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…scan The folder rule set a reference root only while a folder was walked, so a scan run outside validate() or validate_security_only(), such as a direct per-directory _run_skillspector() call on one partition of a larger tree, still had no root and accepted missing references that main keeps INCOMPLETE. Record the resolved target for every walk instead, and accept missing references only when the reference root (the configured skillspector_reference_root, or else that target) is the scanned directory. A skill directory, a lone file and a folder with no skill are their own target; a skill found inside a folder is not; a scan with no known target accepts none. _skillspector_missing_reference_notes now requires reference_root. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…erence-root docstring The `skillspector_reference_root` docstring describes its default for finding scoping, the scanned directory. The missing-reference rule uses a different default, the whole target of validate() or validate_security_only(); say so next to it. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…for missing references SkillSpector 2.13.4 reports a scan whose only gaps are missing references as complete_with_caveats instead of partial. The security check rejected that status as not recognized, so a skill naming a file it does not bundle was INCOMPLETE with 2.13.4 or later on PATH. Recognize the status from 2.13.4 on. Accept its caveats only when every one is a reference_missing row and they pass the missing-reference rule already applied to partial reports, then show the same warning. Anything else keeps the scan INCOMPLETE with an error naming up to three caveats. The report stays complete, so a LOW report must still say SAFE and its findings are checked as usual. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ejected A complete_with_caveats report whose missing-reference caveats fail the rule for a partial report's missing references, for example because the scan does not cover its whole target, now marks the scan INCOMPLETE and keeps checking the report, as the partial branch does. Its findings stay in the result. Before, the report was dropped, so a skill with High findings in a folder target showed none of them with SkillSpector 2.13.4 while 2.13.3 showed all of them. A caveats report with no caveat, or with a caveat that is not a reference_missing row in reference_resolution, contradicts SkillSpector's own rule for the status. It is still not trusted, and its error now names the rows of another kind. The LOW-to-CAUTION recommendation check reads whether the result was incomplete on entry, so a rejected LOW caveats report, which SkillSpector keeps SAFE, is not also rejected for its recommendation. The near-miss tests now assert the exact error of each case. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…passes The warning for accepted complete_with_caveats caveats says they do not mark the scan incomplete. It was added before the recommendation, issue, exit-code and components checks, so a report that one of those rejected showed INCOMPLETE beside that warning. The warning is now added just before the report is accepted. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rules The absolute, escaping, backslash, control-character, unlisted and directory near misses changed only the ledger row's path. The `missing` entry in `references` stayed on SKILL.md, so the reference check rejected each row before the path rules ran, and disabling those rules left every case green. Each path case now moves the `missing` reference with its row and, where the case needs it, the `components` entry. Where the platform allows it, the file the path would name without the rules holds the reference's line, and the absolute case uses `/SKILL.md`, which names SKILL.md once split at "/". A spy asserts that `_skillspector_bundled_file_bytes` refuses the row's path in every path and file case. Disabling the backslash, safe-text, path-part or listed-once rule now fails the backslash, control-character, absolute or unlisted case. SecureRoot also refuses the escaping and directory paths. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
… truncation A complete_with_caveats report with `is_complete: false` and a "Transitive traversal truncated: ..." limitation must fail the status marker check: SkillSpector rewrites a truncated caveats report to partial, so only `complete` may keep its status. No test held this; letting the exception also cover complete_with_caveats sent such a report to the partial branch, which kept its findings, and every test stayed green. The new near miss expects "has contradictory status markers" and fails under that change. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…veat The entry said a report is not trusted when it has a caveat that is not a nonfatal `reference_missing` row. A nonfatal `reference_missing` row in another phase is also not trusted: the code drops the report with "reports caveats other than missing references", and the docs require phase `reference_resolution`. The entry now says so. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
… failure SkillSpector 2.12.0 and later record a nonfatal partial opaque_content row from bundled_execution_surface on a hook manifest whenever they cannot model what a hook does with its input, which includes every command hook. The analysis is reported as partial although the scan finished, so a skill, folder or hooks-only plugin with a command hook stopped as INCOMPLETE. When the row is a whole-file row on a manifest whose BH1 finding says the hook payload is unmodeled (also under a baseline) and the report accounts for it exactly, the row is taken out before the missing-reference and image gates, and the rest of the report decides whether the scan is complete. Each manifest then gets the Critical skillspector_hook_payload_unverified and a gate failure, so a policy severity override cannot pass it, and --llm-verify does not downgrade it. Static and LLM stages report it once. Any other row keeps the scan INCOMPLETE, and its error names only the other rows. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
A folder scan stops at the first skill with a CRITICAL finding unless --continue-on-failure is set, because a CRITICAL used to mean a configuration error that affects every skill. The hook Critical is a fact about one skill's hooks, so stopping there dropped the findings of every later skill from the report while it still said "Security scanning 3 skill(s)". ValidatorBase now skips checks in _FAIL_FAST_EXEMPT_CHECKS when it looks for a CRITICAL that stops the walk. SecurityValidator lists skillspector_hook_payload_unverified there. Any other CRITICAL still stops the walk. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Critical said the hooks "need a recorded review before this artifact can pass", and the gate failure said "they need a recorded review", but SkillEvaluator has no way to record such a review. A user who reviewed the hooks, for example with a SkillSpector baseline, could only pass by removing them, and only the docs said so. The Critical now says the check cannot pass while the hooks are present, the gate failure says the same, and the suggestion says that only removing the hooks lets the check pass. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…lete SkillSpector emits the same opaque_content row from bundled_execution_surface when it cannot model the hooks and when it could not parse part of the manifest or read only its first 2,048 records. The row's observed_records/limit_records check only ran when both counts were present and only caught observed > limit, so it never fired with SkillSpector 2.13.3, which does not serialize the counts, and it let partly parsed manifests through on every release. The BH1 declaration_count is now read with each unmodeled manifest. With the counts on the row (2.13.4), observed_records must equal it and not exceed limit_records; with one count alone the row is refused. Without them (2.13.3), a BH1 with 2,048 or more declarations is refused. A refused row leaves the scan INCOMPLETE as before. With 2.13.3 a partly parsed manifest still gets the Critical, and it still fails. Real offline --no-llm captures of a skill whose .claude/settings.json has 2,050 command hooks, a second handler whose command is a list, or an env value that is a list, with 2.13.3 and 2.13.4, and of one with a permission rule beside the hook, with 2.13.4, pin the behaviour. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
The predicate's fatal check was covered only through the report validator, which already refuses a fatal row, so dropping the check from the predicate passed every test. A row path with a ".." part was tested only as an absolute path at the predicate and as a BH1 location in the helper test. The predicate test now refuses a fatal row and a "../hooks.json" row whose manifest is listed, and an end-to-end case puts the row and its BH1 on "../hooks.json" and expects an incomplete scan without the Critical. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
When the hook rows were taken out and the remaining gap had no ledger row of its own, such as an extra limitation, another partially inspected file, a fatal scope exclusion, filtered findings or an analyzer that did not finish, the INCOMPLETE error lost its cause and read only "reports incomplete analysis (status 'partial'); security scan did not complete". _skillspector_hook_surface_is_the_only_gap becomes _skillspector_gaps_without_rows, which describes each of those gaps; an empty list means none remains. The error then names them, for example "limitation 'Transitive traversal stopped early.'" or "1 partially inspected file(s)". A report with other rows still names its rows. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
--llm-verify sent the hook Critical to the verifier with every other
finding. The verifier's verdict could not change it, yet it was recorded
on the finding (llm_verdict false_positive, llm_confidence high next to a
Critical), and a reply without a verdict for that one finding made the
whole result INCOMPLETE ("llm-verification").
_verify_findings_with_llm now sends only findings whose check is not in
_LLM_VERIFY_EXEMPT_CHECKS and counts verdicts over those. An exempt
finding keeps its severity and gets no llm_* metadata, and a scan whose
only finding is exempt does not call the verifier.
Signed-off-by: Narendran Raghavan <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…omplete Both SkillSpector stages run the same static analyzers, so with --llm both report each manifest's Critical and gate failure. Repeated findings were dropped only after a complete enrichment stage, because that rebuild also drops an incomplete stage's error. Now that the static stage completes for hook skills, the enrichment stage runs for them, and when it ended INCOMPLETE for another gap the Critical, its error string and the gate failure were reported twice (critical_count 2). _drop_repeated_hook_reports removes from the enrichment stage the hook Criticals and gate failures the static stage already holds, with their error strings and counts, before the merge and whether or not that stage completed. The gate-failure dedupe in _deduplicate_skillspector_findings is no longer needed and is removed. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
left a comment
There was a problem hiding this comment.
Reviewed the full production diff, hook accounting/projection, BH1 and suppressed findings, gate/policy/LLM invariants, folder continuation, and deduplication callers. Fixed the published final-status link identified inline; propagated #457 standalone-wildcard protection through the updated #458 base. All145 hook-surface, validator-base and wildcard-version contract tests pass under locked dependencies; full src/tests Ruff lint passes. Pinned Fern5.121 check passes with0errors and1existing configuration warning. Updated base merged without conflicts; signed-off integration pushed normally. Remains stacked on #458 and is inherited by #460; no PR was merged.
Signed-off-by: Narendran Raghavan <[email protected]>
…for missing references (#458) * fix(tier1): accept SkillSpector 2.13.4 complete_with_caveats reports for missing references SkillSpector 2.13.4 reports a scan whose only gaps are missing references as complete_with_caveats instead of partial. The security check rejected that status as not recognized, so a skill naming a file it does not bundle was INCOMPLETE with 2.13.4 or later on PATH. Recognize the status from 2.13.4 on. Accept its caveats only when every one is a reference_missing row and they pass the missing-reference rule already applied to partial reports, then show the same warning. Anything else keeps the scan INCOMPLETE with an error naming up to three caveats. The report stays complete, so a LOW report must still say SAFE and its findings are checked as usual. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(tier1): describe how complete_with_caveats reports are checked Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(tier1): keep the findings of a caveats report whose caveats are rejected A complete_with_caveats report whose missing-reference caveats fail the rule for a partial report's missing references, for example because the scan does not cover its whole target, now marks the scan INCOMPLETE and keeps checking the report, as the partial branch does. Its findings stay in the result. Before, the report was dropped, so a skill with High findings in a folder target showed none of them with SkillSpector 2.13.4 while 2.13.3 showed all of them. A caveats report with no caveat, or with a caveat that is not a reference_missing row in reference_resolution, contradicts SkillSpector's own rule for the status. It is still not trusted, and its error now names the rows of another kind. The LOW-to-CAUTION recommendation check reads whether the result was incomplete on entry, so a rejected LOW caveats report, which SkillSpector keeps SAFE, is not also rejected for its recommendation. The near-miss tests now assert the exact error of each case. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(tier1): add the caveat warning only after the rest of the report passes The warning for accepted complete_with_caveats caveats says they do not mark the scan incomplete. It was added before the recommendation, issue, exit-code and components checks, so a report that one of those rejected showed INCOMPLETE beside that warning. The warning is now added just before the report is accepted. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(tier1): make the caveat path near misses reach the bundled-file rules The absolute, escaping, backslash, control-character, unlisted and directory near misses changed only the ledger row's path. The `missing` entry in `references` stayed on SKILL.md, so the reference check rejected each row before the path rules ran, and disabling those rules left every case green. Each path case now moves the `missing` reference with its row and, where the case needs it, the `components` entry. Where the platform allows it, the file the path would name without the rules holds the reference's line, and the absolute case uses `/SKILL.md`, which names SKILL.md once split at "/". A spy asserts that `_skillspector_bundled_file_bytes` refuses the row's path in every path and file case. Disabling the backslash, safe-text, path-part or listed-once rule now fails the backslash, control-character, absolute or unlisted case. SecureRoot also refuses the escaping and directory paths. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(tier1): pin that only complete keeps its status after transitive truncation A complete_with_caveats report with `is_complete: false` and a "Transitive traversal truncated: ..." limitation must fail the status marker check: SkillSpector rewrites a truncated caveats report to partial, so only `complete` may keep its status. No test held this; letting the exception also cover complete_with_caveats sent such a report to the partial branch, which kept its findings, and every test stayed green. The new near miss expects "has contradictory status markers" and fails under that change. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(changelog): name the phase of a trusted complete_with_caveats caveat The entry said a report is not trusted when it has a caveat that is not a nonfatal `reference_missing` row. A nonfatal `reference_missing` row in another phase is also not trusted: the code drops the report with "reports caveats other than missing references", and the docs require phase `reference_resolution`. The entry now says so. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(tier1): keep 2.13.4 caveats blocking for each skill of a validate catalog The stacked branch now judges each skill of a `validate <folder>` run against the folder. The caveat check reuses its missing-reference rule and reference root, so pin that a complete_with_caveats report for such a skill stays INCOMPLETE with the caveat error and no warning, with one and two workers, and that the same skill validated on its own passes. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * test(tier1): pin that a missing reference outside reference_resolution drops the caveats report A complete_with_caveats report whose reference_missing row is in another phase contradicts its status, so it must be untrusted and lose its findings, not only become INCOMPLETE. The only wrong-phase near miss used a report without findings, so checking the reason code alone kept those tests green. Parametrize the findings-dropped test with the instruction-override report's row moved to phase static. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * style(tests): keep the contradicting-caveats test within the line limit Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(tier1): set 2.13.4 caveats apart from the 2.13.3 reference caveat Main (7ae25d2) accepts a fully inspected SkillSpector 2.13.3 partial report whose only gaps are missing references as a reference caveat (reference_caveat_metadata): an INFO finding with skillspector_reference_caveats metadata, decided from the report alone when the scan has no known target. The paragraph and CHANGELOG entry before this branch's now describe that caveat, so "shows the same warning" no longer said which one a complete_with_caveats report gets. That rule reads only partial reports, so it never takes a complete_with_caveats report. Such a report is accepted only by _skillspector_reference_caveat_notes, which needs the scan's reference root to be its scanned root, and it carries the missing-reference warning. - docs/tier1-validation.mdx and the CHANGELOG entry say the caveats show the missing-reference warning, are never accepted from the report alone, so they leave a scan without a known target INCOMPLETE, and add no skillspector_reference_caveats entry. - New test_caveats_are_not_a_2_13_3_reference_caveat: in a direct scan without a reference root, the notes writer's 2.13.3 report passes as main's caveat and its 2.13.4 report stays INCOMPLETE; through validate_security_only the 2.13.4 report passes with the missing-reference warning and has neither the caveat finding nor its metadata. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(tier1): say which warning 2.13.4 caveats get in the report docstring The _validate_skillspector_report docstring now lists main's 2.13.3 reference-caveat rule (reference_caveat_metadata) beside the missing-reference notes, so "the same warning" for complete_with_caveats reports no longer named one. Name the warning of _skillspector_missing_reference_notes, and say that reference_caveat_metadata reads only partial reports, so it never accepts these caveats, even without a reference root. No change in behavior. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(changelog): name the missing-reference warning for 2.13.4 caveats The Unreleased > Fixed entry for complete_with_caveats said the caveats get "the same warning". The entry above it now also describes main's v2.13.3 reference-caveat INFO finding, so name the warning: the missing-reference warning, as docs/tier1-validation.mdx does. No change in behavior. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(changelog): rewrap the 2.13.4 caveats entry The previous commit left one 97-character line in the Unreleased > Fixed entry for complete_with_caveats. Rewrap the rest of the entry to 78 columns like its neighbours. Same words. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Signed-off-by: Narendran Raghavan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
…s and summarize affected artifacts (#460) * feat(tier1): name SkillSpector AE1 findings and say why each file was not inspected SkillSpector reports a High AE1 (incomplete referenced artifact analysis) finding at each line that names a file it did not completely inspect. The finding said only "Referenced artifact was not completely inspected", so the reason had to be matched by hand against the incomplete-analysis error. With SkillSpector before v2.12.0 it was titled "Unknown (AE1)" and suggested making the file available although SkillSpector had read part of it. The new skillspector_references module projects the finding's evidence: the target, its disposition and up to 16 reasons, read from the ledger rows of earlier releases, with bounded, redacted text and paths kept only inside the scan. The suggestion names the file and each reason, and the result counts the files and reference lines in skillspector_reference_summary and one message, also across the --llm stage and a folder of skills. Severities, completeness and gates are unchanged. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * feat(reporting): count incompletely inspected referenced files in failed Tier 1 reports When the security check fails, the full and compact terminal output, the Markdown report and the HTML report add one line that counts the files SkillSpector did not completely inspect and the lines that name them. The JSON report records the counts in skillspector_reference_summary, with only its three count fields. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(tier1): describe the reasons and counts of SkillSpector AE1 findings Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(tier1): drop AE1 reason limits too large for a float A reason's limit that is an integer beyond the float range raised OverflowError in math.isfinite, so the scan returned no result. Check the type and range first and call math.isfinite only for floats, so such a limit is left out like any other out-of-range value. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(tier1): keep the AE1 count line out of passing results The count of incompletely inspected referenced artifacts was also added to the result's messages. A policy that lowers the AE1 findings, or --verify-llm, can pass a complete scan, and reporters list a passing result's messages as passed checks, so the Markdown, HTML and terminal reports showed the count as a success. Every reporter already renders the line from the skillspector_reference_summary metadata, and only for a failed result, so the message is dropped. JSON still records the counts for every result. Also pin that a severity override for a SkillSpector report before v2.12.0 matches the rule's name, not "Unknown (AE1)". Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * perf(tier1): normalize each AE1 path and text once per SkillSpector report Every reference line and reason of every AE1 finding went through redaction, and every absolute path resolved the scan root again. A report with thousands of AE1 findings that repeat the same lines took seconds instead of a fraction of one. ReportNormalizer keeps, for one report, the redacted form of each distinct text and the in-scan form of each distinct path, and resolves the scan root at most once. _process_skillspector_cli_result builds one and passes it to the ledger index and to every issue it converts. report_path keeps its behavior for a single path. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(reporting): prefix AE1 reference lines with their skill in folder results merge_with_prefix put the skill's [name] prefix on each finding's path and on the PII scan's metadata occurrences, but not on the skillspector_occurrences of an AE1 finding. In a folder report a JSON reader could not tell which skill a listed reference line was in without the finding's own path. Prefix those lines the same way; the referenced file's target_path stays relative to the named skill. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(reporting): say the AE1 count line names any reasons SkillSpector gave The count line ended "each AE1 finding names the artifact and why its analysis stopped", but a finding counts whenever SkillSpector names its file, even with an empty reason list and no ledger row for the file. Say instead that each finding names the artifact and any reasons SkillSpector gave. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * refactor(reporting): import the AE1 count formatter where cli and markdown use it The module-level imports in reporting/cli.py and reporting/markdown.py sat in the same import slot that several open pull requests also add to, so each of those merges would conflict on one line. Import reference_summary_message inside the method that uses it, as html.py already does. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(tier1): note the AE1 check-name change for severity overrides With SkillSpector before v2.12.0 the AE1 check name changes from "Unknown (AE1)" to "Incomplete referenced artifact analysis (AE1)", so a severity_overrides entry keyed on the old name no longer matches and the SARIF rule ID changes. Say so in the CHANGELOG and the Tier 1 docs, and soften "gates are unchanged" to the one case where a gate can change. Also say that JSON records the counts for every result, while the other reports show them only for a failed one. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * refactor(reporting): register the AE1 count filter first in the HTML environment Two sibling port branches add a filter after skip_reason, where this branch also added one, so each merge conflicted on one line. Register skillspector_reference_summary before the other filters instead. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(tier1): keep the measured run time out of AE1 suggestions A finding's suggestion is part of its finding_id, which the docs say stays the same across runs. The AE1 suggestion listed every limit of a reason, including observed_seconds, the wall-clock time SkillSpector records with a runtime_limit reason. Each run of a scan that hit the runtime budget gave the finding a new finding_id, and with --llm the two stages' copies of one reference line counted as two unique findings when the second stage was incomplete. The suggestion now leaves out observed_seconds; the finding's metadata still records it. Reasons that differ only in the run time are described once. The CHANGELOG notes that AE1 finding_id values change once because the suggestion text is new. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(reporting): keep the AE1 count line in reports rendered from retained JSON CI renders its HTML and Markdown reports again from the JSON report through retained_results, which rebuilds each result's metadata from named fields. skillspector_reference_summary was not one of them, so a failed Tier 1 result lost the count line in every report that CI published, although the docs and the CHANGELOG say the Markdown and HTML reports show it. retained_results now copies the record through reference_summary_record, so only valid counts are kept and a malformed record is dropped. The hunk sits after the scanners block, apart from the lines that open PRs #333 and #349 change in this function. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * fix(tier1): keep the time budget out of AE1 suggestions SkillSpector sets a runtime_limit reason's limit_seconds to the part of the scan's time budget left when the step began: for each file that YARA did not reach and for the dependency analysis of a lockfile. The value differs from run to run like observed_seconds, so an AE1 finding with such a reason got a new finding_id on every run. Leave every *_seconds limit out of the suggestion and its grouping key. The finding's metadata keeps both values. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> * docs(tier1): say beside the counters that AE1 counts are totaled like them The sentence on the AE1 counts followed the paragraph on reference and target roots, so "the same way" read as the target-root rule. It now sits in the paragraph on the applicability counters. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Signed-off-by: Narendran Raghavan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
left a comment
There was a problem hiding this comment.
Current-head integration review: preserved the externally merged #460 AE1 diagnostics and the #458 complete_with_caveats behavior while reconciling the actual parent conflicts. The resolved security.py and Tier 1 documentation are byte-identical to the previously reviewed dc65c95 head; a second reviewer independently confirmed the blob equality and retained critical hook gate. All 494 hook/AE1/reporting/missing-reference/caveat regressions passed (3 deselected), including the standalone wildcard contracts. Ruff src/tests passed; Fern check found 0 errors (1 existing warning). Complete #459/#460 changelog entries use their separate stable anchors. Fresh pre-push open/head/actual-base/main checks and both merge-tree checks passed against parent 4dfefb3 and main a72a611. No PR merge performed.
chrisknvidia
left a comment
There was a problem hiding this comment.
Reviewed the full src/ diff for the hook gate (_skillspector_unmodeled_hook_manifests, the row predicate, _skillspector_without_hook_surface, _skillspector_gaps_without_rows, _report_unverified_hooks, _drop_repeated_hook_reports, the verifier exemption, the base.py fail-fast exemption, and the partial-branch changes in _validate_skillspector_report). I found no fail-open path. The Critical comes from the same projection that takes the row out of the completeness check, so a removed row always comes with a Critical and a gate failure. Anything that does not match exactly (another analyzer, a line, an error class, a count mismatch, two rows for a manifest, a partial count or limitation that does not add up, conflicting BH1 counts, no BH1) keeps today's INCOMPLETE with every row. With no hook rows nothing changes for a skill: the projection returns None, no finding is added, and the summary and fail-fast behave as before. recalculate_from_findings keeps gate failures, so --policy overrides and --llm-verify cannot clear it, and _drop_repeated_hook_reports only removes an --llm duplicate when the static stage already holds the same finding and gate failure. Added text is bounded (manifest paths must be filesystem safe, limitation text goes through _skillspector_report_text) and the new reference summary line has numbers only, so the HTML, Markdown, CLI and JSON additions have nothing to escape. SARIF is unchanged and carries the Critical as a normal error-level result.
I ran the hook-surface, base and AE1 tests (137 passed) and test_security, scope, reference diagnostics/summary and test_reporters (1854 passed) against the PR src, and probed the projection with a two-manifest report, conflicting BH1 counts and boolean record counts; all behaved as intended. The tests use real captured SkillSpector reports and look non-vacuous.
Things to fix before or right after merge: (1) CHANGELOG.md conflicts with current main, to be redone after #457 lands, and the PR text still says it is stacked on #458, which is already in the base. (2) The interactive validate Tier 1 block labels a FAIL-plus-incomplete result as 'didn't run: skillspector not installed' and suggests --skip security, while every other surface says FAIL; classify by result_status (inline comment on console_ui.py). (3) The docs name the hooks field of .claude-plugin/plugin.json, but no fixture covers it, and on the SkillSpector build I could run locally inline plugin.json hooks, SKILL.md frontmatter hooks, nested hooks/hooks.json and hooks next to a disableAllHooks settings file produce no BH1 and no row, so the gate cannot see them. That is not a regression, but the docs should not imply full coverage. (4) Nit: drop the changelog line about the link fix. Known and already documented: with --llm the accepted-gap warnings are lost to the dedupe rebuild. I only skimmed the #460 code (skillspector_references.py and the reference summary reporters) for escaping and consistency and saw no problems.
Checked from the tests, docs, interaction-with-#457 and golden-file side on aef0a3c.
Tests: I ran test_skillspector_hook_surface, the reference diagnostics and summary modules, test_base and test_security on the head (1535 passed), then broke the code in eight places. Removing fail_gate fails 40 tests; removing the folder fail-fast exemption fails 6; letting the verifier see the Critical fails 2; not dropping the repeated Critical from the --llm stage fails 2; dropping the observed_records equality fails 5; dropping the 2,048-declaration limit fails 3; leaving the Critical out of the summary count fails 7; turning the hook-row projection off fails 39. I did not find a vacuous test.
Interaction with #457: the hook rows are removed only in the partial branch, before the missing-reference and image gates, and the gates keep #457's reference root. complete_with_caveats reports never carry hook rows (the 2.13.4 settings-hook fixtures are partial), so the two branches do not overlap, and #453's report-only caveat cannot accept a report with a hook row. _skillspector_report_path_key matches the old inline rule exactly. A hook row can only turn INCOMPLETE into FAIL, never into a pass.
Merge state: #457 was squash-merged, so this branch now conflicts. I merged it onto current main using 4dfefb3 as the base (the net change of this branch): only CHANGELOG.md conflicts, #455's change to _verify_findings_with_llm merges cleanly with the exempt set, and tests/validators plus tests/models pass (4793). Failures in tests/reporting on my machine also fail on main (installed harbor is older than the code expects), so they are not from this PR.
To do before merge: bring the branch onto main (applying git diff 4dfefb3 aef0a3c on a branch from main is the easiest) and resolve CHANGELOG, and update the description (stacked-on line, models/result.py claim, and the #460 content with the AE1 rename). Smaller items in the inline comments: --llm drops the acceptance warnings (acknowledged in the body, not in the docs), a duplicated gap predicate, one CHANGELOG bullet to drop.
The interactive Tier 1 summary sorted failed checks into "failed" and "didn't run" by whether the scan was incomplete. A result with the hook Critical, its failed gate and an incomplete scan was listed as "didn't run" with the setup advice "skillspector not installed ... or skip it: --skip security", and the Critical never appeared under "what to fix". Every other surface reports FAIL for that result. Classify with result_status instead, so a blocking finding or failed gate outranks an incomplete scan. Results that are only incomplete are listed as before. Also drop the changelog line about a documentation link fix: the link was added in this same unreleased change, so there is no fix to record. Signed-off-by: Christopher Kevin <[email protected]>
…-critical Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Narendran Raghavan <[email protected]>
|
Review follow-up on |
Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
left a comment
There was a problem hiding this comment.
Resolved the actual security.py conflict with main in signed normal merge 166a90b2. The hook projection now feeds only remaining ledger rows and limitations into main's bounded completeness diagnostics; main's durable incomplete-cause gate and the separate hook Critical both survive recalculation and mixed static/LLM stages. Main's ownership/verification changes are retained. Two new residual-metadata cases failed against a naive raw-diagnostic merge and pass with this resolution. Verification: 1,873 affected tests passed, 1 skipped (198.09s), full src/tests/ci Ruff and diff check pass, Fern 0 errors/1 existing warning. Independent review approved the source and 41 selected residual-gap/partly-read/projection cases passed. Latest actual main 90dfd5a7 merges cleanly; no force push or PR merge was performed. Current-head CI is running.
Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
left a comment
There was a problem hiding this comment.
Reviewed current head 812245bc, the signed normal merge with main after #483 landed. The only manual production resolution is the import union: both REFERENCE_COMPLETENESS_FIELDS and the existing AE1/reference imports remain. #483's strict reference acceptance, independent warnings/errors and gates, #459's hook projection, and main's durable completeness diagnostics retain their automatically merged bodies. Two existing exact folder-reference expectations include main's acceptance guidance/URL; no assertion was weakened and no new test was added for the import. Existing combined controls pass 255 cases and strict-reference/deduplication controls pass 56; full src/tests/ci Ruff, diff check and Fern pass (1 existing warning). Independent final review approved the actual remerge patch. Fresh open/API/branch/remote guards matched the prior head and latest-main merge-tree is clean. No force push or PR merge was performed; restarted ordinary CI is running.
Signed-off-by: Narendran Raghavan <[email protected]>
rng1995
left a comment
There was a problem hiding this comment.
Reviewed exact head a512175393f4e82a3a1ca30537c941db39d86e31. The preceding signed-off merge ccccc73a integrates main's #492 CI runtime fix and was independently reviewed: only the two upstream CI files changed from 812245bc, and their blobs match upstream main. The current GitHub main merge has parents ccccc73a and 81b1e273; its tree exactly equals Git's automatic merge. It adds already-merged #456/#486, with no overlap in this PR's feature source, documentation or tests; the shared changelog is the only overlapping changed file.
Fresh validation on this exact head: 44 workflow tests passed in 1.83s; full src/tests/ci Ruff and diff check passed. Earlier 255 combined and 56 strict-reference cases remain bounded evidence for the identical feature blobs; those suites were not rerun for this automatic merge. The full suite runs in parallel on PRs, while serial main-push coverage and required job identity remain intact. Ordinary CI is being monitored.
* docs(changelog): move post-0.9.0 entries to Unreleased #497 and #459 merged after v0.9.0 was cut, but their entries landed in the 0.9.0 section that the release prep had just created. Move them, unchanged, to Unreleased. The 0.9.0 section now matches the released v0.9.0 notes exactly. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]> * docs(changelog): move #369 and #475 entries out of 0.9.0 #369 and #475 merged after v0.9.0 was cut, but their entries landed in the 0.9.0 section. Move them to Unreleased (Changed and Fixed) so 0.9.0 matches the released notes again. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]> --------- Signed-off-by: Narendran Raghavan <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Summary
Gate unmodeled hook payloads reported by SkillSpector as Critical findings, and retain bounded AE1 incomplete-reference diagnostics across reports. This PR targets main and includes the inherited #460 diagnostic and reporting changes.
opaque_contentledger accounting, emitskillspector_hook_payload_unverifiedplus an explicit gate failure. Baselines, severity overrides and LLM verification cannot clear that gate. Captured fixtures coverhooks/hooks.jsonand Claude settings manifests; unsupported or unreported hook locations are outside this scanner-derived rule.models/result.pycarries the supporting metadata merge behavior.Compatibility
AE1's check name changes from
Unknown (AE1)toIncomplete referenced artifact analysis (AE1). This also changes the SARIF rule ID and severity override key: replaceSECURITY.Unknown (AE1)withSECURITY.Incomplete referenced artifact analysis (AE1)in custom policy mappings.The managed SkillSpector pin remains 2.13.3. Missing-reference and image warning preservation during static/LLM deduplication is handled by #483, now merged into main. This PR keeps its hook Critical and gate behavior independent of that repair.
Validation and review follow-ups
The latest production integration passed 255 combined hook, completeness-diagnostic, AE1/reference, report-summary and result-model cases, plus 56 strict-reference and warning/error-deduplication cases. The earlier diagnostic integration passed 1,873 affected cases with 1 skip and 41 independent focused controls. Fern has 0 errors and 1 existing warning. The latest production conflict resolution is confined to retaining both import sets; existing exact-error expectations retain #483's guidance.
Integration
ccccc73aadopts #492's parallel pull-request test execution while preserving serial main-push coverage. Only the two upstream CI files change from the prior reviewed head. All 44 workflow tests, full src/tests/ci Ruff and diff check pass on that CI-only merge.The subsequent GitHub main merge
a5121753incorporates merged #456 and #486 and exactly matches Git's automatic merge tree. It preserves all #459 feature source, documentation and test blobs; only the shared changelog overlaps the upstream changes. All 44 workflow tests pass again, with full src/tests/ci Ruff and diff check, on this external merge. All ordinary checks ona5121753completed successfully or were intentionally skipped.Review dispositions: removed the unsupported inline
plugin.jsonhook-coverage claim; removed the unreleased link-housekeeping bullet; retained a separate no-other-gap helper because this hook projection diagnoses residual gaps while the reference acceptor enforces source and ledger policy. A broader predicate extraction should define one shared semantic contract before changing both security decisions.