Repository navigation
fix(tier1): keep the hook gate failure FAIL beside an incomplete scan under a policy override - #563
Conversation
Start the follow-up fixes from current main. Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…der a policy override The gate failure for hooks SkillSpector cannot model is meant to keep the security check failed whatever a --policy severity override does. The reported status only put a blocking finding or confirmed_failure ahead of an incomplete scan. When an override lowered the Critical and another gap, such as the SkillSpector v2.13.4 parse-limit row for a hook "timeout" key, recorded the scan as incomplete, the check was reported as INCOMPLETE although its gate failure stood. The hook gate now also marks the result as a confirmed failure, and a folder merge keeps that mark from each skill. Other gate failures, such as the error for the remaining incomplete analysis, do not set it, so a scan that is only incomplete stays INCOMPLETE. Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d in the validate verdict The final box of the compact validate view chose between "failed" and "didn't run" from is_incomplete alone. A Tier 1 security check with the hook gate failure and another gap, such as the SkillSpector v2.13.4 parse-limit row for a hook "timeout" key, was therefore shown as "Security Scan didn't run in Tier 1", while its own detail line, the Tier 1 card and the reports said it failed. With several failed checks, such a check was counted as one that didn't run. A check now counts as not run only when it is incomplete and its reported status is not FAIL, as on the other surfaces. A check that is only incomplete still reads "didn't run". Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A plugin scan maps each declared skill's results back to the plugin with _attribute_scan_result, which rewrote file_path and the grouped occurrences but not skillspector_occurrences. An AE1 finding then had file_path skills/perl-helper/SKILL.md while its reference lines still named SKILL.md, so the exported lines did not match the finding's own path, as they do for a folder of skills. The reference lines now get the member directory like the other paths. Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n reference lines The tier1 docs and the unreleased CHANGELOG entries now say that the hook gate failure keeps the check FAIL beside another gap also when a --policy override lowers the Critical, that the compact validate verdict says the check failed, and that a plugin's AE1 reference lines name the declared skill's directory. Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… beside an incomplete scan The final box of the compact validate view said that a check with a blocking finding didn't run when one of its scanners did not complete, although its detail line, the Tier 1 card and the reports said it failed. The fix applies to any such check, not only to the hook gate, and the released behavior had no CHANGELOG line of its own. Add one under Fixed, and pin the general case with a blocking High finding beside an incomplete Semgrep scan, next to a check that is only incomplete. Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In 0.9.0 the Tier 1 card also counted a check with a blocking finding and a scanner that did not complete under "didn't run", and its "what to fix" gave a scanner setup step instead of the check's own error. Only the final box's detail line and the reports said that the check failed. The Fixed entry named the box alone, so as release notes it left out that the card changed too. Name both surfaces in the entry and the setup step the card gave. Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bring the branch up to date with main. CHANGELOG.md conflicted where main added entries under Unreleased Fixed; resolve it by taking main's file and keeping this branch's own Unreleased entries. Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Revert the change that made the final box of the compact validate view count a check with a confirmed failure beside an incomplete scan as failed, along with its tests and its CHANGELOG text. The open #394 changes the same lines and renames the "didn't run" wording to "incomplete", so this branch keeps only the hook gate fix: the check's reported status, the reports and the JSON status stay FAIL under a --policy override. Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n change Revert the change that put the declared skill's directory before the reference lines of a SkillSpector AE1 finding in a plugin scan, along with its test and its CHANGELOG and docs text. On main no command reaches that plugin attribution path yet; the open #394 adds the caller, so the fix belongs with it. This branch keeps only the hook gate fix. Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rng1995
left a comment
There was a problem hiding this comment.
Checked that the hook gate is now marked as a confirmed failure (confirmed_failure in the result metadata) and that the marker survives folder merges, so a --policy override that lowers the hook Critical next to another scan gap still reports FAIL instead of INCOMPLETE. This holds for the single-skill, timeout-row and folder cases, in the JSON export and its reload as a saved run, under the CI publisher consistency rules and in the Markdown and terminal views. The new tests fail on main's source and pass on this head, and the flag is never set for the residual incomplete-analysis gate alone or for untrusted reports.
No findings.
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chrisknvidia
left a comment
There was a problem hiding this comment.
This is needed, though it is a small fix. When a --policy override lowers the hook Critical and some other gap marks the scan incomplete (a hook with a "timeout" key is enough on 2.13.4), current main reports the security check as INCOMPLETE. The JSON status says incomplete too, and the terminal summary says the check didn't run and suggests skipping it, even though the unwaivable hook gate failure is still there. I reproduced that on main, and the five new tests fail there and pass on this branch.
Setting confirmed_failure on the hook gate and keeping it in merge_with_prefix is the right size of change. It leaves the other gate failures alone, and the scan stays recorded as incomplete, so publication eligibility is unchanged. The exit code is non-zero either way, so this fixes the label and the advice, not a gate hole. It does not overlap #459's summary fix, and #564 touches different functions in the same file. The earlier Windows Tier 2 failure is gone and CI is green, the branch merges cleanly with main, and the description now states the one known gap: the compact validate verdict can still say the check didn't run until that headline follows the reported status.
Looks good to merge, with squash since the branch has revert commits. One optional addition: an assertion for the interactive summary in the override case (it counts '1 failed' now, but the scanners row still says SkillSpector didn't run). I could not run the Tier 3 tests that need the newer Harbor here; the validator and reporting tests I ran pass.
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n incomplete scan A check that failed beside an incomplete scan, such as a hook gate failure next to a SkillSpector parse-limit row or a missing reference, listed only its first gate failure in the terminal Tier 1 summary. That is often the error for the gap, so the "what to fix" line hid the hook gate failure that keeps the check failed. For such a check the line now names every gate failure. A check whose scan is complete still shows its first error. The hook surface tests now check the summary wherever a hook gate fails beside an incomplete scan, with and without a --policy override: the check is counted under failed, not as a check that did not run, no --skip is suggested, and the fix line names the hook gate failure. Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…override The tests for the hook gate under a --policy override checked the run status and the JSON report but not the Tier 1 terminal summary. Check there that the check is counted as failed, not as one that did not run, that no scanner install or --skip advice is given, and that the "what to fix" item is one of the result's gate failures. This covers a complete scan, an incomplete scan with a parse-limit row, and a folder scan. Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
|
Review follow-up on No new source defect confirmed. The prior hook-failure/policy interaction is fixed in current source: 125 reporting/hook-surface tests pass. A real CLI run with SkillSpector 2.13.4, hook timeout metadata and a policy downgrading the unverified hook payload to LOW still exits 1 and reports a failed check alongside incomplete publication evidence, as intended. Scanner-row/headline wording is explicitly left to #624. Current Python 3.12 CI fails in the unchanged model-catalog wall-clock deadline test ( |
…lowups Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A check that failed beside an incomplete scan, such as a hook gate failure next to a SkillSpector parse-limit row or a missing reference, showed only its first gate failure in the "what to fix" section of the terminal Tier 1 summary. That first failure is often the error for the gap, so the section hid the hook gate failure that keeps the check failed. The section now also lists the other gate failures of such a check, after the items it already showed: the check's first gate failure and the unresolved file reference item stay first and in the same order, so the hook gate failure follows them instead of replacing them. A check whose scan is complete is listed as before. This replaces the earlier change that joined every gate failure into one line. The hook surface tests check, wherever a hook gate fails beside an incomplete scan, that the first item is still the first gate failure, that an unresolved reference keeps its item next, and that the hook gate failure is listed. The summary counts and advice for a hook gate under a --policy override are checked by the existing terminal summary helper, so the duplicate checks are removed. Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Narendran Raghavan <nraghavan@nvidia.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Follow-up to #459. The gate failure for hooks that SkillSpector cannot model is meant to keep the Tier 1 security check failed, whatever a
--policyseverity override does. When an override lowered the hook Critical and another gap recorded the scan as incomplete, the check was reported asINCOMPLETEinstead ofFAIL, and the terminal summary advised installing SkillSpector or skipping the check. Separately, a check that failed beside an incomplete scan showed only its first gate failure in the terminal "what to fix" list, which is usually the error for the gap, so the hook gate failure was not shown. This branch has main 186134b merged.Changes
--policyoverride beside another gap. On main, the reported status puts only a blocking finding orconfirmed_failureahead of an incomplete scan. An override that lowered the hook Critical left only the gate failure, so with another gap, such as the SkillSpector v2.13.4 parse-limit row for a hook"timeout"key or a folder skill's missing reference, the check and the JSON status wereINCOMPLETE, although the gate failure stood. The hook gate now also setsconfirmed_failure, andmerge_with_prefixkeeps that mark from each skill, so a folder scan staysFAILtoo. Other gate failures, such as the error for the remaining incomplete analysis, do not set it, so a scan that is only incomplete staysINCOMPLETE. The scan is still recorded as incomplete, so publication eligibility stays Incomplete.FAILbeside another gap also under a--policyoverride. The unreleased hook gate CHANGELOG entry describes both changes.validate --tiers 1 --checks securityon a plugin whose hook has a"timeout"key (SkillSpector v2.13.4 report), withSECURITY.skillspector_hook_payload_unverified: lowin the policy:0/1 checks passed · 1 didn't run0/1 checks passed · 1 failedsecurity didn't run: skillspector not installed→or skip it: --skip security... static_parse_limit ...; security scan did not complete)2.
hooks/hooks.json: SkillSpector could not model these hooks; this check cannot pass while they are presentincompletefailedWithout the override, main already reports
1 failedbut lists only item 1. For a skill with a missing reference and a settings hook in a folder run, main lists the gap error and the unresolved reference item (and, under the override, only the reference item beside1 didn't run); this branch reports1 failedand adds the hook gate failure as item 3.Known trade-offs
"confirmed_failure": true. Retained reports already read this field.validateverdict still picks its wording from whether the scan is incomplete, so for this case it readsChanges required: Security Scan was incomplete in Tier 1beside the✗ FAILlabel, as it already does on main for the same scan without an override. The check status, JSON status and reports sayFAIL. The open Enable public plugin assessment and saved-run reports #394 bases that wording on the reported status.+N more in detailed reports.Tests
tests/validators/test_skillspector_hook_surface.pyandtests/reporting/test_shared_run_status.py: on main 5978061, 23 failed, 102 passed; on this branch, 125 passed. The 23:timeout-parse-limitvariants oftest_policy_overrides_cannot_pass_the_hooks, both cases oftest_a_policy_override_keeps_a_folder_scan_failed_beside_a_missing_reference, andtest_confirmed_failure_survives_a_folder_merge.1 failed, with no install or--skipadvice, and a guard pins that a scan with only the incomplete-analysis gate staysINCOMPLETE.tests/models,tests/reporting,tests/validators,tests/test_quality_policy_gate.py, the other tests that render the Tier 1 summary,tests/test_cli.py,tests/test_model_catalog.py, and the packaging, change classifier and CI workflow tests: 8217 passed, 4 skipped, 2 failed.test_validate_tier3_writes_the_same_report_pairandtest_harbor_environment_kwarg_contract_matches_installed_sourcealso fail on main here, because the local Harbor install is older than main's pin.tests/golden,tests/cli,tests/ciand the onboarding and base-install tests: 2131 passed, 21 skipped, 8 failed. The 8, intests/ci/test_prepare_security_baselines.py,tests/ci/test_feedback.pyandtests/ci/test_all_tier_preflight.py, also fail on main 5978061 here: theirpython -Isubprocesses ignorePYTHONPATHand import the older package installed in the local environment instead of the tree under test.ruff checkpasses on the changed files.ruff format --checkpasses onconsole_ui.pyand the changed test files;models/result.pyandvalidators/security.pyfail it on main too, on lines this branch does not touch. The OSS boundary scan passes.git merge-tree --write-treeagainst it is clean. The counts above were measured with main 5978061 merged; main's later commits change none of the PR's files or the model-catalog files.test_catalog_status_and_header_trickles_cannot_extend_the_wall_clock_deadline[headers](1.1185 s against< 0.3), in the run for 78a6ae0. I read it as a runner timing flake unrelated to this branch:skillevaluator.model_catalogandskillevaluator.provider_config, and neither they nortests/test_model_catalog.pyare changed here. Main last changed the test in fix(ci): stop the Tier 1 runner missing a Ctrl-C, and deflake timing-dependent tests #568, which this PR's base already had; nothing on main has changed it since.🤖 Generated with Claude Code