Skip to content

fix(scan): read a skill's scripts and name what was not read - #519

Merged
blitzcrieg1 merged 5 commits into
masterfrom
fix/360-scan-skill-scripts
Nov 28, 2026
Merged

blitzcrieg1 merged 5 commits into
masterfrom
fix/360-scan-skill-scripts

Conversation

@blitzcrieg1

Copy link
Copy Markdown
Owner

Closes #360.

What

A folder scan read markdown, text and saved tools/list JSON, and nothing else. A skill acts through its scripts, so no findings was said about folders that were half-read, and the report never said which half.

  1. Scripts are now read. .sh, .bash, .py, .ps1, .js, .ts, .rb inside 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 line test_a_skill_may_install_packages_without_a_finding already holds for its markdown.
  2. What was not read is now said. Files the scanner cannot read as text (binaries, assets, unknown types) are counted and sampled by name, and the report carries an unobserved note stating they were not checked, so no findings cannot read as everything was checked.
  3. Additive report fields. scripts_scanned and not_read in 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 passed
  • python -m agentmetry.cli benchmark: 119 cases, 21 rules, 63 firings, 0 missed, 0 false positives (detection untouched)
  • ruff check agentmetry tests: clean

blitzcrieg1 and others added 5 commits November 27, 2026 23:23
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]>
@blitzcrieg1
blitzcrieg1 merged commit ba20c01 into master Nov 28, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

scan: a skill's scripts are never read, and the report does not say so

1 participant