Skip to content

Conversation

@axidex
Copy link
Contributor

@axidex axidex commented Jul 7, 2025

Description

Adding CVSS vector information to Rule.Properties. This was previously added to the JSON output in PR #484.

Output

Before

{
  "version": "2.1.0",
  "$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/main/sarif-2.1/schema/sarif-schema-2.1.0.json",
  "runs": [
    {
      "tool": {
        "driver": {
          "fullName": "Trivy Vulnerability Scanner",
          "informationUri": "https://github.com/aquasecurity/trivy",
          "name": "Trivy",
          "rules": [
            {
              "id": "CVE-2019-1549",
              "name": "OsPackageVulnerability",
              "shortDescription": {
                "text": "openssl: information disclosure in fork()"
              },
              "fullDescription": {
                "text": "OpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c)."
              },
              "defaultConfiguration": {
                "level": "warning"
              },
              "helpUri": "https://avd.aquasec.com/nvd/cve-2019-1549",
              "help": {
                "text": "Vulnerability CVE-2019-1549\nSeverity: MEDIUM\nPackage: libssl1.1\nFixed Version: 1.1.1d-r0\nLink: [CVE-2019-1549](https://avd.aquasec.com/nvd/cve-2019-1549)\nOpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c).",
                "markdown": "**Vulnerability CVE-2019-1549**\n| Severity | Package | Fixed Version | Link |\n| --- | --- | --- | --- |\n|MEDIUM|libssl1.1|1.1.1d-r0|[CVE-2019-1549](https://avd.aquasec.com/nvd/cve-2019-1549)|\n\nOpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c)."
              },
              "properties": {
                "precision": "very-high",
                "security-severity": "5.3",
                "tags": [
                  "vulnerability",
                  "security",
                  "MEDIUM"
                ]
              }
            }
          ],
          "version": "dev"
        }
      },
      "results": [...],
      "columnKind": "utf16CodeUnits",
      "originalUriBaseIds": {
        "ROOTPATH": {
          "uri": "file:///"
        }
      },
      "properties": {
        "imageID": "sha256:961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4",
        "imageName": "testdata/fixtures/images/alpine-310.tar.gz",
        "repoDigests": null,
        "repoTags": null
      }
    }
  ]
}

After

{
  "version": "2.1.0",
  "$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/main/sarif-2.1/schema/sarif-schema-2.1.0.json",
  "runs": [
    {
      "tool": {
        "driver": {
          "fullName": "Trivy Vulnerability Scanner",
          "informationUri": "https://github.com/aquasecurity/trivy",
          "name": "Trivy",
          "rules": [
            {
              "id": "CVE-2019-1549",
              "name": "OsPackageVulnerability",
              "shortDescription": {
                "text": "openssl: information disclosure in fork()"
              },
              "fullDescription": {
                "text": "OpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c)."
              },
              "defaultConfiguration": {
                "level": "warning"
              },
              "helpUri": "https://avd.aquasec.com/nvd/cve-2019-1549",
              "help": {
                "text": "Vulnerability CVE-2019-1549\nSeverity: MEDIUM\nPackage: libssl1.1\nFixed Version: 1.1.1d-r0\nLink: [CVE-2019-1549](https://avd.aquasec.com/nvd/cve-2019-1549)\nOpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c).",
                "markdown": "**Vulnerability CVE-2019-1549**\n| Severity | Package | Fixed Version | Link |\n| --- | --- | --- | --- |\n|MEDIUM|libssl1.1|1.1.1d-r0|[CVE-2019-1549](https://avd.aquasec.com/nvd/cve-2019-1549)|\n\nOpenSSL 1.1.1 introduced a rewritten random number generator (RNG). This was intended to include protection in the event of a fork() system call in order to ensure that the parent and child processes did not share the same RNG state. However this protection was not being used in the default case. A partial mitigation for this issue is that the output from a high precision timer is mixed into the RNG state so the likelihood of a parent and child process sharing state is significantly reduced. If an application already calls OPENSSL_init_crypto() explicitly using OPENSSL_INIT_ATFORK then this problem does not occur at all. Fixed in OpenSSL 1.1.1d (Affected 1.1.1-1.1.1c)."
              },
              "properties": {
                "cvss": {
                  "cvssv2_vector": "AV:N/AC:L/Au:N/C:P/I:N/A:N",
                  "cvssv3_vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
                  "cvssv2_score": 5,
                  "cvssv3_baseScore": 5.3
                },
                "precision": "very-high",
                "security-severity": "5.3",
                "tags": [
                  "vulnerability",
                  "security",
                  "MEDIUM"
                ]
              }
            }
          ],
          "version": "dev"
        }
      },
      "results": [...],
      "columnKind": "utf16CodeUnits",
      "originalUriBaseIds": {
        "ROOTPATH": {
          "uri": "file:///"
        }
      },
      "properties": {
        "imageID": "sha256:961769676411f082461f9ef46626dd7a2d1e2b2a38e6a44364bcbecf51e66dd4",
        "imageName": "testdata/fixtures/images/alpine-310.tar.gz",
        "repoDigests": null,
        "repoTags": null
      }
    }
  ]
}

Properties in rules before

"properties": {
  "precision": "very-high",
  "security-severity": "5.3",
  "tags": [
    "vulnerability",
    "security",
    "MEDIUM"
  ]
}

Properties in rules after

"properties": {
  "cvss": {
    "cvssv2_vector": "AV:N/AC:L/Au:N/C:P/I:N/A:N",
    "cvssv3_vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
    "cvssv2_score": 5,
    "cvssv3_baseScore": 5.3
  },
  "precision": "very-high",
  "security-severity": "5.3",
  "tags": [
    "vulnerability",
    "security",
    "MEDIUM"
  ]
}

Related PRs

Checklist

  • I've read the guidelines for contributing to this repository.
  • I've followed the conventions in the PR title.
  • I've added tests that prove my fix is effective or that my feature works.
  • I've updated the documentation with the relevant information (if needed).
  • I've added usage information (if the PR introduces new options)
  • I've included a "before" and "after" example to the description (if the PR is a user interface change).

@CLAassistant
Copy link

CLAassistant commented Jul 7, 2025

CLA assistant check
All committers have signed the CLA.

@axidex axidex marked this pull request as ready for review July 7, 2025 19:56
@axidex axidex requested a review from knqyf263 as a code owner July 7, 2025 19:56
@axidex axidex changed the title feat(report): adding CVSS vectors in sarif report feat(report): add CVSS vectors in sarif report Jul 7, 2025
@knqyf263 knqyf263 requested a review from DmitriyLewen July 8, 2025 05:08
},
"precision": "very-high",
"security-severity": "8.0",
"cvss-vector": nil,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: It makes no sense to add the value nil here.
Same for the other lines below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

tests aren't passing without nil failing here

--- Expected
+++ Actual
@@ -73,3 +73,4 @@
        MessageStrings: (*sarif.MessageStrings)(<nil>),
-       Properties: (sarif.Properties) (len=3) {
+       Properties: (sarif.Properties) (len=4) {
+        (string) (len=11) "cvss-vector": (interface {}) <nil>,

Copy link
Contributor Author

@axidex axidex Jul 8, 2025

Choose a reason for hiding this comment

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

},
"precision": "very-high",
"security-severity": data.cvssScore,
"cvss-vector": data.cvssVector,
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you have documentation about this field or official examples?
We need to make sure we are using the correct names/structure for this property.

Copy link

@orchestr7 orchestr7 Jul 8, 2025

Choose a reason for hiding this comment

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

It is called cvss in json output, @axidex you can follow that naming, I guess

Copy link
Contributor Author

Choose a reason for hiding this comment

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

renamed field from cvss-vector to cvss
JSON ref

Copy link
Contributor

Choose a reason for hiding this comment

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

This is our (Trivy) field name.
But I told about sarif schema.
Does sarif use similar fields?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is our (Trivy) field name. But I told about sarif schema. Does sarif use similar fields?

I didn't see anything like that in semgrep, codeql or any other tools

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created a structure for this:

type CVSSData struct {
	CVSSV2Vector string  `json:"cvssv2_vector,omitempty"`
	CVSSV2Score  float64 `json:"cvssv2_score,omitempty"`

	CVSSV3Vector string  `json:"cvssv3_vector,omitempty"`
	CVSSV3Score  float64 `json:"cvssv3_score,omitempty"`

	CVSSV40Vector string  `json:"cvssv40_vector,omitempty"`
	CVSSV40Score  float64 `json:"cvssv40_score,omitempty"`
}

Copy link
Contributor

@DmitriyLewen DmitriyLewen Jul 8, 2025

Choose a reason for hiding this comment

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

No need to create struct for this.
cvssv2_score is property. (same for other fields)
So should be (example):

              "properties": {
                "cvssv2_vector": "AV:N/AC:L/Au:N/C:P/I:N/A:N",
                "cvssv2_score": 5,
                "cvssv3_vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
                  "cvssv3_score": 5.3
                "precision": "very-high",

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No need to create struct for this. cvssv2_score is property. (same for other fields) So should be (example):

              "properties": {
                "cvssv2_vector": "AV:N/AC:L/Au:N/C:P/I:N/A:N",
                "cvssv2_score": 5,
                "cvssv3_vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
                  "cvssv3_score": 5.3
                "precision": "very-high",

Changed this in the new version

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM.
I created small refactoring, can you take a look:

diff --git a/pkg/report/sarif.go b/pkg/report/sarif.go
index 2e2268450..ee7f2b87b 100644
--- a/pkg/report/sarif.go
+++ b/pkg/report/sarif.go
@@ -43,17 +43,6 @@ var (
 	pathRegex = regexp.MustCompile(`(?P<path>.+?)(?:\s*\((?:.*?)\).*?)?$`)
 )
 
-type CVSSData struct {
-	CVSSV2Vector string
-	CVSSV2Score  float64
-
-	CVSSV3Vector string
-	CVSSV3Score  float64
-
-	CVSSV40Vector string
-	CVSSV40Score  float64
-}
-
 // SarifWriter implements result Writer
 type SarifWriter struct {
 	Output        io.Writer
@@ -78,7 +67,7 @@ type sarifData struct {
 	locationMessage  string
 	message          string
 	cvssScore        string
-	cvssData         CVSSData
+	cvssData         map[string]any
 	locations        []location
 }
 
@@ -100,7 +89,7 @@ func (sw *SarifWriter) addSarifRule(data *sarifData) {
 		WithDefaultConfiguration(&sarif.ReportingConfiguration{
 			Level: toSarifErrorLevel(data.severity),
 		}).
-		WithProperties(MakeProperties(data.title, data.severity, data.cvssScore, data.cvssData))
+		WithProperties(toProperties(data.title, data.severity, data.cvssScore, data.cvssData))
 	if data.url != nil && data.url.String() != "" {
 		r.WithHelpURI(data.url.String())
 	}
@@ -162,12 +151,13 @@ func (sw *SarifWriter) Write(_ context.Context, report types.Report) error {
 			if vuln.PkgPath != "" {
 				path = ToPathUri(vuln.PkgPath, res.Class)
 			}
+			cvssData, cvssScore := toCVSSData(vuln)
 			sw.addSarifResult(&sarifData{
 				title:            "vulnerability",
 				vulnerabilityId:  vuln.VulnerabilityID,
 				severity:         vuln.Severity,
-				cvssScore:        getCVSSScore(vuln),
-				cvssData:         getCVSSData(vuln),
+				cvssScore:        cvssScore,
+				cvssData:         cvssData,
 				url:              toUri(vuln.PrimaryURL),
 				resourceClass:    res.Class,
 				artifactLocation: toUri(path),
@@ -419,29 +409,25 @@ func (sw *SarifWriter) getLocations(name, version, path string, pkgs []ftypes.Pa
 	return locs
 }
 
-func getCVSSScore(vuln types.DetectedVulnerability) string {
-	// Take the vendor score
-	if cvss, ok := vuln.CVSS[vuln.SeveritySource]; ok {
-		return fmt.Sprintf("%.1f", cvss.V3Score)
-	}
-
-	// Converts severity to score
-	return severityToScore(vuln.Severity)
-}
-
-func getCVSSData(vuln types.DetectedVulnerability) CVSSData {
+// toCVSSData extracts CVSS data from the vulnerability and returns it along with the score.
+// If CVSS V3 Score is not available, it returns an empty CVSSData struct and a score based on severity.
+func toCVSSData(vuln types.DetectedVulnerability) (map[string]any, string) {
+	score := severityToScore(vuln.Severity)
+	var data = make(map[string]any)
 	if cvss, ok := vuln.CVSS[vuln.SeveritySource]; ok {
-		return CVSSData{
-			CVSSV2Score:   cvss.V2Score,
-			CVSSV2Vector:  cvss.V2Vector,
-			CVSSV3Score:   cvss.V3Score,
-			CVSSV3Vector:  cvss.V3Vector,
-			CVSSV40Score:  cvss.V40Score,
-			CVSSV40Vector: cvss.V40Vector,
+		data["cvssv2_vector"] = cvss.V2Vector
+		data["cvssv2_score"] = cvss.V2Score
+		data["cvssv3_vector"] = cvss.V3Vector
+		data["cvssv3_score"] = cvss.V3Score
+		data["cvssv40_vector"] = cvss.V40Vector
+		data["cvssv40_score"] = cvss.V40Score
+
+		if cvss.V3Score != 0 {
+			score = fmt.Sprintf("%.1f", cvss.V3Score)
 		}
 	}
 
-	return CVSSData{}
+	return data, score
 }
 
 func severityToScore(severity string) string {
@@ -459,7 +445,7 @@ func severityToScore(severity string) string {
 	}
 }
 
-func MakeProperties(title, severity, cvssScore string, cvssData CVSSData) sarif.Properties {
+func toProperties(title, severity, cvssScore string, cvssData map[string]any) sarif.Properties {
 	properties := sarif.Properties{
 		"tags": []string{
 			title,
@@ -470,28 +456,18 @@ func MakeProperties(title, severity, cvssScore string, cvssData CVSSData) sarif.
 		"security-severity": cvssScore,
 	}
 
-	// Add CVSS v2
-	if cvssData.CVSSV2Vector != "" {
-		properties["cvssv2_vector"] = cvssData.CVSSV2Vector
-	}
-	if cvssData.CVSSV2Score != 0 {
-		properties["cvssv2_score"] = cvssData.CVSSV2Score
-	}
-
-	// Add CVSS v3
-	if cvssData.CVSSV3Vector != "" {
-		properties["cvssv3_vector"] = cvssData.CVSSV3Vector
-	}
-	if cvssData.CVSSV3Score != 0 {
-		properties["cvssv3_score"] = cvssData.CVSSV3Score
-	}
-
-	// Add CVSS v4
-	if cvssData.CVSSV40Vector != "" {
-		properties["cvssv40_vector"] = cvssData.CVSSV40Vector
-	}
-	if cvssData.CVSSV40Score != 0 {
-		properties["cvssv40_score"] = cvssData.CVSSV40Score
+	for key, value := range cvssData {
+		switch v := value.(type) {
+		case string:
+			if v == "" {
+				continue
+			}
+		case float64:
+			if v == 0 {
+				continue
+			}
+		}
+		properties[key] = value
 	}
 
 	return properties

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the refactoring! I have made changes based on your suggestions.

@DmitriyLewen
Copy link
Contributor

DmitriyLewen commented Jul 9, 2025

@axidex Thanks for your work!

One quick question: where do you plan to use these files (with the new fields).
Why not use Trivy JSON format, for example?

@axidex
Copy link
Contributor Author

axidex commented Jul 9, 2025

@axidex Thanks for your work!

One quick question: where do you plan to use these files (with the new fields). Why not use Trivy JSON format, for example?

I used it in the orchestration of security testing tools. The unified entry point for completing scans is the parsing of SARIF reports. I have a unified structure for SARIF, but it is not compatible with JSON. This fields will be used to create combined report about whole system(based on SCA, SS, SAST, DAST/MDAST e.t.c.).

Copy link
Contributor

@DmitriyLewen DmitriyLewen left a comment

Choose a reason for hiding this comment

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

LGTM.
Left 1 small comment.

@knqyf263, can you take a look too?
aws doesn't use all the fields you add, but the changes preserve their logic.

Comment on lines 421 to 424
data["cvssv3_vector"] = cvss.V3Vector
data["cvssv3_score"] = cvss.V3Score
data["cvssv40_vector"] = cvss.V40Vector
data["cvssv40_score"] = cvss.V40Score
Copy link
Contributor

Choose a reason for hiding this comment

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

I copied the keys incorrectly.
aws uses cvssv3_baseScore.
Can you update these fields?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

Choose a reason for hiding this comment

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

wdyt about cvssv40_score.
aws used another name for v3 (score -> baseScore)
perhaps make sense use "new" format for v40?
i mean cvssv40_baseScore

Copy link
Contributor Author

Choose a reason for hiding this comment

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

wdyt about cvssv40_score. aws used another name for v3 (score -> baseScore) perhaps make sense use "new" format for v40? i mean cvssv40_baseScore

If u mean to make changes like this:
cvssv40_score -> cvssv40_baseScore
and
cvssv3_baseScore -> cvssv3_score
I think it's good. But we should migrate this too:

if cvss.V3Score != 0 {
	score = fmt.Sprintf("%.1f", cvss.V3Score)
}

Copy link
Contributor

Choose a reason for hiding this comment

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

My suggest:

cvssv2_vector
cvssv2_score
cvssv3_vector
cvssv3_baseScore
cvssv40_vector
cvssv40_baseScore

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed from cvssv40_score to cvssv40_baseScore

Copy link
Contributor

@DmitriyLewen DmitriyLewen left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!
LGTM

@knqyf263 can you quick a look?

data["cvssv2_vector"] = cvss.V2Vector
data["cvssv2_score"] = cvss.V2Score
data["cvssv3_vector"] = cvss.V3Vector
data["cvssv3_baseScore"] = cvss.V3Score
Copy link
Collaborator

@knqyf263 knqyf263 Jul 14, 2025

Choose a reason for hiding this comment

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

Could you add a comment on why we chose cvssv3_baseScore with a mix of camel and snake cases? I guess you referenced https://docs.aws.amazon.com/codecatalyst/latest/userguide/test.sarif.html, but I would like to clarify it for future reference.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could you add a comment on why we chose cvssv3_baseScore with a mix of camel and snake cases? I guess you referenced https://docs.aws.amazon.com/codecatalyst/latest/userguide/test.sarif.html, but I would like to clarify it for future reference.

Added comments in a073a27

@knqyf263 knqyf263 enabled auto-merge July 14, 2025 09:04
@knqyf263 knqyf263 added this pull request to the merge queue Jul 14, 2025
Merged via the queue into aquasecurity:main with commit 60723e6 Jul 14, 2025
12 checks passed
@axidex axidex deleted the sarif-cvss-vector branch July 20, 2025 14:45
alexlebens pushed a commit to alexlebens/infrastructure that referenced this pull request Jul 31, 2025
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [mirror.gcr.io/aquasec/trivy](https://www.aquasec.com/products/trivy/) ([source](https://github.com/aquasecurity/trivy)) | minor | `0.64.1` -> `0.65.0` |

---

### Release Notes

<details>
<summary>aquasecurity/trivy (mirror.gcr.io/aquasec/trivy)</summary>

### [`v0.65.0`](https://github.com/aquasecurity/trivy/blob/HEAD/CHANGELOG.md#0650-2025-07-30)

[Compare Source](aquasecurity/trivy@v0.64.1...v0.65.0)

##### Features

- add graceful shutdown with signal handling ([#&#8203;9242](aquasecurity/trivy#9242)) ([2c05882](aquasecurity/trivy@2c05882))
- add HTTP request/response tracing support ([#&#8203;9125](aquasecurity/trivy#9125)) ([aa5b32a](aquasecurity/trivy@aa5b32a))
- **alma:** add AlmaLinux 10 support ([#&#8203;9207](aquasecurity/trivy#9207)) ([861d51e](aquasecurity/trivy@861d51e))
- **flag:** add schema validation for `--server` flag ([#&#8203;9270](aquasecurity/trivy#9270)) ([ed4640e](aquasecurity/trivy@ed4640e))
- **image:** add Docker context resolution ([#&#8203;9166](aquasecurity/trivy#9166)) ([99cd4e7](aquasecurity/trivy@99cd4e7))
- **license:** observe pkg types option in license scanner ([#&#8203;9091](aquasecurity/trivy#9091)) ([d44af8c](aquasecurity/trivy@d44af8c))
- **misconf:** add private ip google access attribute to subnetwork ([#&#8203;9199](aquasecurity/trivy#9199)) ([263845c](aquasecurity/trivy@263845c))
- **misconf:** added logging and versioning to the gcp storage bucket ([#&#8203;9226](aquasecurity/trivy#9226)) ([110f80e](aquasecurity/trivy@110f80e))
- **repo:** add git repository metadata to reports ([#&#8203;9252](aquasecurity/trivy#9252)) ([f4b2cf1](aquasecurity/trivy@f4b2cf1))
- **report:** add CVSS vectors in sarif report ([#&#8203;9157](aquasecurity/trivy#9157)) ([60723e6](aquasecurity/trivy@60723e6))
- **sbom:** add SHA-512 hash support for CycloneDX SBOM ([#&#8203;9126](aquasecurity/trivy#9126)) ([12d6706](aquasecurity/trivy@12d6706))

##### Bug Fixes

- **alma:** parse epochs from rpmqa file ([#&#8203;9101](aquasecurity/trivy#9101)) ([82db2fc](aquasecurity/trivy@82db2fc))
- also check `filepath` when removing duplicate packages ([#&#8203;9142](aquasecurity/trivy#9142)) ([4d10a81](aquasecurity/trivy@4d10a81))
- **aws:** update amazon linux 2 EOL date ([#&#8203;9176](aquasecurity/trivy#9176)) ([0ecfed6](aquasecurity/trivy@0ecfed6))
- **cli:** Add more non-sensitive flags to telemetry ([#&#8203;9110](aquasecurity/trivy#9110)) ([7041a39](aquasecurity/trivy@7041a39))
- **cli:** ensure correct command is picked by telemetry ([#&#8203;9260](aquasecurity/trivy#9260)) ([b4ad00f](aquasecurity/trivy@b4ad00f))
- **cli:** panic: attempt to get os.Args\[1] when len(os.Args) < 2 ([#&#8203;9206](aquasecurity/trivy#9206)) ([adfa879](aquasecurity/trivy@adfa879))
- **license:** add missed `GFDL-NIV-1.1` and `GFDL-NIV-1.2` into Trivy mapping ([#&#8203;9116](aquasecurity/trivy#9116)) ([a692f29](aquasecurity/trivy@a692f29))
- **license:** handle WITH operator for `LaxSplitLicenses` ([#&#8203;9232](aquasecurity/trivy#9232)) ([b4193d0](aquasecurity/trivy@b4193d0))
- migrate from `*.list` to `*.md5sums` files for `dpkg` ([#&#8203;9131](aquasecurity/trivy#9131)) ([f224de3](aquasecurity/trivy@f224de3))
- **misconf:** correctly adapt azure storage account ([#&#8203;9138](aquasecurity/trivy#9138)) ([51aa022](aquasecurity/trivy@51aa022))
- **misconf:** correctly parse empty port ranges in google\_compute\_firewall ([#&#8203;9237](aquasecurity/trivy#9237)) ([77bab7b](aquasecurity/trivy@77bab7b))
- **misconf:** fix log bucket in schema ([#&#8203;9235](aquasecurity/trivy#9235)) ([7ebc129](aquasecurity/trivy@7ebc129))
- **misconf:** skip rewriting expr if attr is nil ([#&#8203;9113](aquasecurity/trivy#9113)) ([42ccd3d](aquasecurity/trivy@42ccd3d))
- **nodejs:** don't use prerelease logic for compare npm constraints  ([#&#8203;9208](aquasecurity/trivy#9208)) ([fe96436](aquasecurity/trivy@fe96436))
- prevent graceful shutdown message on normal exit ([#&#8203;9244](aquasecurity/trivy#9244)) ([6095984](aquasecurity/trivy@6095984))
- **rootio:** check full version to detect `root.io` packages ([#&#8203;9117](aquasecurity/trivy#9117)) ([c2ddd44](aquasecurity/trivy@c2ddd44))
- **rootio:** fix severity selection ([#&#8203;9181](aquasecurity/trivy#9181)) ([6fafbeb](aquasecurity/trivy@6fafbeb))
- **sbom:** merge in-graph and out-of-graph OS packages in scan results ([#&#8203;9194](aquasecurity/trivy#9194)) ([aa944cc](aquasecurity/trivy@aa944cc))
- **sbom:** use correct field for licenses in CycloneDX reports ([#&#8203;9057](aquasecurity/trivy#9057)) ([143da88](aquasecurity/trivy@143da88))
- **secret:** add UTF-8 validation in secret scanner to prevent protobuf marshalling errors ([#&#8203;9253](aquasecurity/trivy#9253)) ([54832a7](aquasecurity/trivy@54832a7))
- **secret:** fix line numbers for multiple-line secrets ([#&#8203;9104](aquasecurity/trivy#9104)) ([e579746](aquasecurity/trivy@e579746))
- **server:** add HTTP transport setup to server mode ([#&#8203;9217](aquasecurity/trivy#9217)) ([1163b04](aquasecurity/trivy@1163b04))
- supporting .egg-info/METADATA in python.Packaging analyzer ([#&#8203;9151](aquasecurity/trivy#9151)) ([e306e2d](aquasecurity/trivy@e306e2d))
- **terraform:** `for_each` on a map returns a resource for every key ([#&#8203;9156](aquasecurity/trivy#9156)) ([153318f](aquasecurity/trivy@153318f))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xLjMiLCJ1cGRhdGVkSW5WZXIiOiI0MS4xLjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbImltYWdlIl19-->

Reviewed-on: https://gitea.alexlebens.dev/alexlebens/infrastructure/pulls/1073
Co-authored-by: Renovate Bot <[email protected]>
Co-committed-by: Renovate Bot <[email protected]>
yutatokoi pushed a commit to yutatokoi/trivy that referenced this pull request Aug 12, 2025
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.

5 participants