Static Analysis for LLM Agent Skills
Project description
Razin - Static Analysis for LLM Agent Skills
Razin is a local scanner for SKILL.md-defined agent skills. It performs static analysis only (no execution) and writes deterministic JSON reports.
Table of Contents
Requirements
- Python
3.12+
Install
pip install razin
Verify:
razin --help
Usage
Basic scan:
razin scan -r . -o output/
Custom rules directory:
razin scan -r . -R ./enterprise-rules -o output/
Single rule file:
razin scan -r . -f ./enterprise-rules/net_unknown_domain.yaml -o output/
Multiple rule files:
razin scan -r . \
-f ./enterprise-rules/net_unknown_domain.yaml \
-f ./enterprise-rules/mcp_endpoint.yaml \
-o output/
Long-form equivalent (for scripts and clarity):
razin scan --root . --output-dir output/ --profile strict --no-cache
CLI flags:
-r,--root <path>: workspace root to scan-o,--output-dir <path>: output root for findings and summaries-c,--config <file>: optional config file path (defaults to<root>/razin.yaml)-m,--mcp-allowlist <domain-or-url>: optional repeatable MCP endpoint/domain allowlist override-p,--profile <strict|balanced|audit>: policy profile-R,--rules-dir <path>: load all custom*.yamlDSL rules from this directory-f,--rule-file <path>: load specific custom*.yamlDSL rule file (repeatable)-n,--no-cache: disable cache reads/writes-v,--verbose: show cache stats and diagnostics--max-file-mb <n>: skip files larger thannMB--output-format json: reserved for future formats (currently onlyjson)--no-stdout: silence stdout output--no-color: disable colored output
Rules source behavior:
- Default mode (no custom flags): bundled rules under
src/razin/dsl/rules/ - Custom directory mode:
--rules-dirreplaces bundled rules for that scan - Custom file mode: one or more
--rule-filevalues replace bundled rules for that scan --rules-dirand--rule-fileare mutually exclusive- Invalid path, invalid extension, duplicate
rule_id, and invalid YAML fail fast
Workflow
Python (Primary)
Use the local Python/uv workflow for day-to-day development:
uv run razin scan -r . -o output/
uv run pytest -q
uv run ruff check src tests
uv run mypy src tests
Docker (Optional)
Prerequisites:
- Docker Desktop (macOS/Windows) or Docker Engine (Linux)
Build runtime image:
docker build -t razin:local .
Run scanner in Docker:
docker run --rm razin:local --help
docker run --rm razin:local scan --help
docker run --rm \
-v "$(pwd)":/work \
-w /work \
razin:local \
scan --root /work --output-dir /work/output/docker
Config File
Create razin.yaml in scan root (or pass with --config):
allowlist_domains:
- api.openai.com
denylist_domains:
- "*"
mcp_allowlist_domains:
- rube.app
mcp_denylist_domains:
- blocked.example.com
tool_prefixes:
- RUBE_
- MCP_
detectors:
enabled:
- NET_RAW_IP
- NET_UNKNOWN_DOMAIN
- SECRET_REF
- EXEC_FIELDS
- OPAQUE_BLOB
- TYPOSQUAT
- BUNDLED_SCRIPTS
- MCP_REQUIRED
- MCP_ENDPOINT
- MCP_DENYLIST
- TOOL_INVOCATION
- DYNAMIC_SCHEMA
- AUTH_CONNECTION
- EXTERNAL_URLS
disabled: []
typosquat:
baseline:
- openai-helper
skill_globs:
- "**/SKILL.md"
max_file_mb: 2
Outputs
Per skill, RAZIN writes:
output/<skill-name>/findings.jsonoutput/<skill-name>/summary.json
Cache file:
output/.razin-cache.json
Skill name derivation precedence:
- Frontmatter
name(if present) - Nearest folder containing
SKILL.md - Sanitized relative path from scan root
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file razin-1.0.0.tar.gz.
File metadata
- Download URL: razin-1.0.0.tar.gz
- Upload date:
- Size: 91.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d64f6764fc79ac12befa56cd164cf1da97eac1f71d65d1f6f72792048104082
|
|
| MD5 |
32d46bb60946c00c580d95c970265424
|
|
| BLAKE2b-256 |
83aeff9259e0aceaf5e80f7fab37f829b1fbee2382d4228ec998a39081bab42f
|
File details
Details for the file razin-1.0.0-py3-none-any.whl.
File metadata
- Download URL: razin-1.0.0-py3-none-any.whl
- Upload date:
- Size: 76.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea5a0336b85043974a90e6127d8551c225cf150dd353136679af50943b85ade3
|
|
| MD5 |
1b898da7787a95eed96794a230db0c94
|
|
| BLAKE2b-256 |
e5ae5d4f8cfaa56d2308a6f1993a0106e38a85785e444911d6a48f3cf1f22e81
|