
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
# Switch active version
raptor plugins switch solidity-parser 1.1.0
# Output: ✓ Switched 'solidity-parser' from v1.0.0 to v1.1.0
Installierte Plugins werden in .plugins.lock verfolgt, das Folgendes aufzeichnet:
Fügen Sie Plugins zu raptor.toml hinzu:
[plugins.my-plugin]
url = "https://raw.githubusercontent.com/user/repo/main/plugin/install.py"
version = ">=1.0.0" # Optional version constraint
description = "My custom plugin"
# Or use local path
[plugins.local-plugin]
url = "/path/to/plugin"
# or relative path
url = "../my-plugins/analyzer"
Versionsbeschränkungen:
"1.0.0" oder "@1.0.0" - Exakte Version">=1.0.0" - Mindestversion">1.0.0" - Größer als Version"<=2.0.0" - Höchstversion"<2.0.0" - Weniger als Versionraptor init my-auditraptor git add https://github.com/user/repo.gitraptor finding --new "Title" --severity HIGHraptor report --format sherlock code4renaSiehe CONFIGURATION.md für eine detaillierte Konfigurationsanleitung.
Bitte lesen Sie unseren Leitfaden zum Mitwirken.
Bitte seien Sie in allen Interaktionen respektvoll und professionell. Wir sind alle hier, um gemeinsam zu lernen und das Projekt zu verbessern.
Lizenziert unter entweder der Apache License, Version 2.0 oder der MIT License nach Ihrer Wahl.
Sofern Sie nicht ausdrücklich etwas anderes angeben, wird jeder von Ihnen absichtlich zur Aufnahme in diese Kisten eingereichte Beitrag, wie in der Apache-2.0-Lizenz definiert, wie oben doppelt lizenziert, ohne zusätzliche Bedingungen.
Dieses Framework dient nur zu Bildungszwecken und für autorisierte Sicherheitstests. Holen Sie stets die ordnungsgemäße Genehmigung ein, bevor Sie Sicherheitsaudits durchführen.