Skip to content

Commit

Permalink
🐛 Extend vulnmgmt for cnspec vuln command
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Zunker <[email protected]>
  • Loading branch information
czunker committed Dec 5, 2023
1 parent a37a388 commit 41292c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions providers-sdk/v1/upstream/gql/vulnmgmt_gql.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ func (c *MondooClient) GetIncognitoVulnReport(platform mondoogql.PlatformInput,
Packages []struct {
Package
}
Stats ReportStats
} `graphql:"... on AssetIncognitoVulnerabilityReport"`
} `graphql:"analyseIncognitoAssetVulnerabilities(input: $input)"`
}
Expand All @@ -236,6 +237,7 @@ func (c *MondooClient) GetIncognitoVulnReport(platform mondoogql.PlatformInput,
Advisories: make([]*Advisory, len(m.AssetVulnerabilityReportResponse.AssetIncognitoVulnerabilityReport.Advisories)),
Cves: make([]*Cve, len(m.AssetVulnerabilityReportResponse.AssetIncognitoVulnerabilityReport.Cves)),
Packages: make([]*Package, len(m.AssetVulnerabilityReportResponse.AssetIncognitoVulnerabilityReport.Packages)),
Stats: &m.AssetVulnerabilityReportResponse.AssetIncognitoVulnerabilityReport.Stats,
}

for i := range m.AssetVulnerabilityReportResponse.AssetIncognitoVulnerabilityReport.Advisories {
Expand Down
1 change: 1 addition & 0 deletions providers/vsphere/resources/vulnmgmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ func (v *mqlVulnmgmt) getReport() (*gql.VulnReport, error) {
}

func (v *mqlVulnmgmt) getIncognitoReport(mondooClient *gql.MondooClient) (*gql.VulnReport, error) {
// FIXME: wrong connection
conn := v.MqlRuntime.Connection.(shared.Connection)
platform := conn.Asset().Platform

Expand Down

0 comments on commit 41292c2

Please sign in to comment.