Skip to content

Commit 50c6a8d

Browse files
committed
feat: implement AI-powered Soroban security audit engine
- Add Claude AI integration for contract vulnerability analysis - Implement 5 static security pattern detectors (reentrancy, access-control, integer-overflow, privacy-leak, missing-ttl) - Support 3 output formats: text (colored), JSON, HTML - Add comprehensive test suite (58 tests across 4 files) - Include input validation, error handling, and safe API integration - Closes GitHub Issue #503
1 parent 4fb1908 commit 50c6a8d

10 files changed

Lines changed: 2527 additions & 0 deletions

File tree

src/commands/ai_audit.rs

Lines changed: 456 additions & 0 deletions
Large diffs are not rendered by default.

src/commands/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
pub mod ai_audit;
12
pub mod analytics;
23
pub mod audit;
34
pub mod backup;

src/main.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ enum Commands {
143143
/// Run a comprehensive security audit on a Soroban contract
144144
Audit(commands::audit::AuditArgs),
145145

146+
/// AI-powered security audit for Soroban contracts using Claude
147+
AiAudit(commands::ai_audit::AiAuditArgs),
148+
146149
/// Schedule deployments for future execution with approval workflows
147150
#[command(subcommand)]
148151
Schedule(commands::schedule::ScheduleCommands),
@@ -247,6 +250,7 @@ async fn main() {
247250
Commands::Pipeline(_) => "pipeline",
248251
Commands::Security(_) => "security",
249252
Commands::Audit(_) => "audit",
253+
Commands::AiAudit(_) => "ai-audit",
250254
Commands::Schedule(_) => "schedule",
251255
Commands::Simulate(_) => "simulate",
252256
Commands::Backup(_) => "backup",
@@ -294,6 +298,7 @@ async fn main() {
294298
Commands::Pipeline(cmd) => commands::pipeline_builder::handle(cmd).await,
295299
Commands::Security(cmd) => commands::security::handle(cmd).await,
296300
Commands::Audit(args) => commands::audit::handle(args).await,
301+
Commands::AiAudit(args) => commands::ai_audit::handle(args).await,
297302
Commands::Schedule(cmd) => commands::schedule::handle(cmd).await,
298303
Commands::Simulate(cmd) => commands::simulate::handle(cmd).await,
299304
Commands::Backup(cmd) => commands::backup::handle(cmd).await,

0 commit comments

Comments
 (0)