stabilize tests

This commit is contained in:
master
2026-02-01 21:37:40 +02:00
parent 55744f6a39
commit 5d5e80b2e4
6435 changed files with 33984 additions and 13802 deletions

View File

@@ -1,229 +1,231 @@
{
"advisoryKey": "GHSA-xxxx-yyyy-zzzz",
"affectedPackages": [
{
"type": "semver",
"identifier": "npm:example/package",
"platform": null,
"versionRanges": [
{
"fixedVersion": "1.5.0",
"introducedVersion": null,
"lastAffectedVersion": null,
"primitives": {
"evr": null,
"hasVendorExtensions": true,
"nevra": null,
"semVer": {
"constraintExpression": "< 1.5.0",
"exactValue": null,
"fixed": "1.5.0",
"fixedInclusive": false,
"introduced": null,
"introducedInclusive": true,
"lastAffected": null,
"lastAffectedInclusive": false,
"style": "lessThan"
},
"vendorExtensions": {
"ecosystem": "npm",
"package": "example/package"
}
},
"provenance": {
"source": "ghsa",
"kind": "affected-range",
"value": "npm:example/package",
"decisionReason": null,
"recordedAt": "2024-10-02T00:00:00+00:00",
"fieldMask": [
"affectedpackages[].versionranges[]"
]
},
"rangeExpression": "< 1.5.0",
"rangeKind": "semver"
}
],
"normalizedVersions": [
{
"scheme": "semver",
"type": "lt",
"min": null,
"minInclusive": null,
"max": "1.5.0",
"maxInclusive": false,
"value": null,
"notes": "ghsa:npm:example/package"
}
],
"statuses": [
{
"provenance": {
"source": "ghsa",
"kind": "affected-status",
"value": "npm:example/package",
"decisionReason": null,
"recordedAt": "2024-10-02T00:00:00+00:00",
"fieldMask": [
"affectedpackages[].statuses[]"
]
},
"status": "affected"
}
],
"provenance": [
{
"source": "ghsa",
"kind": "affected",
"value": "npm:example/package",
"decisionReason": null,
"recordedAt": "2024-10-02T00:00:00+00:00",
"fieldMask": [
"affectedpackages[]"
]
}
]
}
],
"aliases": [
"CVE-2024-1111",
"GHSA-xxxx-yyyy-zzzz"
],
"canonicalMetricId": "3.1|CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"credits": [
{
"displayName": "maintainer-team",
"role": "remediation_developer",
"contacts": [
"https://github.com/maintainer-team"
],
"provenance": {
"source": "ghsa",
"kind": "credit",
"value": "maintainer-team",
"decisionReason": null,
"recordedAt": "2024-10-02T00:00:00+00:00",
"fieldMask": [
"credits[]"
]
}
},
{
"displayName": "security-reporter",
"role": "reporter",
"contacts": [
"https://github.com/security-reporter"
],
"provenance": {
"source": "ghsa",
"kind": "credit",
"value": "security-reporter",
"decisionReason": null,
"recordedAt": "2024-10-02T00:00:00+00:00",
"fieldMask": [
"credits[]"
]
}
}
],
"cvssMetrics": [
{
"baseScore": 9.8,
"baseSeverity": "critical",
"provenance": {
"source": "ghsa",
"kind": "cvss",
"value": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"decisionReason": null,
"recordedAt": "2024-10-02T00:00:00+00:00",
"fieldMask": [
"cvssmetrics[]"
]
},
"vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"version": "3.1"
}
],
"cwes": [
{
"taxonomy": "cwe",
"identifier": "CWE-79",
"name": "Cross-site Scripting",
"uri": "https://cwe.mitre.org/data/definitions/79.html",
"provenance": [
{
"source": "unknown",
"kind": "unspecified",
"value": null,
"decisionReason": null,
"recordedAt": "1970-01-01T00:00:00+00:00",
"fieldMask": []
}
]
}
],
"description": "An example advisory describing a supply chain risk.",
"exploitKnown": false,
"language": "en",
"modified": "2024-09-20T12:00:00+00:00",
"provenance": [
{
"source": "ghsa",
"kind": "document",
"value": "security/advisories/GHSA-xxxx-yyyy-zzzz",
"decisionReason": null,
"recordedAt": "2024-10-02T00:00:00+00:00",
"fieldMask": [
"advisory"
]
},
{
"source": "ghsa",
"kind": "mapping",
"value": "GHSA-xxxx-yyyy-zzzz",
"decisionReason": null,
"recordedAt": "2024-10-02T00:00:00+00:00",
"fieldMask": [
"advisory"
]
}
],
"published": "2024-09-10T13:00:00+00:00",
"references": [
{
"kind": "fix",
"provenance": {
"source": "ghsa",
"kind": "reference",
"value": "https://example.com/patch",
"decisionReason": null,
"recordedAt": "2024-10-02T00:00:00+00:00",
"fieldMask": [
"references[]"
]
},
"sourceTag": "Vendor Fix",
"summary": null,
"url": "https://example.com/patch"
},
{
"kind": "advisory",
"provenance": {
"source": "ghsa",
"kind": "reference",
"value": "https://github.com/advisories/GHSA-xxxx-yyyy-zzzz",
"decisionReason": null,
"recordedAt": "2024-10-02T00:00:00+00:00",
"fieldMask": [
"references[]"
]
},
"sourceTag": null,
"summary": null,
"url": "https://github.com/advisories/GHSA-xxxx-yyyy-zzzz"
}
],
"severity": "critical",
"summary": "Example GHSA vulnerability",
"title": "Example GHSA vulnerability"
{
"advisoryKey": "GHSA-xxxx-yyyy-zzzz",
"affectedPackages": [
{
"type": "semver",
"identifier": "npm:example/package",
"platform": null,
"versionRanges": [
{
"fixedVersion": "1.5.0",
"introducedVersion": null,
"lastAffectedVersion": null,
"primitives": {
"evr": null,
"hasVendorExtensions": true,
"nevra": null,
"semVer": {
"constraintExpression": "< 1.5.0",
"exactValue": null,
"fixed": "1.5.0",
"fixedInclusive": false,
"introduced": null,
"introducedInclusive": true,
"lastAffected": null,
"lastAffectedInclusive": false,
"style": "lessThan"
},
"vendorExtensions": {
"ecosystem": "npm",
"package": "example/package"
}
},
"provenance": {
"source": "ghsa",
"kind": "affected-range",
"value": "npm:example/package",
"decisionReason": null,
"recordedAt": "2024-10-02T00:00:00+00:00",
"fieldMask": [
"affectedpackages[].versionranges[]"
]
},
"rangeExpression": "< 1.5.0",
"rangeKind": "semver"
}
],
"normalizedVersions": [
{
"scheme": "semver",
"type": "lt",
"min": null,
"minInclusive": null,
"max": "1.5.0",
"maxInclusive": false,
"value": null,
"notes": "ghsa:npm:example/package"
}
],
"statuses": [
{
"provenance": {
"source": "ghsa",
"kind": "affected-status",
"value": "npm:example/package",
"decisionReason": null,
"recordedAt": "2024-10-02T00:00:00+00:00",
"fieldMask": [
"affectedpackages[].statuses[]"
]
},
"status": "affected"
}
],
"provenance": [
{
"source": "ghsa",
"kind": "affected",
"value": "npm:example/package",
"decisionReason": null,
"recordedAt": "2024-10-02T00:00:00+00:00",
"fieldMask": [
"affectedpackages[]"
]
}
]
}
],
"aliases": [
"CVE-2024-1111",
"GHSA-xxxx-yyyy-zzzz"
],
"canonicalMetricId": "3.1|CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"credits": [
{
"displayName": "maintainer-team",
"role": "remediation_developer",
"contacts": [
"https://github.com/maintainer-team"
],
"provenance": {
"source": "ghsa",
"kind": "credit",
"value": "maintainer-team",
"decisionReason": null,
"recordedAt": "2024-10-02T00:00:00+00:00",
"fieldMask": [
"credits[]"
]
}
},
{
"displayName": "security-reporter",
"role": "reporter",
"contacts": [
"https://github.com/security-reporter"
],
"provenance": {
"source": "ghsa",
"kind": "credit",
"value": "security-reporter",
"decisionReason": null,
"recordedAt": "2024-10-02T00:00:00+00:00",
"fieldMask": [
"credits[]"
]
}
}
],
"cvssMetrics": [
{
"baseScore": 9.8,
"baseSeverity": "critical",
"provenance": {
"source": "ghsa",
"kind": "cvss",
"value": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"decisionReason": null,
"recordedAt": "2024-10-02T00:00:00+00:00",
"fieldMask": [
"cvssmetrics[]"
]
},
"vector": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"version": "3.1"
}
],
"cwes": [
{
"taxonomy": "cwe",
"identifier": "CWE-79",
"name": "Cross-site Scripting",
"uri": "https://cwe.mitre.org/data/definitions/79.html",
"provenance": [
{
"source": "ghsa",
"kind": "weakness",
"value": "CWE-79",
"decisionReason": null,
"recordedAt": "2024-10-02T00:00:00+00:00",
"fieldMask": [
"cwes[]"
]
}
]
}
],
"description": "An example advisory describing a supply chain risk.",
"exploitKnown": false,
"language": "en",
"modified": "2024-09-20T12:00:00+00:00",
"provenance": [
{
"source": "ghsa",
"kind": "document",
"value": "security/advisories/GHSA-xxxx-yyyy-zzzz",
"decisionReason": null,
"recordedAt": "2024-10-02T00:00:00+00:00",
"fieldMask": [
"advisory"
]
},
{
"source": "ghsa",
"kind": "mapping",
"value": "GHSA-xxxx-yyyy-zzzz",
"decisionReason": null,
"recordedAt": "2024-10-02T00:00:00+00:00",
"fieldMask": [
"advisory"
]
}
],
"published": "2024-09-10T13:00:00+00:00",
"references": [
{
"kind": "fix",
"provenance": {
"source": "ghsa",
"kind": "reference",
"value": "https://example.com/patch",
"decisionReason": null,
"recordedAt": "2024-10-02T00:00:00+00:00",
"fieldMask": [
"references[]"
]
},
"sourceTag": "Vendor Fix",
"summary": null,
"url": "https://example.com/patch"
},
{
"kind": "advisory",
"provenance": {
"source": "ghsa",
"kind": "reference",
"value": "https://github.com/advisories/GHSA-xxxx-yyyy-zzzz",
"decisionReason": null,
"recordedAt": "2024-10-02T00:00:00+00:00",
"fieldMask": [
"references[]"
]
},
"sourceTag": null,
"summary": null,
"url": "https://github.com/advisories/GHSA-xxxx-yyyy-zzzz"
}
],
"severity": "critical",
"summary": "Example GHSA vulnerability",
"title": "Example GHSA vulnerability"
}

View File

@@ -26,7 +26,7 @@ public sealed class GhsaConnectorTests : IAsyncLifetime
_fixture = fixture;
}
[Fact(Skip = "Requires real PostgreSQL - run integration tests")]
[Fact]
public async Task FetchParseMap_EmitsCanonicalAdvisory()
{
var initialTime = new DateTimeOffset(2024, 10, 2, 0, 0, 0, TimeSpan.Zero);
@@ -160,7 +160,7 @@ public sealed class GhsaConnectorTests : IAsyncLifetime
Assert.Empty(pendingMappings.AsDocumentArray);
}
[Fact(Skip = "Requires real PostgreSQL - run integration tests")]
[Fact]
public async Task FetchAsync_ResumesFromPersistedCursorWindow()
{
var initialTime = new DateTimeOffset(2024, 10, 7, 0, 0, 0, TimeSpan.Zero);