Everything you need to install, configure, and run Garrison.
Get Garrison running in 5 minutes with the following steps.
Garrison uses TOML configuration files to control analyzer behavior, severity thresholds, and output formats.
# Garrison — Full Audit Configuration [project] name = "MyDeFi Protocol" version = "3.0.0" [analyzers] slither = true aderyn = true mythril = true ai_copilot = true attack_path = true time_travel = true [thresholds] blocker_severity = "HIGH" max_findings = 0 # 0 = fail on any HIGH [output] html_report = true md_report = true json_output = false
| Profile | File | Use Case | Speed |
|---|---|---|---|
| PR Check | garrison-pr.toml | Fast CI gate — blockers only, skip slow analyzers | < 2 min |
| Full Audit | garrison-audit.toml | Complete audit with all analyzers, 250K fuzz tests | 10–30 min |
| Bug Bounty | garrison-bounty.toml | Maximum coverage, 500K fuzz tests, AI exploit gen | 1–2 hours |
| Solana | garrison-solana.toml | Solana/Anchor programs, 35 Rust security patterns | 5–15 min |
| Flag | Description | Default |
|---|---|---|
--target | Path to contracts directory or file | Required |
--config | TOML configuration file path | garrison-pr.toml |
--report | Generate HTML + Markdown reports | false |
--project-name | Project name for reports | Directory name |
--medusa | Enable Medusa fuzzing | false |
--history | Enable Time-Travel Git Scanner | false |
--commits | Number of commits to scan (with --history) | 50 |
--rag | Enable AI Audit Copilot RAG enrichment | false |
--fingerprint | Run Protocol Fingerprint Scanner | false |
--solana | Enable Solana/Anchor analysis mode | false |
--output-dir | Output directory for reports | Current dir |
--verbose | Verbose output | false |
--help | Show help message | — |
name: Garrison Security Audit on: pull_request: branches: [main] jobs: blocker-checks: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Install Garrison run: pip install garrison-security==3.0.0 - name: Garrison PR Check (Blockers) run: | garrison-engine \ --target ./contracts \ --config garrison-pr.toml advisory-checks: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Install Garrison run: pip install garrison-security==3.0.0 - name: Garrison Advisory Scan run: | garrison-engine \ --target ./contracts \ --config garrison-audit.toml \ --report
Garrison exposes a Python API for programmatic integration.
from garrison import Garrison, AuditConfig # Initialize engine engine = Garrison( config=AuditConfig.from_file("garrison-audit.toml") ) # Run audit results = engine.audit(target="./contracts") # Access findings for finding in results.findings: print(f"{finding.severity}: {finding.title}") print(f" File: {finding.file}:{finding.line}") # Generate report results.export_html("audit_report.html") results.export_markdown("audit_report.md")
pip install garrison-security==3.0.0ai, advanced, web, devrequests, packaging, tomli, solc-selectCheck the full documentation on GitHub or open an issue for support.