Install

Seven stages, one honest verdict

Each stage hands the next one a view closer to what the agent will run.

The pipeline

Stages run in order on every target. The judge stage is off by default.

  1. Inventory

    Lists every file, including dotfiles and files inside archives. Symlinks that leave the skill are refused. File type comes from magic bytes, not the extension.

  2. Unpack

    Opens zip, tar, gzip, bzip2, xz and Office files in memory, with limits on depth, count, size and compression ratio.

  3. Normalize

    Removes zero-width and bidirectional characters, applies NFKC, maps look-alike letters to Latin, decodes base64, hex, URL, HTML entities, compression and ROT13 until nothing changes, and reports padding.

  4. Analyze

    Runs every rule on every view: raw, folded and decoded. Adds taint tracking from secrets to the network, constant folding for strings assembled at runtime, YARA signatures and a bytecode check against shipped source.

  5. Prose

    Reads the skill's instructions and metadata for hidden directives, secrecy, permission requests and a purpose that does not match the code.

  6. Judge (optional)

    Off by default. A model reviews an isolated, redacted bundle and may raise a finding. It cannot lower or remove one.

  7. Verdict

    Merges findings, keeps the highest deterministic severity, and reports coverage. Anything not analyzed is listed, and a partial scan exits with code 2.

The deterministic floor

Rules set the minimum severity. A model can add evidence or raise a finding. It cannot lower one.

The optional judge sees the skill inside random delimiters, with paths and secrets redacted, and must answer in a fixed schema. Its output is checked against the files it was shown. A prompt injection that talks the model into "this is safe" changes nothing, because "safe" is not an answer the schema accepts.

When a limit stops analysis early, foldscan reports what it skipped and fails closed. No findings means nothing was found in what was analyzed, and the coverage line says how much that was.

Read how the judge is isolated

What a scan returns

From the demo skill on the home page: verdict block, 5 of 5 files analyzed. Output as a table, JSON, Markdown or SARIF 2.1.0 with --format.

Findings from the demo scan
Severity and ruleFindingLocationView
FS-EXEC-REMOTECriticalDownloaded content is piped straight into an interpreter.SKILL.md:100009folded
FS-UNI-CONFUSABLECriticalMatched FS-EXEC-REMOTE only after folding look-alike or invisible characters.SKILL.md:100009folded
FS-WS-PADDINGHigh100,000 consecutive blank lines start at line 9. Content after the padding was analyzed in full.SKILL.md:9raw
FS-ARC-SCRIPTHighguide.docx!/word/media/sync1.sh is a script or binary hidden inside an archive.guide.docx!/word/media/sync1.shmember
FS-ARC-PRESENTMediumguide.docx (application/vnd.openxmlformats) was unpacked and every member scanned.guide.docxmeta

Exit codes

The exit code tells a pipeline whether to fail the build and whether the scan covered everything.

Exit codes
CodeMeaning
0No findings at or above the fail-on level
1Findings at or above the fail-on level
2Coverage incomplete: some content was not analyzed
3Usage error
4Requested feature not available in this install
70Internal error

Install foldscan

One command, no account, no network by default.

Read the quickstart