Skip to content

Commit 05a4dab

Browse files
bumahkib7claude
andcommitted
feat: Add enterprise-grade suppression system and OSV provider v0.8.0
## New Features ### Suppression Engine - Add SuppressionEngine for comprehensive finding suppression - Support global path ignores via rules.ignore_paths config - Support per-rule path ignores via rules.ignore_paths_by_rule - Built-in default presets for test/example directories - Security rules (command-injection, hardcoded-secret, etc.) can only be suppressed via inline comments with reason - Default presets automatically enabled in --mode pr and --mode ci - Suppression metadata added to Finding.properties for traceability - SARIF output includes suppression information ### OSV Provider (Stage 2 lite) - Add reachability confidence layer based on import detection - Detect imports for npm (JS/TS), Go, and Rust ecosystems - Normalize imports to package names - Set finding.properties.reachability = "imported" or "present" - Add import_hits count and import_files_sample (up to 3) - Add caching with configurable TTL and offline mode - Add cache management command: rma cache ### Other Changes - Bump version to 0.8.0 - Update doctor command to show all providers - Add 16+ new tests for suppression engine - Add 5 new tests for import detection Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent e243733 commit 05a4dab

File tree

35 files changed

+4175
-291
lines changed

35 files changed

+4175
-291
lines changed

Cargo.lock

Lines changed: 137 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ members = [
1313
]
1414

1515
[workspace.package]
16-
version = "0.7.0"
16+
version = "0.8.0"
1717
edition = "2024"
1818
authors = ["Rust Monorepo Analyzer Team"]
1919
license = "MIT OR Apache-2.0"

crates/ai/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ edition.workspace = true
66
license.workspace = true
77

88
[dependencies]
9-
rma-common = { version = "0.7.0", path = "../common" }
10-
rma-parser = { version = "0.7.0", path = "../parser" }
9+
rma-common = { version = "0.8.0", path = "../common" }
10+
rma-parser = { version = "0.8.0", path = "../parser" }
1111
anyhow.workspace = true
1212
thiserror.workspace = true
1313
tracing.workspace = true

crates/ai/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ impl AiFinding {
149149
confidence,
150150
category,
151151
fingerprint: None,
152+
properties: None,
152153
};
153154
finding.compute_fingerprint();
154155
finding

crates/analyzer/Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ edition.workspace = true
66
license.workspace = true
77

88
[dependencies]
9-
rma-common = { version = "0.7.0", path = "../common" }
10-
rma-parser = { version = "0.7.0", path = "../parser" }
9+
rma-common = { version = "0.8.0", path = "../common" }
10+
rma-parser = { version = "0.8.0", path = "../parser" }
1111
anyhow.workspace = true
1212
thiserror.workspace = true
1313
tracing.workspace = true
@@ -21,6 +21,8 @@ quick-xml = { version = "0.31", features = ["serialize"] }
2121
shellexpand = "3"
2222
rustsec.workspace = true
2323
walkdir.workspace = true
24+
reqwest = { version = "0.12", features = ["blocking", "json"] }
25+
toml = "0.8"
2426

2527
# Native JS/TS linting via oxc
2628
oxc_linter.workspace = true

crates/analyzer/src/lib.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,26 @@ impl AnalyzerEngine {
162162
);
163163
}
164164
}
165+
ProviderType::Oxc => {
166+
let oxc = providers::OxcNativeProvider::new();
167+
if oxc.is_available() {
168+
info!(
169+
"Oxc native provider registered (version: {:?})",
170+
oxc.version()
171+
);
172+
self.provider_registry.register(Box::new(oxc));
173+
}
174+
}
175+
ProviderType::Osv => {
176+
let osv = providers::OsvProvider::new(config.osv.clone());
177+
if osv.is_available() {
178+
info!("OSV provider registered (version: {:?})", osv.version());
179+
self.provider_registry.register(Box::new(osv));
180+
} else {
181+
// This should never happen since OsvProvider is always available
182+
warn!("OSV provider unexpectedly unavailable");
183+
}
184+
}
165185
}
166186
}
167187
}

crates/analyzer/src/providers/gosec.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ impl GosecProvider {
208208
confidence,
209209
category,
210210
fingerprint: None,
211+
properties: None,
211212
};
212213

213214
finding.compute_fingerprint();

0 commit comments

Comments
 (0)