Security analysis platform for Aiken smart contracts on Cardano.
Aikido goes beyond static analysis. It combines a 75-detector suite with SMT verification, transaction simulation, compliance analysis, protocol pattern detection, and grammar-aware fuzzing to find vulnerabilities in Aiken smart contracts before they reach mainnet. Multi-lane analysis cross-correlates evidence across techniques, producing findings with source context, severity ratings, CWE/CWC classifications, and actionable remediation guidance.
Built in Rust. Fast. Zero configuration required.
Why Aikido
Cardano smart contracts are immutable once deployed. A vulnerability in production means lost funds with no recourse. Manual audits are expensive, slow, and bottlenecked. Aikido catches the classes of bugs that auditors find most often - double satisfaction, missing signature checks, unbounded iteration, unsafe datum handling - automatically, in seconds.
- The only security tool for Aiken - no alternatives exist in the ecosystem
- 75 detectors with CWC (Cardano Weakness Classification) and CWE mappings
- Multi-lane analysis - static detectors, compliance, SMT verification, transaction simulation, protocol detection, fuzzing
- Validated against professional audit - 85% coverage on TxPipe's Strike Finance audit findings (full comparison)
- Evidence framework - findings corroborated across multiple analysis techniques (PatternMatch -> SmtProven -> SimulationConfirmed)
- 9 output formats - terminal, JSON, SARIF, Markdown, HTML, PDF, CSV, GitLab SAST, reviewdog
- Ecosystem proven - 10+ real-world projects including SundaeSwap, Anastasia Labs, Strike Finance, and Seedelf (0 crashes)
Quick Start
Install
# Homebrew (macOS/Linux)
brew install Bajuzjefe/tap/aikido
# Cargo (Rust >= 1.88.0)
cargo install --git https://github.com/Bajuzjefe/Aikido-Security-Analysis-Platform aikido-cli
# npm (wrapper)
npx aikido-aiken /path/to/project
# Docker
docker run --rm -v $(pwd):/project ghcr.io/bajuzjefe/aikido:0.3.1 /project
# From source
git clone https://github.com/Bajuzjefe/Aikido-Security-Analysis-Platform.git
cd aikido && cargo build --release
Run
aikido /path/to/your-aiken-project
Example Output
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
AIKIDO v0.3.1 Static Analysis Report
Project: test/simple-treasury v0.1.0
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[CRITICAL] (definite) double-satisfaction - Handler treasury.spend iterates
outputs without own OutputReference - validators/treasury.ak:23
Spend handler accesses tx.outputs but never uses __own_ref to identify
its own input. An attacker can satisfy multiple script inputs with a
single output, draining funds.
22 | validator treasury {
> 23 | spend(
> 24 | datum: Option<TreasuryDatum>,
> 25 | redeemer: TreasuryRedeemer,
Suggestion: Use the OutputReference parameter to correlate outputs
to this specific input.
...
1 critical, 5 high, 7 medium, 0 low, 0 info
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Analysis Architecture
Aikido uses a multi-lane approach where independent analysis techniques cross-validate each other:
graph TB
subgraph Input
A[Aiken Project] --> B[Typed AST]
end
subgraph Analysis Lanes
B --> C[Detector Suite<br/>75 detectors]
B --> D[Compliance<br/>Securify2-style]
B --> E[SMT Verification<br/>Cardano axioms]
B --> F[Tx Simulation<br/>exploit generation]
B --> G[Protocol Detection<br/>DeFi classification]
B --> H[Fuzz Lane<br/>grammar-aware]
end
subgraph Evidence Correlation
C --> I[Evidence Framework]
D --> I
E --> I
F --> I
G --> I
H --> I
end
I --> J[PatternMatch]
J --> K[PathVerified]
K --> L[SmtProven]
L --> M[SimulationConfirmed]
M --> N[Corroborated]
N --> O[Report<br/>9 output formats]
style C fill:#2EFFB5,color:#0a0a0a
style D fill:#2EFFB5,color:#0a0a0a
style E fill:#2EFFB5,color:#0a0a0a
style F fill:#2EFFB5,color:#0a0a0a
style G fill:#2EFFB5,color:#0a0a0a
style H fill:#2EFFB5,color:#0a0a0a
style I fill:#111111,color:#e0e0e0
style O fill:#111111,color:#e0e0e0
Lane Details
Supporting modules: CWC Registry (30 entries mapping all 75 detectors), Scorecard (Experimental -> Beta -> Stable promotion with quality gates), SSA IR (phi nodes, dominators, use-def chains).
Real-World Validation
Strike Finance Audit Comparison
Aikido was benchmarked against TxPipe's professional audit of Strike Finance (perpetuals + forwards contracts):
Full methodology and per-finding breakdown: AUDIT_COMPARISON.md
Ecosystem Validation
Validated against 10+ real-world Aiken smart contract projects with zero crashes:
Detectors
75 detectors mapped to CWE identifiers.
Each detector has detailed documentation with vulnerable examples, safe examples, and remediation guidance. Use aikido --explain <detector-name> or see docs/detectors/.
Output Formats
9 formats for different workflows:
aikido /path/to/project # Colored terminal output (default)
aikido /path/to/project --format json # JSON (machine-readable)
aikido /path/to/project --format sarif # SARIF v2.1.0 (GitHub Code Scanning)
aikido /path/to/project --format markdown # Markdown report
aikido /path/to/project --format html # Standalone HTML report
aikido /path/to/project --format pdf # PDF audit report
aikido /path/to/project --format csv # CSV export
aikido /path/to/project --format gitlab-sast # GitLab SAST
aikido /path/to/project --format rdjson # reviewdog
Configuration
.aikido.toml
# Use a preset as a starting point
extends = "strict" # or "lenient" for fewer warnings
[detectors]
disable = ["magic-numbers", "unused-import"]
[detectors.severity_override]
unbounded-datum-size = "low"
# Per-file overrides
[[files]]
pattern = "tests/**"
disable = ["hardcoded-addresses", "magic-numbers"]
Inline Suppression
// aikido:ignore[double-satisfaction] -- false positive: own_ref checked in helper
spend(datum, redeemer, own_ref, tx) {
...
}
Baseline Support
aikido /path --accept-baseline # Save current findings as baseline
aikido /path # Only new findings reported
CI/CD Integration
GitHub Actions
name: Security
on: [push, pull_request]
jobs:
aikido:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Aikido
run: cargo install --git https://github.com/Bajuzjefe/Aikido-Security-Analysis-Platform aikido-cli
- name: Run analysis
run: aikido . --format sarif --fail-on high > results.sarif
- name: Upload SARIF
if: always()
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: results.sarif
Docker
docker run --rm -v $(pwd):/project ghcr.io/bajuzjefe/aikido:0.3.1 /project --format json
CLI Reference
aikido /path # Analyze project
aikido /path --fail-on high # Exit non-zero for high+ findings
aikido /path --min-severity medium # Filter to medium+ only
aikido /path --verbose # Include UPLC metrics and budget
aikido /path --list-rules # Show all detectors
aikido /path --explain <rule> # Detailed explanation with examples
aikido /path --diff main # Only report findings in changed files
aikido /path --watch # Re-run on file changes
aikido /path -q # Quiet mode
aikido /path --config my.toml # Use specific config file
aikido /path --accept-baseline # Save current findings as baseline
aikido /path --lsp # LSP JSON-RPC diagnostics
aikido /path --interactive # Terminal navigator for findings
aikido /path --fix # Insert suppression comments
aikido /path --generate-config # Generate .aikido.toml from findings
aikido /path --strict-stdlib # Reject stdlib v1.x (default: warn)
aikido --git <url> # Clone and analyze remote repo
aikido --benchmark-manifest benchmarks/local-fixtures.toml --format json
aikido --benchmark-manifest benchmarks/local-fixtures.toml --benchmark-enforce-gates
Architecture
aikido/
├── crates/
│ ├── aikido-core/ # Library: analysis engine
│ │ ├── src/
│ │ │ ├── project.rs # Aiken project loading & compilation
│ │ │ ├── ast_walker.rs # Typed AST traversal -> ModuleInfo
│ │ │ ├── body_analysis.rs # Handler body signal extraction + taint tracking
│ │ │ ├── call_graph.rs # Function dependency graph
│ │ │ ├── cross_module.rs # Cross-module interprocedural analysis
│ │ │ ├── symbolic.rs # Symbolic execution & constraints
│ │ │ ├── delegation.rs # Delegation-aware suppression
│ │ │ ├── evidence.rs # 5-level evidence framework
│ │ │ ├── cwc.rs # Cardano Weakness Classification registry
│ │ │ ├── scorecard.rs # Detector quality tracking & promotion
│ │ │ ├── ssa.rs # SSA IR with phi nodes & use-def chains
│ │ │ ├── compliance.rs # Securify2-style compliance analysis
│ │ │ ├── smt.rs # SMT verification with Cardano axioms
│ │ │ ├── path_analysis.rs # Path-sensitive analysis & CFG
│ │ │ ├── invariant_spec.rs # .aikido-invariants.toml DSL
│ │ │ ├── protocol_patterns.rs # DeFi protocol detection & classification
│ │ │ ├── tx_simulation.rs # ScriptContext builder & exploit generation
│ │ │ ├── fuzz_lane.rs # Grammar-aware tx fuzzing
│ │ │ ├── config.rs # .aikido.toml configuration
│ │ │ ├── suppression.rs # Inline suppression comments
│ │ │ ├── baseline.rs # Baseline file support
│ │ │ ├── uplc_analysis.rs # UPLC bytecode analysis & budgets
│ │ │ └── detector/ # 75 detector implementations
│ │ └── tests/ # 1186+ tests
│ └── aikido-cli/ # Binary: clap-based CLI
├── fixtures/ # Test contracts (7 fixtures)
├── audits/ # Audit comparison artifacts
├── docs/detectors/ # Per-detector documentation
├── .github/workflows/ # CI, cross-platform, release, fuzz
├── homebrew/ # Homebrew formula
├── npm/ # npm wrapper package
├── vscode-extension/ # VS Code extension
├── fuzz/ # cargo-fuzz targets
└── Dockerfile # Multi-stage build
Building from Source
git clone https://github.com/Bajuzjefe/Aikido-Security-Analysis-Platform.git
cd aikido
cargo build --release # Binary at target/release/aikido
cargo test # Run test suite (1186+ tests)
cargo clippy --all-targets # Lint (zero warnings)
Requires Rust >= 1.88.0.
Vulnerability Coverage
Detectors are derived from real vulnerabilities found in published Cardano smart contract audits:
License
MIT