From 2190c828d176e5ea8b61b497a24a6aeaf91e40fe Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Wed, 15 Jan 2025 08:18:22 +0100 Subject: [PATCH] test(osv): Update expected results Signed-off-by: Sebastian Schuberth --- ...erabilities-by-commit-expected-result.json | 288 +++++++++++++++++- ...s-by-name-and-version-expected-result.json | 3 +- .../kotlin/OsvServiceWrapperFunTest.kt | 3 + 3 files changed, 290 insertions(+), 4 deletions(-) diff --git a/clients/osv/src/funTest/assets/vulnerabilities-by-commit-expected-result.json b/clients/osv/src/funTest/assets/vulnerabilities-by-commit-expected-result.json index 2a8cfb30d887b..c2f66ecf237ef 100644 --- a/clients/osv/src/funTest/assets/vulnerabilities-by-commit-expected-result.json +++ b/clients/osv/src/funTest/assets/vulnerabilities-by-commit-expected-result.json @@ -2,7 +2,7 @@ { "schema_version": "1.6.0", "id": "CVE-2021-45931", - "modified": "2025-01-14T10:04:30.272433Z", + "modified": "2025-01-15T02:09:35.531195Z", "published": "2022-01-01T01:15:08Z", "details": "HarfBuzz 2.9.0 has an out-of-bounds write in hb_bit_set_invertible_t::set (called from hb_sparseset_t::set and hb_set_copy).", "severity": [ @@ -33,6 +33,9 @@ { "introduced": "0" }, + { + "fixed": "d3e09bf4654fe5478b6dbf2b26ebab6271317d81" + }, { "fixed": "d3e09bf4654fe5478b6dbf2b26ebab6271317d81" } @@ -218,7 +221,7 @@ { "schema_version": "1.6.0", "id": "CVE-2022-33068", - "modified": "2024-12-05T15:34:17.553308Z", + "modified": "2025-01-15T02:27:15.461350Z", "published": "2022-06-23T17:15:14Z", "related": [ "ALSA-2022:8384", @@ -941,6 +944,8 @@ ], "versions": [ "10.0.1-1", + "10.1.0-1", + "10.1.0-2", "2.7.4-1", "5.1.0-1", "5.2.0-1", @@ -1039,6 +1044,9 @@ { "introduced": "0" }, + { + "fixed": "62e803b36173fd096d7ad460dd1d1db9be542593" + }, { "fixed": "62e803b36173fd096d7ad460dd1d1db9be542593" } @@ -1244,7 +1252,7 @@ { "schema_version": "1.6.0", "id": "CVE-2023-25193", - "modified": "2025-01-14T11:34:29.731201Z", + "modified": "2025-01-15T04:45:08.160317Z", "published": "2023-02-04T20:15:08Z", "related": [ "ALSA-2023:4158", @@ -1423,6 +1431,9 @@ { "introduced": "0" }, + { + "fixed": "85be877925ddbf34f74a1229f3ca1716bb6170dc" + }, { "fixed": "85be877925ddbf34f74a1229f3ca1716bb6170dc" } @@ -1630,6 +1641,277 @@ } ] }, + { + "schema_version": "1.6.0", + "id": "CVE-2024-56732", + "modified": "2025-01-15T05:17:02.718296Z", + "published": "2024-12-27T20:15:23Z", + "aliases": [ + "GHSA-qmp9-xqm5-jh6m" + ], + "related": [ + "UBUNTU-CVE-2024-56732" + ], + "details": "HarfBuzz is a text shaping engine. Starting with 8.5.0 through 10.0.1, there is a heap-based buffer overflow in the hb_cairo_glyphs_from_buffer function.", + "affected": [ + { + "package": { + "ecosystem": "Debian:13", + "name": "harfbuzz", + "purl": "pkg:deb/debian/harfbuzz?arch=source" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "0" + }, + { + "fixed": "10.1.0-2" + } + ] + } + ], + "versions": [ + "10.0.1-1", + "10.1.0-1", + "6.0.0+dfsg-3", + "8.0.0-1", + "8.0.0-2", + "8.0.0-3", + "8.0.1-1", + "8.3.0-1", + "8.3.0-2", + "9.0.0-1" + ], + "ecosystem_specific": { + "urgency": "not yet assigned" + }, + "database_specific": { + "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-56732.json" + } + }, + { + "ranges": [ + { + "type": "GIT", + "repo": "https://github.com/harfbuzz/harfbuzz", + "events": [ + { + "introduced": "0" + }, + { + "fixed": "1767f99e2e2196c3fcae27db6d8b60098d3f6d26" + } + ] + } + ], + "versions": [ + "0.6.0", + "0.9.1", + "0.9.10", + "0.9.11", + "0.9.12", + "0.9.13", + "0.9.14", + "0.9.15", + "0.9.16", + "0.9.17", + "0.9.18", + "0.9.19", + "0.9.2", + "0.9.20", + "0.9.21", + "0.9.22", + "0.9.23", + "0.9.24", + "0.9.25", + "0.9.26", + "0.9.27", + "0.9.28", + "0.9.29", + "0.9.3", + "0.9.30", + "0.9.31", + "0.9.32", + "0.9.33", + "0.9.34", + "0.9.35", + "0.9.36", + "0.9.37", + "0.9.38", + "0.9.39", + "0.9.4", + "0.9.40", + "0.9.41", + "0.9.42", + "0.9.5", + "0.9.6", + "0.9.7", + "0.9.8", + "0.9.9", + "1.0.0", + "1.0.1", + "1.0.2", + "1.0.3", + "1.0.4", + "1.0.5", + "1.0.6", + "1.1.0", + "1.1.1", + "1.1.2", + "1.1.3", + "1.2.0", + "1.2.1", + "1.2.2", + "1.2.3", + "1.2.4", + "1.2.5", + "1.2.6", + "1.2.7", + "1.3.0", + "1.3.1", + "1.3.2", + "1.3.3", + "1.3.4", + "1.4.0", + "1.4.1", + "1.4.2", + "1.4.3", + "1.4.4", + "1.4.5", + "1.4.6", + "1.4.7", + "1.4.8", + "1.5.0", + "1.5.1", + "1.6.0", + "1.6.1", + "1.6.2", + "1.6.3", + "1.7.0", + "1.7.1", + "1.7.2", + "1.7.3", + "1.7.4", + "1.7.5", + "1.7.6", + "1.7.7", + "1.8.0", + "1.8.1", + "1.8.2", + "1.8.3", + "1.8.4", + "1.8.5", + "1.8.6", + "1.8.7", + "1.8.8", + "1.9.0", + "10.0.0", + "10.0.1", + "10.1.0", + "2.0.0", + "2.0.1", + "2.0.2", + "2.1.0", + "2.1.1", + "2.1.2", + "2.1.3", + "2.2.0", + "2.3.0", + "2.3.1", + "2.4.0", + "2.5.0", + "2.5.1", + "2.5.2", + "2.5.3", + "2.6.0", + "2.6.1", + "2.6.2", + "2.6.3", + "2.6.4", + "2.6.5", + "2.6.6", + "2.6.7", + "2.6.8", + "2.7.0", + "2.7.1", + "2.7.2", + "2.7.3", + "2.7.4", + "2.8.0", + "2.8.1", + "2.8.2", + "2.9.0", + "2.9.1", + "3.0.0", + "3.1.0", + "3.1.1", + "3.1.2", + "3.2.0", + "3.3.0", + "3.3.1", + "3.3.2", + "3.4.0", + "4.0.0", + "4.0.1", + "4.1.0", + "4.2.0", + "4.2.1", + "4.3.0", + "4.4.0", + "4.4.1", + "5.0.0", + "5.0.1", + "5.1.0", + "5.2.0", + "5.3.0", + "5.3.1", + "6.0.0", + "7.0.0", + "7.0.1", + "7.1.0", + "7.2.0", + "7.3.0", + "8.0.0", + "8.0.1", + "8.1.0", + "8.1.1", + "8.2.0", + "8.2.1", + "8.2.2", + "8.3.0", + "8.3.1", + "8.4.0", + "8.5.0", + "9.0.0", + "hb-rename", + "ng-mergepoint", + "ng-start", + "pango-extractpoint", + "pango-start" + ], + "database_specific": { + "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-56732.json" + } + } + ], + "references": [ + { + "type": "ADVISORY", + "url": "https://github.com/harfbuzz/harfbuzz/security/advisories/GHSA-qmp9-xqm5-jh6m" + }, + { + "type": "FIX", + "url": "https://github.com/harfbuzz/harfbuzz/commit/1767f99e2e2196c3fcae27db6d8b60098d3f6d26" + }, + { + "type": "ADVISORY", + "url": "https://security-tracker.debian.org/tracker/CVE-2024-56732" + } + ] + }, { "schema_version": "1.6.0", "id": "OSV-2020-484", diff --git a/clients/osv/src/funTest/assets/vulnerabilities-by-name-and-version-expected-result.json b/clients/osv/src/funTest/assets/vulnerabilities-by-name-and-version-expected-result.json index d4a22982c079c..659077efafc9f 100644 --- a/clients/osv/src/funTest/assets/vulnerabilities-by-name-and-version-expected-result.json +++ b/clients/osv/src/funTest/assets/vulnerabilities-by-name-and-version-expected-result.json @@ -752,7 +752,8 @@ "CGA-ph4r-hmw2-vp9r", "CGA-rwrm-vm7r-mrmj", "CGA-w4rq-c3cf-82f3", - "CGA-x9j2-vg55-h4p4" + "CGA-x9j2-vg55-h4p4", + "CVE-2024-34064" ], "summary": "Jinja vulnerable to HTML attribute injection when passing user input as keys to xmlattr filter", "details": "The `xmlattr` filter in affected versions of Jinja accepts keys containing non-attribute characters. XML/HTML attributes cannot contain spaces, `/`, `>`, or `=`, as each would then be interpreted as starting a separate attribute. If an application accepts keys (as opposed to only values) as user input, and renders these in pages that other users see as well, an attacker could use this to inject other attributes and perform XSS. The fix for the previous GHSA-h5c8-rqwp-cp95 CVE-2024-22195 only addressed spaces but not other characters.\n\nAccepting keys as user input is now explicitly considered an unintended use case of the `xmlattr` filter, and code that does so without otherwise validating the input should be flagged as insecure, regardless of Jinja version. Accepting _values_ as user input continues to be safe.", diff --git a/clients/osv/src/funTest/kotlin/OsvServiceWrapperFunTest.kt b/clients/osv/src/funTest/kotlin/OsvServiceWrapperFunTest.kt index f84bc90bf5c9d..a0f422c364f18 100644 --- a/clients/osv/src/funTest/kotlin/OsvServiceWrapperFunTest.kt +++ b/clients/osv/src/funTest/kotlin/OsvServiceWrapperFunTest.kt @@ -23,6 +23,8 @@ import io.kotest.core.spec.style.StringSpec import io.kotest.matchers.collections.shouldContainExactlyInAnyOrder import io.kotest.matchers.result.shouldBeSuccess import io.kotest.matchers.shouldBe +import kotlinx.serialization.json.Json +import kotlinx.serialization.json.JsonNamingStrategy import java.time.Instant @@ -100,6 +102,7 @@ class OsvServiceWrapperFunTest : StringSpec({ "CVE-2021-45931", "CVE-2022-33068", "CVE-2023-25193", + "CVE-2024-56732", "OSV-2020-484" ), emptyList(),