Repository navigation
fix(scan): read a skill's scripts and name what was not read - #519
Merged
Merged
Conversation
A folder scan only read markdown, text and saved tools/list JSON. A skill acts through its scripts, so the scan said 'no findings' about a folder it had half-read, and the report never said which half. - scripts (.sh, .bash, .py, .ps1, .js, .ts, .rb) inside a scanned folder are now read as text and checked for the same steering patterns as the markdown beside them. No install-directive check: a skill is opted into and its job is to carry commands; 'run this script' is how it acts. - files the scanner cannot read as text (binaries, assets, unknown types) are counted and sampled by name, and the report says they were not checked, so 'no findings' cannot read as 'everything was checked'. - the report carries scripts_scanned and not_read in JSON, and the text report states both. Coverage honesty is additive: verdict and exit codes are unchanged. pytest tests/test_scanner.py: 81 passed (5 new). test_cli_commands: 52 passed. Benchmark unchanged: 119 cases, 21 rules, 63 firings, 0 missed, 0 false positives. Ruff clean. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <[email protected]>
Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <[email protected]>
Linux directory enumeration is not sorted; the not_read assertion now compares sorted, which is what the report guarantees (a capped sample, not an ordering). Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <[email protected]>
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.
Closes #360.
What
A folder scan read markdown, text and saved
tools/listJSON, and nothing else. A skill acts through its scripts, sono findingswas said about folders that were half-read, and the report never said which half..sh,.bash,.py,.ps1,.js,.ts,.rbinside a scanned folder are read as text and checked for the same model-steering patterns as the markdown beside them: instruction_override, conceal_from_user, secret_file_access, exfil_directive. No install-directive check applies to them: a skill is opted into and its job is to carry commands, the same linetest_a_skill_may_install_packages_without_a_findingalready holds for its markdown.no findingscannot read aseverything was checked.scripts_scannedandnot_readin JSON; the text report states both. Verdicts and exit codes are unchanged; a stated blind spot is not scored as a finding.Evidence
pytest tests/test_scanner.py: 81 passed (5 new: a poisoned script fires at its line; a clean script is read and stays quiet; a script does not get the autoload checks; binary files are named and counted, not swallowed; JSON carries the coverage fields)pytest tests/test_cli_commands.py: 52 passedpython -m agentmetry.cli benchmark: 119 cases, 21 rules, 63 firings, 0 missed, 0 false positives (detection untouched)ruff check agentmetry tests: clean