Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Add id to CVSS score #5163

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

🐛 Add id to CVSS score #5163

wants to merge 2 commits into from

Conversation

czunker
Copy link
Contributor

@czunker czunker commented Feb 4, 2025

This fixes issues with the vulnmgmt resources, where the score might show as 0.

This fixes issues with the vulnmgmt resources, where the score might show as 0.

Signed-off-by: Christian Zunker <[email protected]>
@czunker
Copy link
Contributor Author

czunker commented Feb 4, 2025

Before:

cnquery run container image ubuntu:noble-20240407.1 --config ~/demo-sa.json -c "vulnmgmt.advisories[2]{*}"
...
vulnmgmt.advisories[2]: {
  title: "glibc vulnerability"
  id: "USN-6737-2"
...
  worstScore: audit.cvss score=0
  modified: 2024-04-29 13:27:19 +0200 CEST
  published: 2025-02-04 15:00:24 +0100 CET
}

After:

cnquery run container image ubuntu:noble-20240407.1 --config ~/demo-sa.json -c "vulnmgmt.advisories[2]{*}"
...
vulnmgmt.advisories[2]: {
  title: "glibc vulnerability"
  id: "USN-6737-2"
...
  worstScore: audit.cvss score=7.3
  modified: 2024-04-29 13:27:19 +0200 CEST
  published: 2025-02-04 14:46:25 +0100 CET
}

@@ -309,3 +310,8 @@ func (p *mqlVulnPackage) id() (string, error) {
id := p.Name.Data + "-" + p.Version.Data
return id, p.Name.Error
}

func (a *mqlAuditCvss) id() (string, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thanks. I wasn't aware this is possible. I changed the code.

Signed-off-by: Christian Zunker <[email protected]>
Copy link
Contributor

github-actions bot commented Feb 5, 2025

Test Results

3 212 tests  ±0   3 208 ✅ ±0   1m 57s ⏱️ +18s
  385 suites ±0       4 💤 ±0 
   29 files   ±0       0 ❌ ±0 

Results for commit 5346127. ± Comparison against base commit 7678e80.

@czunker czunker requested a review from chris-rock February 5, 2025 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants