Metadata-Version: 2.5
Name: foldscan
Version: 0.1.1
Summary: Scan what the agent will run, not what the file shows. A scanner for malicious AI-agent skills.
Project-URL: Homepage, https://site-ashy-two-46.vercel.app
Project-URL: Documentation, https://site-ashy-two-46.vercel.app/docs/
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: ai-agents,malware,sarif,scanner,security,skills
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Security
Requires-Python: >=3.12
Requires-Dist: pydantic>=2.8
Requires-Dist: regex>=2024.7.24
Requires-Dist: rich>=13.7
Requires-Dist: ruamel-yaml>=0.18
Requires-Dist: typer>=0.12
Provides-Extra: judge
Requires-Dist: anthropic>=1.0; extra == 'judge'
Provides-Extra: ocr
Requires-Dist: pillow>=11.0; extra == 'ocr'
Requires-Dist: pytesseract>=0.3.13; extra == 'ocr'
Provides-Extra: yara
Requires-Dist: yara-python>=4.5; extra == 'yara'
Description-Content-Type: text/markdown

# foldscan

Scan what the agent will run, not what the file shows.

foldscan is an open-source scanner for malicious AI-agent skills. Before any rule runs, it unpacks archives, removes padding, decodes layered encodings and maps look-alike letters to Latin, so a hidden command is matched the same way as a plain one.

Site and docs: https://site-ashy-two-46.vercel.app

## Install

```bash
pipx install foldscan
```

Optional extras: `foldscan[yara]` for YARA signatures, `foldscan[judge]` for the optional model judge, `foldscan[ocr]` for text in images.

## Use

```bash
foldscan scan ./my-skill --format table
foldscan scan skill.zip --format sarif --output foldscan.sarif
foldscan rules
foldscan explain FS-UNI-CONFUSABLE
```

The target can be a skill directory, an archive or a single SKILL.md. Output formats: table, json, markdown, sarif.

Dependency and tool folders (`.git`, `node_modules`, Python virtualenvs, `site-packages`, tool caches) are skipped by default and each one is listed as an `FS-COV-VENDORED` note. Pass `--include-vendored` to scan them too.

Exit codes: `0` clean, `1` findings at or above `--fail-on` (default high), `2` coverage incomplete, `3` usage error, `4` feature not available, `70` internal error.

## How it decides

- Seven stages: inventory, unpack, normalize, analyze, prose, optional judge, verdict.
- Every rule maps to an OWASP Agentic Skills Top 10 ID.
- Rules set the minimum severity. The optional model judge can raise a finding and can never lower or remove one. It is off by default, and foldscan sends nothing anywhere unless you turn it on.
- Anything that could not be analyzed is reported as incomplete coverage, never as clean.

## What it does not claim

- Static analysis cannot prove what a remote URL serves at run time. foldscan flags the fetch.
- Heavy packing and obfuscation can defeat static analysis. Sandboxed detonation is on the roadmap.
- No findings means nothing was found in what foldscan analyzed. The coverage report lists what that was.

## License

Apache-2.0.
