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

Proposal to Improve Severity Mapping in trivy-plugin-sonarqube #7

Open
ABK-TMN opened this issue Nov 11, 2024 · 1 comment
Open

Proposal to Improve Severity Mapping in trivy-plugin-sonarqube #7

ABK-TMN opened this issue Nov 11, 2024 · 1 comment

Comments

@ABK-TMN
Copy link

ABK-TMN commented Nov 11, 2024

I would like to suggest an improvement to the severity mapping in trivy-plugin-sonarqube.

Currently, the severity mapping is as follows:

TRIVY_SONARQUBE_SEVERITY = {
    "UNKNOWN": "LOW",
    "LOW": "LOW",
    "MEDIUM": "LOW",
    "HIGH": "MEDIUM",
    "CRITICAL": "HIGH",
}

In this mapping, the Trivy severities "MEDIUM" and "HIGH" are mapped to "LOW" and "MEDIUM" in SonarQube, which may reduce severities in the reported vulnerabilities. To address this, I propose the following updated mapping:

TRIVY_SONARQUBE_SEVERITY = {
    "UNKNOWN": "LOW",
    "LOW": "LOW",
    "MEDIUM": "MEDIUM",
    "HIGH": "HIGH",
    "CRITICAL": "HIGH",
}

This revised mapping would ensure a clearer distinction between "MEDIUM" and "HIGH" severities, better aligning Trivy and SonarQube classifications.

@felipewnp
Copy link

I would go further and map critical to blocker.

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

No branches or pull requests

2 participants