Repository navigation
fix(security): explain incomplete SkillSpector scans that hit a runtime limit - #294
Conversation
…me limit When SkillSpector reported partial analysis, the Tier 1 security scan failed as INCOMPLETE with only "reports incomplete analysis (status 'partial')". The report's ledger exceptions were checked for shape and then dropped, so users saw no file, no reason and no remedy. Two common causes need opposite fixes: a skill that bundles a large corpus uses up SkillSpector's whole-scan time budget on every rerun, while a sub-analysis such as the SkillSpector 2.12.0 SC8 bytecode walk can stop at its own time budget on a skill with no bytecode at all. The error now quotes up to three ledger exceptions as "path[:line] [phase; reason_code; analyzers=...]" and, when there are more, counts the distinct incomplete files per reason. For runtime_limit rows it adds a remedy: keep large bundled material outside the skill when the whole-scan budget ran out, or rerun and update SkillSpector when every analyzer is a "<analyzer>_runtime_limit" sub-analysis budget. Quoted report fields are kept on one line and bounded to 200 characters. A partial report without ledger exceptions keeps the previous message, and the scan still fails closed as INCOMPLETE. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…get hint A runtime_limit row that names regular analyzers, or none, can come from SkillSpector's whole-scan deadline or from a shorter stage budget such as bundle discovery, and the report does not say which. The hint no longer cites the 600-second whole-scan default; it still says that a large bundled corpus hits the same limit on every rerun. The docs entry names both kinds of budget and notes that a SkillEvaluator timeout appears as "skillspector timed out after N seconds" instead. The whole-scan test report now has an inventory, counters, coverage and degraded analyzer accounting that match its ledger rows, and the mixed-rows test covers a bundle-discovery row with no analyzers. 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.
Review summary: no findings.
Checked the ledger exception formatting (control/format/separator characters collapsed to spaces, 200-char bound per field, non-string and bool line values ignored), the per-reason distinct-file counts, the scan-budget vs sub-analysis-budget split in the runtime_limit hint, and that the partial-without-ledger message and the fail-closed INCOMPLETE gating are unchanged. The docs claim of a 600 second default whole-scan deadline matches DEFAULT_MAX_WORKFLOW_SECONDS in SkillSpector v2.13.1 (state.py), and the 'before v2.13.0' SC8 note agrees with #292. CHANGELOG is under Unreleased > Fixed. The new ledger/runtime-limit/partial tests pass locally (35 selected from tests/validators/test_security.py) and ruff check is clean. I did not wait for the full test_security.py module run to finish.
Reviewed with Claude Code.
771f0ee to
b8cfbba
Compare
Resolved conflicts in CHANGELOG.md. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Conflict in tests/validators/test_security.py (security import list): kept main's _skillspector_llm_env and this PR's _skillspector_incomplete_analysis_error. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
Resolve conflicts with #271: keep both SkillSpector Fixed entries in the CHANGELOG (the timeout entry first) and import both _skillspector_incomplete_analysis_error and _skillspector_timeout_seconds in the security tests. Update the runtime-limit troubleshooting text to SkillSpector v2.13.3's 1,080-second default scan deadline. 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]>
Resolve conflicts with #299 in security.py: keep both sets of new helpers, and keep #299's passive-raster warning path while the remaining partial-analysis error uses _skillspector_incomplete_analysis_error. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
chrisknvidia
left a comment
There was a problem hiding this comment.
Gating is unchanged (the scan still fails closed as incomplete), the quoted report fields are cut to one line and 200 characters, and the CLI and HTML reporters escape the text. I ran the new tests and they pass. One non-blocking point: when a report mixes the two kinds of runtime_limit rows, only the scan-budget advice shows.
No conflicts. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ow kinds When a SkillSpector report held scan-budget runtime_limit rows and sub-analysis (<analyzer>_runtime_limit) rows, the hint covered only the scan-budget rows, so the by-reason count and the hint disagreed and the sub-analysis rows got no rerun or update advice. Emit both sentences. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Narendran Raghavan <[email protected]>
…budget advice When a partial SkillSpector report had both regular runtime_limit rows and <analyzer>_runtime_limit rows, the hint returned only the scan-budget advice. The by-reason count included every runtime_limit file, but the hint counted only the scan-budget ones, and the sub-analysis files got no rerun or update advice. Each kind of row now gets its own sentence, so the two hints together cover every runtime_limit file in the count. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…limit Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…illspector-runtime-limit Conflicts in src/skillevaluator/validators/security.py and tests/validators/test_security.py. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolve the CHANGELOG.md conflict: keep main's new Unreleased entry and put this PR's entry after it. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolve the CHANGELOG.md conflict: keep main's Ctrl+C entry (#291) and add this PR's SkillSpector partial-scan entry after it. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolve the CHANGELOG.md conflict: keep main's SkillSpector partial-scan entry (#294) and add this PR's RAGAS scorer entry after it. Signed-off-by: Narendran Raghavan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
Summary
path[:line] [phase; reason_code; analyzers=...]. When there are more, it says how many remain and counts the distinct incomplete files per reason, for exampleand 463 more (incomplete files by reason: runtime_limit 462, obfuscated_instruction_text 4). A file with several rows counts once.runtime_limitrows the error adds what to do:<analyzer>_runtime_limit, such asstatic_patterns_supply_chain_bytecode_runtime_limit): the budget does not depend on bundle size. Rerun, and update SkillSpector or report the exceptions if it repeats.INCOMPLETE, and nothing is added to the JSON schema.docs/tier1-validation.mdx. CHANGELOG entry under Unreleased / Fixed.Why
A partial SkillSpector report failed the security check with only
skillspector JSON field 'analysis_completeness' reports incomplete analysis (status 'partial'); security scan did not complete. The report's ledger exceptions were checked for shape and then dropped, so users saw no file, no reason and no remedy. Two causes need opposite fixes:static_patterns_supply_chain_bytecode_runtime_limitrow on a skill that ships no bytecode, and the folder it names changes from run to run. Moving content out of the skill does not help; a rerun or a newer SkillSpector does. Onmaintoday, this sub-analysis case is the common source of aruntime_limiterror.maintoday, SkillEvaluator stops SkillSpector after 300 seconds, before SkillSpector's own 600-second whole-scan deadline, so such a skill usually ends asskillspector timed out after 300 secondswith no report. Only SkillSpector's shorter stage budgets, such as bundle discovery, produceruntime_limitrows for it here. Once the SkillEvaluator watchdog is longer than SkillSpector's deadline (see "Merge order"), SkillSpector returns a partial report withruntime_limitrows for every file it did not finish, and this error names them and gives the remedy.The new error tells the two apart from the report itself.
Merge order
Merge after
fix(security): make the SkillSpector timeout configurable. That change raises the SkillSpector watchdog to 1,200 seconds by default, above SkillSpector's 600-second deadline, which is what makes the whole-scan case above reachable. This PR shares no code with it and is correct on its own: the error text and the docs entry name no watchdog value, and the docs entry says that a SkillEvaluator timeout shows up asskillspector timed out after N secondsinstead. Both PRs add a separate accordion todocs/tier1-validation.mdx, which merges cleanly. The second to land needs a small rebase: both add a CHANGELOG entry at the same place and extend the sameskillevaluator.validators.securityimport intests/validators/test_security.py.Not in this PR
runtime_limit, with findings and risk merged across the two attempts. The trigger it targets is the SC8 bug above, which the SkillSpector 2.13.0 fix removes. Public's strict report validation would also need a result-level merge, because merging raw reports breaks its finding-count and inventory checks. On a whole-scan limit, a rerun doubles the scan time without finishing.SKILLSPECTOR_MAX_WORKFLOW_SECONDStogether withSKILLEVALUATOR_SKILLSPECTOR_TIMEOUT_SECONDS" as another remedy for the whole-scan case, and a large-bundle hint on theskillspector timed out after N secondserror. Both depend on the configurable-timeout change and belong in a follow-up once it is merged.Kept from public
CAUTIONrecommendation rule for partialLOWscans. The new text is built only after those checks pass, from rows they already validated.mark_scan_incompletegating and the error-only reporting path stay as they are. Public's CLI and Markdown reporters list execution errors forINCOMPLETEresults (and the JSON and HTML reports carry them), so the explanation goes into that error rather than into a separate Critical finding. The message keeps public's...; security scan did not completewording, so existing tests and tooling that look for it still match.Tests
tests/validators/test_security.py:test_skillspector_partial_scan_names_incomplete_files_by_reason: a valid partial report with 8 ledger rows on 7 files produces exactly one error. The report's inventory, counters, coverage and analyzer accounting match its ledger (7 partially inspected files, degraded analyzers with matching limitations). The error quotes the first three rows, saysand 5 more, and counts files per reason (runtime_limit 6, obfuscated_instruction_text 1; a file with two rows counts once). It also carries the scan-budget advice.test_skillspector_sub_analysis_time_budget_does_not_blame_bundle_size: an SC8-shaped report (degradedstatic_patterns_supply_chain, one..._bytecode_runtime_limitrow) passes validation and produces the exact sub-analysis error with no bundle-size advice.test_skillspector_runtime_limit_hint_counts_only_scan_budget_files: mixed rows, including a bundle-discovery row that names no analyzer, use the scan-budget advice, count only scan-budget files and name no specific deadline.test_skillspector_incomplete_analysis_error_without_runtime_limit_has_no_hint: other reasons are quoted with line numbers and get no hint. Without ledger rows the message is unchanged.test_skillspector_incomplete_analysis_error_bounds_untrusted_report_text: newlines are removed, long fields are cut to 200 characters, and non-string fields fall back tounknown.main: the two end-to-end tests on their message assertions, the three unit tests because the helper does not exist.pytest tests/validators tests/reporting tests/ci tests/test_oss_packaging.py tests/test_oss_boundary.py tests/test_oss_source_hygiene.py tests/utils/test_tool_runner.py: 4556 passed, 3 skipped.pytest tests/cli tests/test_ci_change_classifier.py tests/test_ci_workflows.py: 194 passed.ruff checkpasses on both changed Python files.ruff format --checkreports only differences that were already in both files onmain; the added lines are formatted.scripts/check_oss_boundary.pypasses.🤖 Generated with Claude Code