Everything you need to install, configure, and run Counterscarpnel Engine.
Get Counterscarp running in 5 minutes with the following steps.
Licenses are tied to machine activations. Keys are cached offline for 24 hours after first validation.
| Tier | Key Prefix | Machine Activations | Key Duration |
|---|---|---|---|
| Developer | SE-DEV- | 1 | 30 days (recurring) |
| Pro | SE-PRO- | 3 | 30 days (recurring) |
| Team | SE-TEAM- | 10 | 30 days (recurring) |
| Enterprise | SE-ENT- | 100+ | Custom |
Counterscarp uses TOML configuration files to control analyzer behavior, severity thresholds, and output formats.
# Counterscarp — 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 | counterscarp-pr.toml | Fast CI gate — blockers only, skip slow analyzers | < 2 min |
| Full Audit | counterscarp-audit.toml | Complete audit with all analyzers, 250K fuzz tests | 10–30 min |
| Bug Bounty | counterscarp-bounty.toml | Maximum coverage, 500K fuzz tests, AI exploit gen | 1–2 hours |
| Solana | counterscarp-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 | counterscarp-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 | — |
Counterscarp integrates with all major CI/CD platforms. Use the auto-generator or copy the manual snippets below.
name: Counterscarp Audit on: pull_request: branches: [main] jobs: blocker-checks: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Install Counterscarp run: pip install counterscarp-engine --upgrade - name: Counterscarp PR Check (Blockers) env: COUNTERSCARP_PRO_LICENSE: ${{ secrets.COUNTERSCARP_PRO_LICENSE }} run: | counterscarp scan ./contracts \ --config counterscarp-pr.toml advisory-checks: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Install Counterscarp run: pip install counterscarp-engine --upgrade - name: Counterscarp Full Audit env: COUNTERSCARP_PRO_LICENSE: ${{ secrets.COUNTERSCARP_PRO_LICENSE }} run: | counterscarp scan ./contracts \ --config counterscarp-audit.toml \ --report
counterscarp-engine: stage: test image: python:3.11 variables: COUNTERSCARP_PRO_LICENSE: ${COUNTERSCARP_PRO_LICENSE} script: - pip install counterscarp-engine --upgrade - counterscarp scan ./contracts --config counterscarp-pr.toml only: - merge_requests
trigger: branches: include: [main] pool: vmImage: ubuntu-latest steps: - task: UsePythonVersion@0 inputs: versionSpec: '3.11' - script: pip install counterscarp-engine --upgrade displayName: 'Install Counterscarp' - script: counterscarp scan ./contracts --config counterscarp-pr.toml displayName: 'Counterscarp Scan' env: COUNTERSCARP_PRO_LICENSE: $(COUNTERSCARP_PRO_LICENSE)
pipeline { agent { label 'python' } environment { COUNTERSCARP_PRO_LICENSE = credentials('counterscarp-pro-license') } stages { stage('Security Scan') { steps { sh 'pip install counterscarp-engine --upgrade' sh 'counterscarp scan ./contracts --config counterscarp-pr.toml' } } } }
Counterscarp exposes a Python API for programmatic integration.
from counterscarp import CounterscarpEngine, AuditConfig # Initialize engine engine = CounterscarpEngine( config=AuditConfig.from_file("counterscarp-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 counterscarp-engine --upgradeai, advanced, web, devrequests, packaging, tomli, solc-selectCheck the full documentation on GitHub or open an issue for support.