-
Notifications
You must be signed in to change notification settings - Fork 3
ci(security): Trivy correctness fixes and a complete-coverage report #230
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
Merged
+165
−62
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
cd7214d
ci(security): honor repo-root .trivyignore, guard SARIF upload, scan …
Gregory91G b156a3b
ci(security): report every severity, dev deps, comments and orphaned …
Gregory91G 7f73828
ci(security): report only — no security check blocks a merge
Gregory91G cb86614
ci(security): keep the image scan at CRITICAL/HIGH
Gregory91G File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: constructorfabric/insight-front
Length of output: 306
🏁 Script executed:
Repository: constructorfabric/insight-front
Length of output: 5971
🌐 Web query:
Trivy --severity UNKNOWN documentation💡 Result:
In Trivy, the UNKNOWN severity signifies that a vulnerability's severity rating could not be determined from the available data sources [1][2]. Key aspects regarding the UNKNOWN severity include: Severity Assignment Logic: Trivy automatically aggregates severity data from multiple sources (such as NVD, GHSA, and OS-specific vendors) to provide the most accurate assessment [1][3]. If no configured vendor or data source provides a severity rating for a vulnerability, Trivy defaults to UNKNOWN [1][2]. Customizing Severity Sources: Users can control how severities are determined using the --vuln-severity-source flag [1][4]. This allows you to specify a priority list of data sources [4]. Trivy will check these sources in the order provided; if none of the specified sources contain a severity, it will fall back to UNKNOWN [1][4]. For example: --vuln-severity-source nvd,ghsa: Trivy checks NVD first, then GHSA, and returns UNKNOWN if neither provides a severity [4]. Reasons for UNKNOWN Severity: - Data Delay: Some vendors (like NVD) may delay severity analysis for new vulnerabilities, while others may provide it more quickly [1][5]. - Missing Detail: Vulnerabilities detected via OS advisories (e.g., Alpine secdb) may lack severity information in the underlying vulnerability database if the detail entry has not yet been populated [6]. - Light Database Mode: Using the --light option may result in UNKNOWN severities because the lightweight database lacks detailed vulnerability information (such as CVSS scores) often used to calculate severity [7]. Trivy Severity Mapping: In Trivy's internal classification, UNKNOWN is mapped to the value 0, while others are assigned as follows [1][2]: 0: Unknown 1: Low 2: Medium 3: High 4: Critical
Citations:
--vuln-severity-sourceflag to customize vulnerability severity selection aquasecurity/trivy#8180nvdandsourcedon't have severity for vulnerability aquasecurity/trivy#6714🌐 Web query:
Trivy UNKNOWN severity documentation💡 Result:
In Trivy, the "UNKNOWN" severity indicates that a vulnerability's severity level could not be determined from any of the available data sources (such as NVD, GHSA, or vendor-specific databases) [1][2][3]. Key points regarding the UNKNOWN severity: Determination Logic: Trivy automatically attempts to assign a severity based on a prioritized list of sources [1][2][4]. If no vendor or data source provides a specific severity rating, and it cannot be calculated via a CVSS score, Trivy assigns it the UNKNOWN severity [1][3]. Avoiding UNKNOWNs: To minimize the occurrence of UNKNOWN severities, Trivy is designed to use severity ratings from various vendors as fallbacks. For example, even if an NVD severity is not yet available, Trivy may use severity data from other vendors (like Red Hat) to provide a more actionable assessment [1][3][5]. Customization: Users can influence how severity is determined using the --vuln-severity-source flag [1][2][6]. This allows you to define a custom order of priority for severity sources. If you specify a sequence of sources, Trivy will check them in that order; if none of the specified sources contain a severity, Trivy will result in an UNKNOWN severity [1][2][6]. Reporting: In the context of reporting, UNKNOWN is considered a severity level (mapped to numerical value 0), distinct from other levels like Low, Medium, High, and Critical [1][2][3]. It is also important to distinguish this from vulnerability "status" (e.g., "unknown" status), which refers to whether a package is affected by a vulnerability on a specific platform [7]. For technical verification, you can check the SeveritySource field in Trivy's JSON output to identify exactly which source provided the severity (or if it was unable to be determined) for a specific vulnerability [2][3].
Citations:
nvdandsourcedon't have severity for vulnerability aquasecurity/trivy#6714--vuln-severity-sourceflag to customize vulnerability severity selection aquasecurity/trivy#8180Include Trivy’s
UNKNOWNseverity end to end.--severity CRITICAL,HIGH,MEDIUM,LOWfilters outUNKNOWNfindings, while the summary later says it reports every severity. AddUNKNOWNto the scan and include it in the summary counts/ranking so vulnerabilities without a determined severity are not silently omitted.🤖 Prompt for AI Agents
Source: MCP tools