Documentation
Version foldscan 0.1.2 (rules 2026.11.1). Everything here is generated from or checked against this release.
Quickstart
pipx install foldscan
foldscan scan ./my-skill --format tableThe target can be a skill directory, an archive or a single SKILL.md. Each finding lists its rule, severity, OWASP AST ID, location and the view it was found in: raw, folded, decoded or archive member.
Options
| Option | Meaning |
|---|---|
--format, -f | table, json, markdown or sarif. Default table. |
--output, -o | Write the report to a file. |
--fail-on | Lowest severity that exits 1: info, low, medium, high or critical. Default high. |
--fail-on-incomplete | Exit 2 when coverage is partial. On by default. |
--include-vendored | Also scan .git, node_modules, Python virtualenvs, site-packages and tool caches. Off by default; each skipped folder is listed as an FS-COV-VENDORED note. |
--judge | none or anthropic. Sends redacted skill text to the model API. Default none. |
Exit codes
0 clean, 1 findings at or above --fail-on, 2 incomplete coverage, 3 usage error, 4 feature not available, 70 internal error.
GitHub Action
Pin the Action to a full commit SHA. The SARIF report uploads to code scanning.
- uses: <owner>/foldscan@<full-commit-sha>
with:
path: skills/
fail-on: highLLM judge
Off by default. When enabled it reads an isolated, redacted bundle and may only raise severity. foldscan sends nothing anywhere unless you turn the judge on.
Rules
39 rules in this release. Each maps to at least one OWASP Agentic Skills Top 10 ID.
| Rule | Severity | What it finds |
|---|---|---|
FS-COV-UNSCANNABLE | High | File could not be analyzed |
FS-COV-TRUNCATED | High | A size or depth limit was reached |
FS-COV-VENDORED | Low | Vendored directory was skipped |
FS-INV-SYMLINK-ESCAPE | High | Symlink points outside the skill |
FS-INV-HIDDEN-EXEC | Medium | Hidden file contains executable content |
FS-INV-EXT-MISMATCH | Medium | File extension does not match content |
FS-WS-PADDING | High | Abnormal whitespace padding |
FS-ARC-PRESENT | Medium | Skill bundles an archive |
FS-ARC-SCRIPT | High | Executable script inside an archive |
FS-ARC-BOMB | High | Archive exceeds decompression limits |
FS-ARC-TRAVERSAL | High | Archive member path escapes extraction root |
FS-IND-BINARY | High | Instructions redirected to a bundled file |
FS-IND-REMOTE | High | Instructions fetched from a remote URL |
FS-PYC-SHIPPED | High | Compiled Python bytecode is bundled |
FS-PYC-MISMATCH | Critical | Bytecode does not match its source |
FS-PYC-ORPHAN | High | Bytecode has no matching source |
FS-CFG-REGISTRY | Critical | Package registry redirected |
FS-PERSIST-RC | High | Writes to shell startup or scheduler |
FS-ENC-LAYERED | Medium | Content hidden under multiple encodings |
FS-UNI-CONFUSABLE | High | Look-alike characters in commands or URLs |
FS-UNI-INVISIBLE | Medium | Invisible zero-width characters |
FS-UNI-BIDI | High | Bidirectional control characters |
FS-EXEC-REMOTE | Critical | Downloads and executes remote code |
FS-SECRET-ACCESS | High | Reads credential stores |
FS-SECRET-EXFIL | Critical | Sends secrets or environment over the network |
FS-PI-OVERRIDE | High | Attempts to override the agent's instructions |
FS-PI-SECRECY | High | Asks the agent to hide actions from the user |
FS-PI-JUDGE-ADDRESS | High | Text addresses scanners or reviewers |
FS-TAINT-SECRET-NET | Critical | Secret flows to a network call |
FS-TAINT-SECRET-EXEC | High | Secret or external data flows into code execution |
FS-OBF-DYNAMIC-EXEC | High | Command or code assembled at runtime |
FS-OBF-SELF-EXTRACT | High | Decompresses or decodes data, then executes it |
FS-META-MISSING | Low | SKILL.md metadata missing or malformed |
FS-META-UNSAFE-YAML | High | Frontmatter uses YAML tags or alias bombs |
FS-META-SHADOW | Medium | Skill claims built-in commands or broad triggers |
FS-META-PERMS | Medium | Skill requests broad tool permissions |
FS-YARA-MATCH | High | YARA signature matched |
FS-JUDGE-RAISED | Medium | Model review raised a concern |
FS-META-MISMATCH | Medium | Declared purpose does not match behavior |
Write a rule
A rule ships with three things: the detector, a defanged fixture that should trigger it, and a benign fixture that should not.
- Fixtures use
canary.invalidor127.0.0.1for every host and include the markerFOLDSCAN-TEST-MARKER-7f3a. - Never commit a working payload or a real malicious sample.
- Give the rule an OWASP AST ID, a default severity and false positive guidance.
- Run
uv run pytest -q,ruff checkandmypy srcbefore opening a pull request.