Skip to content

Commit

Permalink
Add 'Executive summary' command (#4)
Browse files Browse the repository at this point in the history
Summarise how many CVEs affect this system

Needed for gardenlinux/glvd#118
  • Loading branch information
fwilhe committed Sep 27, 2024
1 parent b279c3f commit 2f7a090
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,4 @@ jobs:
- run: chmod +x glvd-client/glvd-client
- run: ./glvd-client/glvd-client check
- run: ./glvd-client/glvd-client what-if frr vim
- run: ./glvd-client/glvd-client executive-summary
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ func main() {
dpkgSourcePackages := getDpkgSourcePackages(dpkgStatusFilePath)
cves = getCvesForPackageList(dpkgSourcePackages, gardenLinuxVersion)
printCves(cves, jsonOutput)
case "executive-summary":
dpkgSourcePackages := getDpkgSourcePackages(dpkgStatusFilePath)
cves = getCvesForPackageList(dpkgSourcePackages, gardenLinuxVersion)
fmt.Printf("This machine has %d potential security issues\nRun `%s check` to get the full list\n", len(cves), programName)
}

}
Expand Down

0 comments on commit 2f7a090

Please sign in to comment.