mirror of
https://github.com/deps-rs/deps.rs.git
synced 2024-11-24 19:16:31 +00:00
parent
468a86c92e
commit
1e1ac2ad0a
1 changed files with 7 additions and 3 deletions
|
@ -43,10 +43,14 @@ impl DependencyAnalyzer {
|
||||||
let query = database::Query::new().package_version(name, version);
|
let query = database::Query::new().package_version(name, version);
|
||||||
|
|
||||||
if let Some(db) = advisory_db {
|
if let Some(db) = advisory_db {
|
||||||
let vulnerabilities = db.query(&query);
|
let vulnerabilities: Vec<_> = db
|
||||||
|
.query(&query)
|
||||||
|
.into_iter()
|
||||||
|
.filter(|vuln| !vuln.metadata.yanked)
|
||||||
|
.map(|v| v.to_owned())
|
||||||
|
.collect();
|
||||||
if !vulnerabilities.is_empty() {
|
if !vulnerabilities.is_empty() {
|
||||||
dep.vulnerabilities =
|
dep.vulnerabilities = vulnerabilities;
|
||||||
vulnerabilities.into_iter().map(|v| v.to_owned()).collect();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue