Updates to scanner with CVE saving and auto update
This commit is contained in:
@@ -397,9 +397,28 @@ extension VulnerabilityService {
|
||||
return assessments.map { original in
|
||||
var item = original
|
||||
item.vendorStatus = "Unverified"
|
||||
item.vendorEvidence =
|
||||
"Ubuntu archive provenance not established for installed PHP packages. " +
|
||||
"Third-party or custom builds require independent verification."
|
||||
let ubuntuMatches = report.packageOrigins.filter {
|
||||
$0.hasPrefix("UBUNTU_REPOSITORY_MATCH|")
|
||||
}
|
||||
|
||||
let otherMatches = report.packageOrigins.filter {
|
||||
$0.hasPrefix("OTHER_REPOSITORY_MATCH|")
|
||||
}
|
||||
|
||||
if !ubuntuMatches.isEmpty && otherMatches.isEmpty {
|
||||
item.vendorEvidence =
|
||||
"Installed PHP package versions match official Ubuntu repository entries. " +
|
||||
"Installed binary provenance has not been independently verified; " +
|
||||
"vendor CVE status remains Unverified."
|
||||
} else if !otherMatches.isEmpty {
|
||||
item.vendorEvidence =
|
||||
"One or more PHP package versions match third-party repositories. " +
|
||||
"Ubuntu vendor CVE status remains Unverified."
|
||||
} else {
|
||||
item.vendorEvidence =
|
||||
"Ubuntu archive provenance not established for installed PHP packages. " +
|
||||
"No confirmed Ubuntu repository matches were collected."
|
||||
}
|
||||
return item
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user