
Framework für die Prüfung von Blockchain-Ökosystemen, die Identifizierung von Schwachstellen in Smart Contracts und die Erstellung strukturierter Ergebnisse mit plattformübergreifenden Berichtsvorlagen für Sicherheitsauditoren.
Raptor ist ein Framework zur Überprüfung des Blockchain-Ökosystems (Verträge, Protokolle usw.).
Raptor bietet strukturierte Ansätze und Werkzeuge zur Identifizierung von Sicherheitslücken in Smart Contracts und Blockchain-Protokollen. Das Framework hilft Prüfern, Ergebnisse konsistent zu dokumentieren und Berichte für mehrere Audit-Plattformen zu generieren.
# Install latest stable version (recommended)
curl -sSL https://raw.githubusercontent.com/calvin-kimani/raptor/main/install.sh | bash
# Install specific version
curl -sSL https://raw.githubusercontent.com/calvin-kimani/raptor/main/install.sh | bash -s -- v0.1.0
curl -sSL https://raw.githubusercontent.com/calvin-kimani/raptor/main/install.sh | bash -s -- 0.1.0
# Latest stable
git clone https://github.com/calvin-kimani/raptor.git /tmp/raptor-install
bash /tmp/raptor-install/install.sh
rm -rf /tmp/raptor-install
# Specific version
git clone https://github.com/calvin-kimani/raptor.git /tmp/raptor-install
bash /tmp/raptor-install/install.sh v0.1.5
rm -rf /tmp/raptor-install
Starten Sie dann Ihre Shell neu oder führen Sie Folgendes aus:
source ~/.bashrc # or ~/.zshrc for zsh
Installation überprüfen:
raptor --version
# Update to latest stable version
raptor update
# Update to specific version
raptor update v0.2.5
raptor update 0.2.5
# Upgrade to latest major version
raptor upgrade
# Upgrade to specific major version
raptor upgrade v1.0.0
# Downgrade to previous version
raptor downgrade v0.1.0
# List all available versions
raptor version --list
# Show current version
raptor version --current
raptor --version
raptor/
├── bin/ # CLI-Programme und Module
│ ├── raptor # Hauptprogramm von Raptor CLI
│ └── cli/ # CLI-Modulcode
│ ├── __init__.py # Versionsinformationen
│ ├── config.py # Konfigurationsverwaltung
│ ├── finding.py # Verwaltung von Ergebnissen
│ ├── git.py # Verwaltung von Git-Repositorys
│ ├── init.py # Projektinitialisierung
│ ├── plugin_lock.py # Verwaltung von Plugin-Sperrdateien
│ ├── plugin_manager.py # Plugin-Erkennung und -Installation
│ ├── raptor.py # Haupt-CLI-Logik
│ ├── report.py # Berichtsgenerierung
│ ├── update.py # Versionsverwaltung
│ └── version_utils.py # Versionsanalyse und -vergleich
├── scripts/ # Verzeichnis für benutzerdefinierte Skripte
├── schemas/ # Berichtsvorlagen und Ergebnis-Schemata
│ ├── reports/
│ │ ├── sherlock-report.yml # Sherlock-Vorlage
│ │ ├── code4rena-report.yml # Code4rena-Vorlage
│ │ └── codehawks-report.yml # CodeHawks-Vorlage
│ └── findings/
│ └── finding-schema.json # JSON-Schema für Ergebnisse
├── CONFIGURATION.md # Konfigurationsanleitung
├── CONTRIBUTING.md # Richtlinien für Beiträge
├── install.sh # Installationsskript
├── raptor.toml # Framework-Konfiguration
└── README.md # Diese Datei
Raptor unterstützt die Generierung von Berichten für mehrere Audit-Plattformen:
Jede Plattform hat spezifische Formatierungsanforderungen. Raptor speichert Ergebnisse in einem strukturierten JSON-Format und wandelt sie in das entsprechende Markdown-Format für jede Plattform um.
Speicherorte der Vorlagen:
~/.raptor/schemas/reports/<project>/audits/reports/.templates/raptor.tomlSiehe CONFIGURATION.md zum Hinzufügen benutzerdefinierter Berichtsformate.
Raptor bietet eine Befehlszeilenschnittstelle zur Verwaltung von Audit-Projekten:
# Initialize a new audit project
raptor init my-audit
# Force overwrite existing directory
raptor init my-audit --force
# Clone repositories during init (shallow by default)
raptor init --git-url https://github.com/user/repo.git
# Clone multiple repos with full commit history
raptor init --git-url URL1 URL2 --commit
# Add repositories to existing project (shallow by default)
raptor git add https://github.com/user/repo.git
# Add multiple repos with full history
raptor git add URL1 URL2 --commit
# List all repositories in src/
raptor git list
# Update all repositories
raptor git update
# Update specific repositories
raptor git update repo1 repo2
# Remove repositories
raptor git remove repo-name
# Create a new finding (stored as JSON)
raptor finding --new "Attacker will drain funds from stakers" --severity HIGH
# Create finding and immediately generate reports
raptor finding --new "Reentrancy in withdraw" --severity CRITICAL --report sherlock code4rena
# Generate reports for all findings (default: sherlock format)
raptor report
# Generate reports in specific formats
raptor report --format sherlock code4rena codehawks
# Generate report for specific finding
raptor report --format sherlock --finding HIGH-reentrancy-attack
Hauptfunktionen:
--git-url oder verwalten Sie sie mit raptor git-Befehlen--depth 1 für schnellere Downloads geklontRaptor unterstützt eine erweiterbare Plugin-Architektur mit automatischer Abhängigkeitsverwaltung und Mehrfachversionsunterstützung.
# List all available plugins
raptor plugins list
raptor plugins -l
# Install plugin to project (.plugins/)
raptor plugins install solidity-parser
# Install plugin globally (~/.raptor/bin/cli/plugins/)
raptor plugins install solidity-parser --global
raptor plugins -i solidity-parser -g
# Install multiple plugins
raptor plugins install parser-plugin graph-plugin
# Force reinstall
raptor plugins install solidity-parser --force
raptor plugins -i solidity-parser -f
# Check plugin status
raptor plugins status solidity-parser
Raptor ermöglicht die parallele Installation mehrerer Versionen desselben Plugins:
# First installation (becomes active version)
raptor plugins install solidity-parser
# Installs to: .plugins/solidity-parser/1.0.0/
# Install different version (previous remains active)
raptor plugins install solidity-parser
# Installs to: .plugins/solidity-parser/1.1.0/
# List shows all versions
raptor plugins list
# Output:
# solidity-parser [Project] v1.0.0 (2 versions)
# Versions: v1.0.0*, v1.1.0