Find the holes before someone else does. A fast, 100% Rust vulnerability scanner: XSS, SQL injection, leaked secrets, dependency CVEs and AI agent setups.
Rust ai-agentsclaude-codeclaude-code-pluginclicodexcursordevsecopsmcposvowasprustsastsecret-scanningsecretssecuritysecurity-scannersql-injectionvulnerabilityvulnerability-scannerxss
build: require Rust 1.88, which the ignore crate needs
Kamf70fa7219945
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex db9a65e..9a4cbd4 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -21,7 +21,7 @@ jobs:runs-on: ubuntu-lateststeps:- uses: actions/checkout@v7- - uses: dtolnay/[email protected]+ - uses: dtolnay/[email protected]- uses: Swatinem/rust-cache@v2- run: cargo check --locked --all-targetsdiff --git a/Cargo.toml b/Cargo.tomlindex 7ff3e94..546298a 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -7,7 +7,7 @@ license = "MIT"repository = "https://github.com/erkamyaman/safe-anything"keywords = ["security", "scanner", "sast", "mcp", "vulnerability"]categories = ["command-line-utilities", "development-tools"]-rust-version = "1.85"+rust-version = "1.88"[dependencies]clap = { version = "4", features = ["derive"] }diff --git a/src/deps.rs b/src/deps.rsindex b601c56..2c62c96 100644--- a/src/deps.rs+++ b/src/deps.rs@@ -156,10 +156,10 @@ fn toml_packages(file: &FileInfo, text: &str, eco: &str, need_source: bool) -> V}j += 1;}- if let (Some(n), Some(v)) = (name, version) {- if source || !need_source {- out.push(pkg(eco, &n, &v, file, vline));- }+ if let (Some(n), Some(v)) = (name, version)+ && (source || !need_source)+ {+ out.push(pkg(eco, &n, &v, file, vline));}i = j;} else {@@ -209,11 +209,13 @@ fn gemfile_lock(file: &FileInfo, text: &str) -> Vec<Package> {in_specs = false;continue;}- if in_specs && line.starts_with(" ") && !line.starts_with(" ") {- if let Some((name, rest)) = line.trim().split_once(" (") {- let v = rest.trim_end_matches(')').split('-').next().unwrap_or("");- out.push(pkg("RubyGems", name, v, file, i + 1));- }+ if in_specs+ && line.starts_with(" ")+ && !line.starts_with(" ")+ && let Some((name, rest)) = line.trim().split_once(" (")+ {+ let v = rest.trim_end_matches(')').split('-').next().unwrap_or("");+ out.push(pkg("RubyGems", name, v, file, i + 1));}}outdiff --git a/src/report.rs b/src/report.rsindex 64dd77f..f0501de 100644--- a/src/report.rs+++ b/src/report.rs@@ -107,7 +107,7 @@ fn thousands(n: usize) -> String {let s = n.to_string();let mut out = String::new();for (i, c) in s.chars().enumerate() {- if i > 0 && (s.len() - i) % 3 == 0 {+ if i > 0 && (s.len() - i).is_multiple_of(3) {out.push(',');}out.push(c);diff --git a/src/rules/agent.rs b/src/rules/agent.rsindex dde3c84..acfbc86 100644--- a/src/rules/agent.rs+++ b/src/rules/agent.rs@@ -230,12 +230,12 @@ fn check_server(.get("url").or_else(|| server.get("serverUrl")).and_then(Value::as_str)+ && let Some(rest) = url.strip_prefix("http://"){- if let Some(rest) = url.strip_prefix("http://") {- let host = rest.split(['/', ':']).next().unwrap_or("");- if !matches!(host, "localhost" | "127.0.0.1" | "[") && !host.starts_with("[::1") {- let line = line_after(text, start, url);- out.push(finding(+ let host = rest.split(['/', ':']).next().unwrap_or("");+ if !matches!(host, "localhost" | "127.0.0.1" | "[") && !host.starts_with("[::1") {+ let line = line_after(text, start, url);+ out.push(finding(file,text,line,@@ -248,7 +248,6 @@ fn check_server(secret: None,},));- }}}}