OpenAI's Codex Security CLI and TypeScript SDK for finding, validating, and fixing security vulnerabilities. npm: https://www.npmjs.com/package/@openai/codex-security
TypeScript ai-securityapplication-securityclicode-scanningcodexcodex-securitycybersecuritydevsecopsnodejsnpmopenaisdksecuritytypescriptvulnerability-scanning
docs(imports): map scanner evidence and test cross-provider replay (#2080)
Michael D'Angelo0efc652b8a85
diff --git a/README.md b/README.mdindex 38bc4c4aa..e13c6155a 100644--- a/README.md+++ b/README.md@@ -271,6 +271,7 @@ for examples.- [Online documentation](https://learn.chatgpt.com/docs/security/cli)- [Agent workflows and recovery](docs/agent-workflows.md)- [CLI reference](sdk/typescript/docs/cli.md)+- [Scanner file import schema and capability guide](docs/scanner-imports/schema-guide.md)- [Project configuration](docs/project-configuration.md)- [Examples](examples/README.md)diff --git a/docs/scanner-imports/endor.md b/docs/scanner-imports/endor.mdindex 5e3c10480..c5ed85002 100644--- a/docs/scanner-imports/endor.md+++ b/docs/scanner-imports/endor.md@@ -1,7 +1,8 @@# Import Endor Labs findingsVendor finding import and readback require `CODEX_SECURITY_ENABLE_EXTERNAL_IMPORTS=1`.-See the [opt-in instructions](../../sdk/typescript/docs/cli.md#import-vendor-findings-locally).+See the [opt-in instructions](../../sdk/typescript/docs/cli.md#import-vendor-findings-locally)+and [how saved scanner reports map to imported evidence](schema-guide.md).Use authenticated `endorctl` to export complete native Finding JSON through the[official CLI API](https://docs.endorlabs.com/developers-api/cli/commands/api).diff --git a/docs/scanner-imports/schema-guide.md b/docs/scanner-imports/schema-guide.mdnew file mode 100644index 000000000..8459b020b--- /dev/null+++ b/docs/scanner-imports/schema-guide.md@@ -0,0 +1,187 @@+# How saved scanner reports map to imported evidence++This guide covers the Wiz, Endor Labs, Snyk Open Source, Semgrep Code and GitHub+**file readers** used by `publish findings`. Acquisition produces the artifact:+for example, `snyk test` scans a workspace, while `codex-security import github`+retrieves selected code-scanning alerts. File ingestion reads the saved report.+Use the mappings to decide what one record represents, whether a later export+updates it, and what evidence a consumer can use. For setup and confirmation,+see+[import vendor findings locally](../../sdk/typescript/docs/cli.md#import-vendor-findings-locally).++## Choose the record and source key++A stored source record is scoped to **destination repository + provider + source+key + source finding ID**. Choose the key for the stream you intend to replay,+not the export date. A CVE or GHSA names an advisory; a CWE or rule ID describes+a class of issue. Neither identifies a particular installed dependency, code+location, or affected asset. Matching titles, packages or advisories are reasons+to investigate records together, not instructions to merge them.++| Reader and accepted input | Source finding ID basis | Keep the source key stable for |+| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ |+| [Wiz package JSON or detailed CSV](../../sdk/typescript/docs/cli.md#package-vulnerability-inputs); CSV requires `CloudPlatform=GitHub` and `CloudProviderURL` for a GitHub repository `/tree/<ref>` | Vendor occurrence `id` (CSV: `ID`), not the CVE | Tenant and finding family |+| [Wiz named repository collections](../../sdk/typescript/docs/cli.md#sast-repository-secrets-and-iac-inputs) | `sast:<id>`, `secret:<id>`, `iac:<id>` | Tenant and finding family |+| [Endor Finding JSON or endorctl SARIF](endor.md) | Finding `uuid` or SARIF `properties["finding-uuid"]` | Namespace, project and context |+| [Snyk Open Source CLI JSON, plugin v1 or SARIF](snyk.md) | CLI: manager, manifest, advisory, package/version and dependency path; plugin: supplied composite; SARIF: advisory, manifest set and project when known | Repository, branch, scan target and format |+| [Semgrep Code CLI/CI JSON or SARIF](semgrep.md) | Fingerprint; otherwise rule, literal path and start/end lines and columns | Organization, project and branch |+| [GitHub saved `import github` output](../../sdk/typescript/docs/cli.md#import-github-findings-locally-or-to-cloud) | Host, repository, alert number and hash of selected ref | Host, repository and code-scanning family |+| [GitHub saved `import github-advisories` output](../../sdk/typescript/docs/cli.md#import-ghsa-advisories-separately) | Host, repository **or** global scope, and GHSA ID | Separate advisory stream from alerts |++Within **one input**, duplicate IDs are ambiguous, not corroboration. Wiz and+GitHub reject a selection with duplicate accepted IDs. Endor, Snyk and Semgrep+exclude every record with the colliding identity. Inspect the source and select+the intended occurrence; don't rename records simply to make them import. Across+**separate local imports**, changed evidence updates the same record; omission+does not delete or resolve it. Cloud publication sends an expected version;+resuming a saved request keeps that value. An item error such as+`version_conflict` or `stale_source_snapshot` can reject an update instead of+replacing a newer report. Inspect the item error and current source report+before preparing a fresh submission.++## Interpret the provider evidence++- **Wiz:** `detailedName`, version, advisory and fixed version describe a+ package occurrence. Repository-branch paths can be manifests; container paths+ cannot. JSON prefers `vendorSeverity` over `severity`; repository CSV uses+ `Severity`, then `VendorSeverity`, then `CVSSSeverity`. Keep named+ `sastFindings`, `secretInstances` or `iacFindings` nodes with a repository URL+ or matching inventory. SAST can map a range, snippet, CWE and vendor verdict;+ repository secrets map detector and validation metadata, not a scanned+ revision from the introduced commit; IaC maps expected/actual configuration,+ not proof of deployment. The Wiz file reader does not map workload secrets,+ cloud configuration or external network scans. It also accepts explicitly+ normalized JSONL: supply the reviewed `source_finding_id` and `evidence`,+ retaining the raw row. The reader does not infer a mapping for other CSV+ profiles.+- **Endor Labs:** Prefer a complete native Finding, array or `list.objects`.+ `spec.level`, dependency paths/versions, advisory aliases, source SHA and+ primary SAST/AI SAST locations map when present. The project UUID does not+ verify the repository. Proposed upgrades, reachability and dismissals remain+ source claims. SARIF keeps the rule/result and direct locations but reports+ `unknown` severity, not CVSS or diagnostic level. Importing SARIF over native+ JSON for the same UUID **replaces**, rather than enriches, its snapshot.+- **Snyk CLI, plugin and Open Source SARIF:** Prefer ungrouped native+ `snyk test` JSON for package versions,+ dependency chains, advisory aliases and fix advice. A different dependency+ path can be another occurrence of the same advisory. Plugin evidence can be+ abbreviated; SARIF groups occurrences. Scan-target-relative manifests are not+ Git-root locations, and a synthetic SARIF line 1 is not a code finding. The+ formats do not reconcile their IDs. Licenses, Code, Container, IaC and+ platform backlog are outside these Open Source file formats.+- **Semgrep Code CLI and SARIF:** Supply `--source-repository-url` for these+ file formats. JSON `extra.fingerprint` or+ SARIF `matchBasedId/v1` survives a location change; without a usable+ fingerprint, a move creates a new record. Use the mapped rule, range, snippet+ and CWE to locate code. Ignored/suppressed is source state. JSON distinguishes+ Critical from High; both become diagnostic `error`, mapped to High, in Semgrep+ SARIF. Inspect the selected result for trace/fix details. Platform/MCP+ envelopes and general Supply Chain/Secrets feeds are not Code CLI or SARIF exports.+- **GitHub:** For code scanning, the selected instance supplies path/range, ref+ and commit. The rule's `security_severity_level` supplies severity; diagnostic+ `error` alone means `unknown`. An alert-wide dismissal takes precedence over+ instance state. For GHSA, a repository disclosure identifies its publisher; a+ global disclosure has no source repository. Both can carry CVE aliases,+ affected ranges and patched versions. Neither proves installation or+ applicability. Raw API pages, Dependabot and secret-scanning alerts are not+ these saved inputs.++## Read the right field++- The+ [evidence schema](../../sdk/typescript/schemas/external-findings.schema.json)+ separates the source ID from `evidence`. Its required `title` and `severity`+ are reported evidence, not a Codex rating. Severity is one of `critical`,+ `high`, `medium`, `low`, `informational`, or `unknown`; source status,+ confidence, verdicts and fix advice do not change `assessment.state`.+- `packages[].installed_version` is an observation; `vulnerable_version_range`+ is a claim about affected versions; `fixed_versions` is source guidance. Use+ `locations[].path/line` for repository navigation and optional+ `details.code.end_line` for the first location. Missing evidence stays+ missing; don't fill in a commit from the current checkout.+- Optional `details.kind` is **not** a universal scanner taxonomy. Its values+ are `sast`, `secret`, `iac` and `advisory`. Package occurrences from Wiz/Snyk+ and native Endor findings use top-level fields without requiring a kind. For+ an advisory, inspect `details.advisory.source`, not the chosen destination, to+ distinguish repository and global scope.+- Use `source_data` to inspect what the reader actually received: e.g. a Wiz+ row, Endor Finding, Snyk vulnerability plus project context, Semgrep result or+ GitHub collector envelope. It's selected evidence, not necessarily the whole+ export: unrelated scan inventories can be omitted and plugin or SARIF output+ may already be lossy. Retain the input privately if collection scope matters.++## Operate the two destinations++Local readback returns `sourceKey`, `sourceFindingId`, `version`, `evidence` and+`assessment` alongside the local record ID. The Cloud publisher sends+`source.provider` and `source.source_key` with an expected version, source+finding ID and evidence for each item. Receipt IDs for the source report,+observation and canonical finding are **destination** references, not vendor+occurrence IDs. Use the source report for evidence, not the receipt counts.++**One project, local triage.** From a checkout with a saved native Snyk report+outside it:++```sh+export CODEX_SECURITY_ENABLE_EXTERNAL_IMPORTS=1+codex-security publish findings ../reports/snyk.json --to local --provider snyk \+ --repository . --source-key example/project/main/root/native-sca --dry-run --format json+```++Check the selected repository, IDs, evidence and exclusions. Repeat without+`--dry-run` and confirm; then run+`codex-security findings imported . --format json`. Workbench SQLite stores the+snapshot and version. Repeating identical evidence is unchanged. A source+repository claim is checked against configured remotes when available; when+provenance is absent you must verify the target yourself. These records remain+`not_assessed`, separate from `findings list` and completed scans. To+investigate, compare the reported installed version or location against the+selected revision; import alone is not validation.++**Many repositories, reviewed publication.** Partition complete exports by+repository and source namespace first; don't attach a fleet-wide export to one+destination. For example, preview one Endor project and context against its+connected repository:++```sh+codex-security publish findings ../reports/endor-project-main.json --to cloud \+ --repository https://github.com/example/project --provider endor \+ --source-key example-namespace/example-project/main --dry-run --format json+```++This reads authorized destination state; it doesn't upload. Check the account,+repository, environments, eligible records and exclusions before confirming.+Local file imports do not apply the Cloud evidence limits. Cloud limits include+256 KiB per finding, depth 20 and 5 MiB per request; an oversized record is+excluded, not truncated. For example, 240 eligible findings for one destination+require at least three requests at the 100-item ceiling, possibly more for size+or environment boundaries.++Read the+[result and recovery contract](../../sdk/typescript/docs/cli.md#results-and-exit-codes):+`partial` (exit 1) can include acknowledged records alongside exclusions or item+errors. Correct the rejected records; do not treat the whole selection as+failed. After `interrupted` (exit 2), a lost response is **not** proof of+rejection. A reset can also fail during preparation. Inspect the error,+receipts, cumulative counts and unacknowledged items before choosing how to+recover:++- **`savedSubmission` identifies an existing checkpoint:** rerun the same+ approved command with unchanged input, source key, destination and endpoint to+ resume its saved requests. This also applies if the initial request was saved+ but persisting a later receipt failed.+- **No resumable checkpoint:** a repository reset retires the old request, and+ an initial checkpoint-write failure may leave no request to resume. Inspect+ the destination and correct the error; run a fresh `--dry-run` and get fresh+ approval before publishing. Do not blindly replay a command containing+ `--yes`.++Verified source-report readback is evidence of import, not a security+assessment, UI visibility or a vendor state change.++**Privacy.** Reports, full JSON previews, local state and saved Cloud request+bodies can contain source snippets, secret metadata, internal paths, private+advisories and vendor links. Select only authorized metadata (not credential+values), keep artifacts outside the checkout with restricted access and review+the destination before uploading. Don't paste raw evidence or checkpoints into+public tickets, CI logs or PRs. The readers do not promise to redact them.diff --git a/docs/scanner-imports/semgrep.md b/docs/scanner-imports/semgrep.mdindex ae71b7376..f8b67dc7f 100644--- a/docs/scanner-imports/semgrep.md+++ b/docs/scanner-imports/semgrep.md@@ -1,7 +1,8 @@# Import Semgrep Code findingsVendor finding import and readback require `CODEX_SECURITY_ENABLE_EXTERNAL_IMPORTS=1`.-See the [opt-in instructions](../../sdk/typescript/docs/cli.md#import-vendor-findings-locally).+See the [opt-in instructions](../../sdk/typescript/docs/cli.md#import-vendor-findings-locally)+and [how saved scanner reports map to imported evidence](schema-guide.md).Prefer native **Semgrep Code/SAST CLI or CI JSON** for this reader. It preservesthe scanner's original severity and source evidence. Self-contained SARIF 2.1.0@@ -82,10 +83,10 @@ trace and fix evidence. Its Critical and High ratings both become diagnosticOriginal evidence stays in `source_data`, and source state stays separate from aCodex assessment.-Both local and Cloud file imports currently apply the shared Cloud evidence-bounds, including a maximum JSON depth of 20. Deeply nested native taint traces-can exceed that bound and are excluded with a reason in the preview. The reader-preserves accepted source evidence without flattening or truncating traces.+Cloud imports apply the service's evidence limits, including a maximum JSON+depth of 20. A deeply nested taint trace can exceed that bound and be excluded+with a reason in the Cloud preview. Local storage does not impose the Cloud+size or depth limits. Neither path flattens or truncates accepted traces.Keep the supplied JSON `extra.fingerprint` or SARIF `matchBasedId/v1`fingerprint. If a later report supplies the same fingerprint after the codediff --git a/docs/scanner-imports/snyk.md b/docs/scanner-imports/snyk.mdindex 7b113a354..eb33024bd 100644--- a/docs/scanner-imports/snyk.md+++ b/docs/scanner-imports/snyk.md@@ -1,7 +1,8 @@# Snyk Open Source importsVendor finding import and readback require `CODEX_SECURITY_ENABLE_EXTERNAL_IMPORTS=1`.-See the [opt-in instructions](../../sdk/typescript/docs/cli.md#import-vendor-findings-locally).+See the [opt-in instructions](../../sdk/typescript/docs/cli.md#import-vendor-findings-locally)+and [how saved scanner reports map to imported evidence](schema-guide.md).Use the [official Snyk Codex plugin](https://github.com/snyk/studio-recipes/tree/main/plugins/codex)to collect a fresh workspace scan. The existing@@ -148,14 +149,7 @@ repository when using the default SSH port or port 22. The public`github.com`. Other hosts, nondefault SSH ports and explicit HTTPS ports remaindistinct; the importer does not infer an Enterprise host from the artifact alone.Unknown repository context requires the user to select the correct destination.-Gzip and UTF-8 BOM input are supported. All three file formats-normalize to the Cloud evidence model before either local import or Cloud publication.-Records exceeding that model's field or total-size limits appear as exclusions in-the preview, without truncation. The normalized local SDK import API has a separate-contract that accepts larger evidence. Inspect preview exclusions before importing.--The plugin and CLI paths scan the current workspace. Existing Snyk platform-findings need a separate [REST Issues API](https://docs.snyk.io/snyk-api/reference/issues)-reader with tenant access and repository mapping. This adapter does not read that-backlog or synchronize triage decisions. Synthetic contract and publication tests-do not establish live tenant, plugin-runtime or deployed Cloud compatibility.+Gzip and UTF-8 BOM input are supported. Records exceeding the destination's+field or total-size limits appear as exclusions in the preview, without+truncation. Inspect preview exclusions before importing. Synthetic tests do+not establish live tenant, plugin-runtime or deployed Cloud compatibility.diff --git a/sdk/typescript/docs/cli.md b/sdk/typescript/docs/cli.mdindex fcc74dcc0..b6352fdf4 100644--- a/sdk/typescript/docs/cli.md+++ b/sdk/typescript/docs/cli.md@@ -1268,6 +1268,8 @@ Supply the validation prompt again when rerunning.## Import vendor findings locally+Use the [scanner file import schema and capability guide](https://github.com/openai/codex-security/blob/main/docs/scanner-imports/schema-guide.md) to compare provider identities, mapped evidence and destination behavior before selecting a report.+External finding imports are disabled by default. Opt in for the current shell:```bash@@ -1335,8 +1337,9 @@ Repeated imports update the same record by repository, provider, source key, andsource finding ID. The result reports created, updated, and unchanged counts.Keep the source key stable across exports. Records omitted from a later selectionremain stored; omission does not resolve or delete a finding. Excluded records-are reported, and an import with exclusions exits with status 1. The same-supported vendor formats and evidence requirements apply locally and in Cloud.+are reported, and an import with exclusions exits with status 1. Both destinations+read the same vendor formats; Cloud's field, size and nesting limits do not apply+to local file imports.`scan import --json` and `scan import --csv` remain separate commands for importingCodex Security's findings schema as a saved scan; they do not accept vendordiff --git a/sdk/typescript/tests-ts/scanner-import-contract.test.ts b/sdk/typescript/tests-ts/scanner-import-contract.test.tsnew file mode 100644index 000000000..f510f0ca6--- /dev/null+++ b/sdk/typescript/tests-ts/scanner-import-contract.test.ts@@ -0,0 +1,246 @@+import { writeFile } from "node:fs/promises";+import { join } from "node:path";+import { expect, test } from "bun:test";+import { prepareLocalExternalImport } from "../src/external-findings-import.js";+import { listLocalExternalFindings } from "../src/external-findings-local.js";+import { readExternalFindings } from "../src/external-findings-read.js";+import type { Provider } from "../src/external-import-models.js";+import { localFindingsFixture } from "./external-findings-local-helpers.js";+import { endorFinding, endorSarif } from "./support/endor-import-fixtures.js";+import { importedAdvisory } from "./support/github-import-fixtures.js";+import {+ semgrepJson,+ semgrepSarif,+} from "./support/semgrep-import-fixtures.js";+import { snykJson } from "./support/snyk-import-fixtures.js";+import {+ removeTemporaryDirectory,+ temporaryDirectory,+} from "./support/temporary-directories.js";++const repositoryUrl = "https://github.com/example/project";+const semgrepId =+ "semgrep:100bac96b3041ed3ef5c1b45291e7c123ab8ef615eed54af962d675f6194dd76";++const cases = [+ {+ provider: "wiz",+ report: {+ data: {+ vulnerabilityFindings: {+ nodes: [+ {+ id: "finding-example-1",+ name: "CVE-2026-0001",+ detailedName: "example-package",+ version: "1.1.0",+ vendorSeverity: "HIGH",+ severity: "LOW",+ vulnerableAsset: { id: "synthetic-asset" },+ },+ ],+ },+ },+ },+ sourceFindingId: "finding-example-1",+ evidence: {+ severity: "high",+ advisory_ids: ["CVE-2026-0001"],+ packages: [{ name: "example-package", installed_version: "1.1.0" }],+ source_data: {+ severity: "LOW",+ vulnerableAsset: { id: "synthetic-asset" },+ },+ },+ },+ {+ provider: "endor",+ report: { list: { objects: [endorFinding()] } },+ sourceFindingId: "finding-example-1",+ evidence: {+ severity: "critical",+ advisory_ids: ["CVE-2099-0001", "GHSA-2222-3333-4444"],+ locations: [{ path: "package.json" }, { path: "package-lock.json" }],+ source_data: { spec: { proposed_version: "2.0.0" } },+ },+ },+ {+ provider: "snyk",+ report: snykJson(),+ sourceFindingId:+ "snyk-json:1c8768bda0ae02bec7076a5062619f38a0d67d080ec78dddfb473804515a7113",+ evidence: {+ advisory_ids: ["SNYK-EXAMPLE-1", "CVE-2099-0001"],+ packages: [{ fixed_versions: ["1.0.1"], manifest_path: null }],+ locations: [],+ source_data: {+ vulnerability: { from: ["[email protected]", "@example/[email protected]"] },+ },+ },+ },+ {+ provider: "semgrep",+ report: semgrepJson(),+ sourceFindingId: semgrepId,+ evidence: {+ severity: "critical",+ locations: [{ path: "src/example.ts", line: 3 }],+ details: { kind: "sast", source_status: "ignored" },+ source_data: {+ result: { extra: { fingerprint: "synthetic-fingerprint" } },+ },+ },+ },+ {+ provider: "github",+ report: [importedAdvisory("global")],+ sourceFindingId: "github.com/global/security-advisory/GHSA-2345-6789-CFGH",+ evidence: {+ advisory_ids: ["GHSA-2345-6789-cfgh", "CVE-2026-0001"],+ packages: [+ {+ vulnerable_version_range: ">= 1.0.0, < 1.2.3",+ installed_version: null,+ },+ ],+ locations: [],+ details: { kind: "advisory", advisory: { source: "global" } },+ source_data: { advisory: { state: "published" } },+ },+ },+] as const;++function readerOptions(provider: Provider) {+ return provider === "semgrep"+ ? { provider, sourceRepositoryUrl: repositoryUrl }+ : { provider };+}++test.each(cases)(+ "$provider maps a saved report for Cloud without publishing it",+ async ({ provider, report, sourceFindingId, evidence }) => {+ const root = await temporaryDirectory("scanner-import-contract-");+ try {+ const path = join(root, "report.json");+ await writeFile(path, JSON.stringify(report));+ const parsed = await readExternalFindings(+ path,+ readerOptions(provider),+ "cloud",+ );+ expect(parsed.findings).toMatchObject({+ read: 1,+ excluded: [],+ findings: [{ source_finding_id: sourceFindingId, evidence }],+ });+ } finally {+ await removeTemporaryDirectory(root);+ }+ },+);++test("overlapping vendor IDs and advisories stay distinct on SQLite replay", async () => {+ const fixture = await localFindingsFixture({ remote: repositoryUrl });+ try {+ const { repository, environment } = fixture;+ const sourceKey = "example/project/main";+ const ingest = async (provider: Provider, report: unknown) => {+ const path = join(fixture.root, `${provider}.json`);+ await writeFile(path, JSON.stringify(report));+ const prepared = await prepareLocalExternalImport(+ path,+ { repository, sourceKey, ...readerOptions(provider) },+ { environment },+ );+ expect(prepared.preview.excluded).toEqual([]);+ return (await prepared.import()).counts;+ };+ const read = () =>+ listLocalExternalFindings({ repository }, { environment });+ for (const { provider, report } of cases)+ expect(await ingest(provider, report)).toEqual({+ created: 1,+ updated: 0,+ unchanged: 0,+ });++ const stored = await read();+ expect(stored).toHaveLength(cases.length);+ for (const { provider, sourceFindingId, evidence, report } of cases) {+ expect(+ stored.find((record) => record.provider === provider),+ ).toMatchObject({+ sourceKey,+ sourceFindingId,+ version: 1,+ assessment: { state: "not_assessed" },+ evidence,+ });+ expect(await ingest(provider, report)).toEqual({+ created: 0,+ updated: 0,+ unchanged: 1,+ });+ }+ expect(await read()).toEqual(stored);++ const sarif = semgrepSarif();+ const region =+ sarif.runs[0]!.results[0]!.locations[0]!.physicalLocation.region;+ region.startLine = region.endLine = 27;+ expect(await ingest("semgrep", sarif)).toEqual({+ created: 0,+ updated: 1,+ unchanged: 0,+ });+ const after = await read();+ expect(after).toHaveLength(stored.length);+ const changed = after.find((record) => record.provider === "semgrep");+ expect(changed).toMatchObject({+ id: stored.find((record) => record.provider === "semgrep")!.id,+ sourceFindingId: semgrepId,+ version: 2,+ assessment: { state: "not_assessed" },+ evidence: {+ severity: "high",+ locations: [{ path: "src/example.ts", line: 27 }],+ details: { kind: "sast", source_status: "suppressed" },+ source_data: {+ result: { codeFlows: [{ message: { text: "Synthetic dataflow" } }] },+ },+ },+ });+ expect(changed!.evidence.source_data?.["result"]).not.toHaveProperty(+ "extra",+ );+ expect(after.filter((record) => record.provider !== "semgrep")).toEqual(+ stored.filter((record) => record.provider !== "semgrep"),+ );++ expect(await ingest("endor", endorSarif())).toEqual({+ created: 0,+ updated: 1,+ unchanged: 0,+ });+ const overlapping = (await read()).filter(+ (record) => record.sourceFindingId === "finding-example-1",+ );+ expect(overlapping).toHaveLength(2);+ expect(+ overlapping.find((record) => record.provider === "endor"),+ ).toMatchObject({+ id: stored.find((record) => record.provider === "endor")!.id,+ version: 2,+ evidence: {+ severity: "unknown",+ packages: [],+ source_data: { result: { properties: { "cvss-score": 9.8 } } },+ },+ });+ expect(overlapping.find((record) => record.provider === "wiz")).toEqual(+ stored.find((record) => record.provider === "wiz"),+ );+ } finally {+ await fixture.dispose();+ }+});