style: apply cargo fmt
All checks were successful
CI / Clippy (pull_request) Successful in 4m29s
CI / Security Audit (pull_request) Has been skipped
CI / Tests (pull_request) Has been skipped
CI / Deploy MCP (push) Has been skipped
CI / Deploy Agent (pull_request) Has been skipped
CI / Deploy Dashboard (pull_request) Has been skipped
CI / Format (push) Successful in 5s
CI / Clippy (push) Successful in 4m37s
CI / Security Audit (push) Has been skipped
CI / Tests (push) Has been skipped
CI / Format (pull_request) Successful in 3s
CI / Detect Changes (push) Has been skipped
CI / Detect Changes (pull_request) Has been skipped
CI / Deploy Agent (push) Has been skipped
CI / Deploy Dashboard (push) Has been skipped
CI / Deploy Docs (push) Has been skipped
CI / Deploy Docs (pull_request) Has been skipped
CI / Deploy MCP (pull_request) Has been skipped
All checks were successful
CI / Clippy (pull_request) Successful in 4m29s
CI / Security Audit (pull_request) Has been skipped
CI / Tests (pull_request) Has been skipped
CI / Deploy MCP (push) Has been skipped
CI / Deploy Agent (pull_request) Has been skipped
CI / Deploy Dashboard (pull_request) Has been skipped
CI / Format (push) Successful in 5s
CI / Clippy (push) Successful in 4m37s
CI / Security Audit (push) Has been skipped
CI / Tests (push) Has been skipped
CI / Format (pull_request) Successful in 3s
CI / Detect Changes (push) Has been skipped
CI / Detect Changes (pull_request) Has been skipped
CI / Deploy Agent (push) Has been skipped
CI / Deploy Dashboard (push) Has been skipped
CI / Deploy Docs (push) Has been skipped
CI / Deploy Docs (pull_request) Has been skipped
CI / Deploy MCP (pull_request) Has been skipped
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -77,13 +77,22 @@ async fn generate_lockfiles(repo_path: &Path) {
|
||||
tracing::info!("attempting to generate pip requirements for SBOM scan");
|
||||
if repo_path.join("pyproject.toml").exists() {
|
||||
let result = tokio::process::Command::new("pip-compile")
|
||||
.args(["--quiet", "--output-file", "requirements.txt", "pyproject.toml"])
|
||||
.args([
|
||||
"--quiet",
|
||||
"--output-file",
|
||||
"requirements.txt",
|
||||
"pyproject.toml",
|
||||
])
|
||||
.current_dir(repo_path)
|
||||
.output()
|
||||
.await;
|
||||
match result {
|
||||
Ok(o) if o.status.success() => tracing::info!("requirements.txt generated via pip-compile"),
|
||||
_ => tracing::warn!("pip-compile not available or failed, Syft will parse pyproject.toml directly"),
|
||||
Ok(o) if o.status.success() => {
|
||||
tracing::info!("requirements.txt generated via pip-compile")
|
||||
}
|
||||
_ => tracing::warn!(
|
||||
"pip-compile not available or failed, Syft will parse pyproject.toml directly"
|
||||
),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -154,7 +163,11 @@ async fn enrich_cargo_licenses(repo_path: &Path, entries: &mut [SbomEntry]) {
|
||||
let license_map: std::collections::HashMap<(&str, &str), &str> = meta
|
||||
.packages
|
||||
.iter()
|
||||
.filter_map(|p| p.license.as_deref().map(|l| (p.name.as_str(), p.version.as_str(), l)))
|
||||
.filter_map(|p| {
|
||||
p.license
|
||||
.as_deref()
|
||||
.map(|l| (p.name.as_str(), p.version.as_str(), l))
|
||||
})
|
||||
.map(|(n, v, l)| ((n, v), l))
|
||||
.collect();
|
||||
|
||||
|
||||
@@ -37,9 +37,7 @@ pub fn SbomPage() -> Element {
|
||||
});
|
||||
|
||||
// ── Dynamic filter options (package managers + licenses from DB) ──
|
||||
let sbom_filters = use_resource(|| async {
|
||||
fetch_sbom_filters().await.ok()
|
||||
});
|
||||
let sbom_filters = use_resource(|| async { fetch_sbom_filters().await.ok() });
|
||||
|
||||
// ── SBOM list (filtered) ──
|
||||
let sbom = use_resource(move || {
|
||||
|
||||
Reference in New Issue
Block a user