feat(report): Change the priority of CVE information in Debian (#1202)

* fix (bug) : using ScanResults refs #1019

* feat(gost): WIP change priority of CVE Info in Debian

* feat(report): change priority of CVE Info in Debian

* refactor: move RemoveRaspbianPackFromResult

* style: remove comment

* fix: lint error

* style: change coding style

* feat(report): support reporting with gost alone

* fix: merge error

* refactor(debian): change code to be simple
This commit is contained in:
Norihiro NAKAOKA
2021-06-21 15:14:41 +09:00
committed by GitHub
parent 43b46cb324
commit b8db2e0b74
10 changed files with 223 additions and 69 deletions

View File

@@ -291,12 +291,11 @@ func (r ScanResult) IsContainer() bool {
}
// RemoveRaspbianPackFromResult is for Raspberry Pi and removes the Raspberry Pi dedicated package from ScanResult.
func (r ScanResult) RemoveRaspbianPackFromResult() ScanResult {
func (r ScanResult) RemoveRaspbianPackFromResult() *ScanResult {
if r.Family != constant.Raspbian {
return r
return &r
}
result := r
packs := make(Packages)
for _, pack := range r.Packages {
if !IsRaspbianPackage(pack.Name, pack.Version) {
@@ -311,10 +310,10 @@ func (r ScanResult) RemoveRaspbianPackFromResult() ScanResult {
}
}
result.Packages = packs
result.SrcPackages = srcPacks
r.Packages = packs
r.SrcPackages = srcPacks
return result
return &r
}
// ClearFields clears a given fields of ScanResult