Install

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 table

The 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

OptionMeaning
--format, -ftable, json, markdown or sarif. Default table.
--output, -oWrite the report to a file.
--fail-onLowest severity that exits 1: info, low, medium, high or critical. Default high.
--fail-on-incompleteExit 2 when coverage is partial. On by default.
--include-vendoredAlso 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.
--judgenone 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: high

LLM 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.

Rules in this release
RuleSeverityWhat it finds
FS-COV-UNSCANNABLEHighFile could not be analyzed
FS-COV-TRUNCATEDHighA size or depth limit was reached
FS-COV-VENDOREDLowVendored directory was skipped
FS-INV-SYMLINK-ESCAPEHighSymlink points outside the skill
FS-INV-HIDDEN-EXECMediumHidden file contains executable content
FS-INV-EXT-MISMATCHMediumFile extension does not match content
FS-WS-PADDINGHighAbnormal whitespace padding
FS-ARC-PRESENTMediumSkill bundles an archive
FS-ARC-SCRIPTHighExecutable script inside an archive
FS-ARC-BOMBHighArchive exceeds decompression limits
FS-ARC-TRAVERSALHighArchive member path escapes extraction root
FS-IND-BINARYHighInstructions redirected to a bundled file
FS-IND-REMOTEHighInstructions fetched from a remote URL
FS-PYC-SHIPPEDHighCompiled Python bytecode is bundled
FS-PYC-MISMATCHCriticalBytecode does not match its source
FS-PYC-ORPHANHighBytecode has no matching source
FS-CFG-REGISTRYCriticalPackage registry redirected
FS-PERSIST-RCHighWrites to shell startup or scheduler
FS-ENC-LAYEREDMediumContent hidden under multiple encodings
FS-UNI-CONFUSABLEHighLook-alike characters in commands or URLs
FS-UNI-INVISIBLEMediumInvisible zero-width characters
FS-UNI-BIDIHighBidirectional control characters
FS-EXEC-REMOTECriticalDownloads and executes remote code
FS-SECRET-ACCESSHighReads credential stores
FS-SECRET-EXFILCriticalSends secrets or environment over the network
FS-PI-OVERRIDEHighAttempts to override the agent's instructions
FS-PI-SECRECYHighAsks the agent to hide actions from the user
FS-PI-JUDGE-ADDRESSHighText addresses scanners or reviewers
FS-TAINT-SECRET-NETCriticalSecret flows to a network call
FS-TAINT-SECRET-EXECHighSecret or external data flows into code execution
FS-OBF-DYNAMIC-EXECHighCommand or code assembled at runtime
FS-OBF-SELF-EXTRACTHighDecompresses or decodes data, then executes it
FS-META-MISSINGLowSKILL.md metadata missing or malformed
FS-META-UNSAFE-YAMLHighFrontmatter uses YAML tags or alias bombs
FS-META-SHADOWMediumSkill claims built-in commands or broad triggers
FS-META-PERMSMediumSkill requests broad tool permissions
FS-YARA-MATCHHighYARA signature matched
FS-JUDGE-RAISEDMediumModel review raised a concern
FS-META-MISMATCHMediumDeclared 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.invalid or 127.0.0.1 for every host and include the marker FOLDSCAN-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 check and mypy src before opening a pull request.