fix(cli): preserve full per-skill JSON payload in recursive scans (#228)#231
Open
rodboev wants to merge 2 commits into
Open
fix(cli): preserve full per-skill JSON payload in recursive scans (#228)#231rodboev wants to merge 2 commits into
rodboev wants to merge 2 commits into
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.
Summary
skillspector scan --recursive --format jsoncurrently reduces each successfulskills[]entry to a summary row and drops the full per-skill report contract that single-skill JSON already exposes. This preserves the recursive JSON contract for integrations by embedding the full per-skill payload while keeping the existing summary keys.Closes #228
Root cause
_scan_multi_skill()already has the full graph result for each skill, including the rendered JSONreport_body. The recursive JSON writer rebuilds eachskills[]entry from onlyname,path,risk_score,risk_severity, andfinding_count, so the richer per-skill JSON document is discarded before the combined file is written.Diff Notes
src/skillspector/cli.pythat parses successful per-skill JSONreport_bodyvalues.skills[]entry while retaining the compatibility summary keys.Scope
This stays on the CLI/report-contract boundary. It does not change analyzers, report-node schema, SARIF output, structured-skill discovery, baseline threading, provider behavior, or non-JSON recursive output.
Verification
./.venv/Scripts/python.exe -m pytest tests/unit/test_cli.py tests/test_multi_skill.py(22 passed, 1 warning)uv run ruff check src/ tests/uv run ruff format --check src/ tests/