Skip to content

Commit

Permalink
fix(cli): Fix filters with json output for vuln host command (#388)
Browse files Browse the repository at this point in the history
* fix: Fix filters with json output for vuln host command
* style: formatting
* fix: Output for 0 results found
* test: Add integration test for list-cves with json output
* style: remove line
* style: Use single block for var declaration
* style: formatting
* style: Improve 'no vuln found' message
* refactor: Address code review comments
* fix: merge conflict

Signed-off-by: Darren Murray <[email protected]>
  • Loading branch information
dmurray-lacework committed May 7, 2021
1 parent 3b3fd4e commit 282404f
Show file tree
Hide file tree
Showing 5 changed files with 273 additions and 208 deletions.
16 changes: 0 additions & 16 deletions cli/cmd/vuln_container.go
Original file line number Diff line number Diff line change
Expand Up @@ -611,16 +611,6 @@ func buildVulnerabilitySummaryReportTable(assessment *api.VulnContainerAssessmen
return mainReport.String()
}

type packageTable struct {
cveCount int
severity string
packageName string
currentVersion string
fixVersion string
packageStatus string
hostCount int
}

type vulnTable struct {
Name string
Severity string
Expand All @@ -630,12 +620,6 @@ type vulnTable struct {
CreatedBy string
}

type filteredPackageTable struct {
packages []packageTable
totalPackages int
totalUnfiltered int
}

type filteredImageTable struct {
Vulnerabilities []vulnTable
TotalVulnerabilitiesShowing int
Expand Down
Loading

0 comments on commit 282404f

Please sign in to comment.