From 539805bf3003829dee89334f8f6982914904d9d9 Mon Sep 17 00:00:00 2001 From: Jim Crossley Date: Fri, 6 Dec 2024 10:18:15 -0500 Subject: [PATCH] feat: reduce default importers to only those used in V1 This will facilitate the transition of V1 users to V2. Signed-off-by: Jim Crossley --- server/src/sample_data.rs | 87 --------------------------------------- 1 file changed, 87 deletions(-) diff --git a/server/src/sample_data.rs b/server/src/sample_data.rs index 84f96c21..7e2a7c21 100644 --- a/server/src/sample_data.rs +++ b/server/src/sample_data.rs @@ -181,94 +181,7 @@ pub async fn sample_data(db: trustify_common::db::Database) -> anyhow::Result<() ) .await?; - add( - &importer, - "redhat-csaf-vex-2024", - ImporterConfiguration::Csaf(CsafImporter { - common: CommonImporter { - disabled: true, - period: Duration::from_secs(300), - description: Some("Red Hat VEX files from 2024".into()), - labels: Default::default(), - }, - source: "redhat.com".to_string(), - v3_signatures: true, - only_patterns: vec!["^cve-2024-".into()], - fetch_retries: Some(50), - ignore_missing: false, - }), - ) - .await?; - - add_cwe(&importer, "cwe", "Common Weakness Enumeration").await?; - add_cve(&importer, "cve", None, "CVE List V5").await?; - add_cve( - &importer, - "cve-from-2024", - Some(2024), - "CVE List V5 (starting 2024)", - ) - .await?; - - add_clearly_defined_curations( - &importer, - "clearly-defined-curations", - "Community-curated ClearlyDefined licenses", - ) - .await?; - - add_clearly_defined(&importer, "clearly-defined", "ClearlyDefined Definitions").await?; - - add_osv( - &importer, - "osv-pypa", - "https://github.com/pypa/advisory-database", - Some("vulns"), - None, - "Python Packaging Advisory Database", - ) - .await?; - - add_osv( - &importer, - "osv-psf", - "https://github.com/psf/advisory-database", - Some("advisories"), - None, - "Python Software Foundation Advisory Database", - ) - .await?; - - add_osv( - &importer, - "osv-r", - "https://github.com/RConsortium/r-advisory-database", - Some("vulns"), - None, - "RConsortium Advisory Database", - ) - .await?; - - add_osv( - &importer, - "osv-oss-fuzz", - "https://github.com/google/oss-fuzz-vulns", - Some("vulns"), - None, - "OSS-Fuzz vulnerabilities", - ) - .await?; - - add_osv( - &importer, - "osv-rustsec", - "https://github.com/rustsec/advisory-db", - Some("crates"), - Some("osv"), - "RustSec Advisory Database", - ) - .await?; Ok(()) }