Skip to content

feat: preserve cross-scan finding relationships - #574

Merged
mldangelo-oai merged 22 commits into
mainfrom
mdangelo/codex/scan-comparison-storage
Sep 1, 2026
Merged

mldangelo-oai merged 22 commits into
mainfrom
mdangelo/codex/scan-comparison-storage

Conversation

@mldangelo-oai

@mldangelo-oai mldangelo-oai commented Aug 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Preserve confirmed finding identities across scan history while keeping uncertain and related findings separate. This remains the storage and compatibility base for #575.

Changes

  • Store and display related findings separately, reuse confirmed identities across matching batches, and check coverage across every grouped occurrence.
  • Include recurring stable finding IDs in linked history even without saved semantic matches. Reuse the indexed identity traversal and preserve explicit match reasons.
  • Reconcile current main and move the history changes into the canonical plugin source.
  • Append the history indexes as migration 40 without changing migrations 1–39. Upgrade databases from the earlier comparison preview by moving its index migration record from 33 to 40 before applying the newer migrations.
  • Preserve older custom-plugin transports, explicit comparison capabilities, centralized credential filtering, and artifact restoration.
  • Refresh bundled plugin markers to 0.1.94 and verify upgrades from both older caches and the previous PR builds, including 0.1.93.
  • Update migration fixtures to preserve unrelated migration records and format the touched Python files for the current source checks.

Testing

Current main integration on a3c110fa03ed162f68ab3a2b4c9b6646dc8bb9e5:

  • Comparison, batching, workflow and repository-history focused suites passed. The new cross-batch identity regression failed before the fix and passed afterward.
  • Python scan-history and migration suites: 89 passed. Published migrations 1-39 are unchanged.
  • Types, generated models, MCP typechecking, formatting, plugin build, Ruff lint/format and portable plugin-source checks passed.
  • The merge preserves main comparison batching and existing related-finding and confirmed-identity behavior; combined batches are validated against the complete input.

Local full-suite and installed-package checks were not repeated after this merge because the validation host repeatedly exhausted disk space. Fresh CI is requested for the new head; its outcome is separate from human approval.

Risk and rollout

No new public commands, flags, or defaults. The schema update adds indexes and normalizes only the known preview migration record; existing findings and released migrations are preserved. Related findings remain separate from confirmed identities. Merge this base before #575.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

Existing commit metadata and automated comments contain author contact metadata and account-specific links, so the second attestation remains unchecked. They are left intact. The new commits use GitHub noreply author and committer addresses; fixtures and examples are synthetic.

@github-actions github-actions Bot added the enhancement New feature or request label Aug 20, 2026
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current head, cd4b7a67c7c729fac3e4ccc1c33c963abe974374. This is the scan-history storage and compatibility portion of #567. The existing matcher remains in place on this branch.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: cd4b7a67c7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

The description now includes the final QA results and merge order. Please review the current head, cd4b7a67c7c729fac3e4ccc1c33c963abe974374. The code has not changed since the earlier review.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: cd4b7a67c7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-08-31T20:44:58.716144Z a3c110f Manual request
🔒 Security Review ✅ Completed 2026-08-29T00:23:29.078390Z 69a7ff4 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current head, 02a2e338f9f515a7a7d76d38a17e238bcbd32be0. The PR description includes the latest cleanup and QA results.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 02a2e338f9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current head, aa2ed4119c0334b896cef05c426ec1b3a5fea86f. This additive update merges current main, including #573. The PR description has the fresh compatibility and full-suite QA results. Please check migration compatibility, confirmed-link reuse, uncertainty, and coverage handling.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: aa2ed4119c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

ianw-oai
ianw-oai previously approved these changes Aug 21, 2026
Keep legacy repositories separate when preparing matching inputs, simplify finding alias bookkeeping, and retain the shared workbench stdin API. Use platform-aware Python probes and exercise comparison payloads larger than command-line limits.
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review exact head 67d380ec17b191bbf31258d0fd6ef4873676de47 against main. This additive update preserves main's stdin and Python-resolution fixes, scopes legacy records without target IDs by repository, simplifies finding-alias bookkeeping, and exercises large comparison payloads. Please check relationship grouping, coverage and uncertainty, migration compatibility, and the transport fallback for older plugins.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 67d380ec17

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mldangelo-oai mldangelo-oai changed the title feat: preserve finding relationships in scan history feat: preserve cross-scan finding relationships Aug 21, 2026
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex security review

Please security-review exact head 6ad300c against main. Focus on stored relationship validation, legacy repository scoping, stdin transport, credential isolation, and custom-plugin compatibility.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review exact head 6ad300c against main. Focus on relationship grouping, coverage and uncertainty semantics, migration compatibility, current matcher input isolation, and the fallback for older custom plugins.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

Unknown error
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 6ad300c882

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review current head d7bca7f46e0ff0a8bf1f32080000364d927aef17.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d7bca7f46e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread sdk/typescript/src/cli.ts Outdated
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review
@codex security review

Please review exact head 49aeb31, including confirmed finding identities, independent component findings, versioned custom-plugin comparison compatibility, append-only history migration, and managed plugin upgrades.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 49aeb31796

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread sdk/typescript/src/cli.ts Outdated
Comment thread sdk/typescript/src/scan-comparison.ts Outdated
Comment thread sdk/typescript/src/runtime.ts Outdated
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review
@codex security review

Please review exact head 2c87c8a, including transitive confirmed finding identities, mandatory stable-identity matches, independent component findings, previous and development custom-plugin compatibility, append-only history migration, and managed plugin upgrades.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2c87c8a476

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread sdk/typescript/src/cli.ts Outdated
Comment thread sdk/typescript/src/runtime.ts Outdated
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review
@codex security review

Please review exact head 4a3ef77, including transitive confirmed finding identities and forced matching, mandatory stable-identity matches, independent component findings, explicitly advertised custom-plugin comparison capabilities, append-only history migration, and managed plugin upgrades.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

WITH RECURSIVE linked_occurrences(occurrence_id) AS (
SELECT ?
UNION
SELECT CASE
WHEN matches.before_occurrence_id = linked.occurrence_id

P2 Badge Return every transitive linked finding

For a confirmed chain A↔B↔C, this new recursive traversal correctly includes all three scans when computing knownScanIds, but the matches returned by the function still come from the preceding one-hop query, so finding_matches(A) contains only B. Consequently scans show --show-linked-findings, whose help promises findings linked across previous scans, omits C even though the same result advertises C as part of the finding's confirmed history. Project the recursive component into the returned linked findings as well as the endpoint metadata.

AGENTS.md reference: sdk/typescript/AGENTS.md:L16-L16

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread sdk/typescript/src/runtime.ts Outdated
Comment thread sdk/typescript/src/scan-comparison.ts Outdated
@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review
@codex security review

Please review exact head 710ab32, including canonical transitive confirmed finding identities across matcher entrypoints and forced matching, mandatory stable-identity matches, independent component findings, line-wrap-tolerant explicit custom-plugin comparison capabilities, append-only history migration, and managed plugin upgrades.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 710ab321fe

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review current head 1a7cc47bcb36262bf3da5dbc3a643be41818f715, especially the conflict resolutions and compatibility with existing scan-history databases.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review current head 6606adae86a86a1b5077ff357feaaffb44b38b97, including the conflict resolutions, migration compatibility, and updated history fixtures.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6606adae86

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/codex-security/scripts/workbench_scan_history.py Outdated
@kmbroai

kmbroai commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

Approval follow-up on current head 6606adae86a86a1b5077ff357feaaffb44b38b97:

The blockers from my earlier review are addressed. The scan-history migration is now append-only at version 40, the changes are applied to the canonical plugin source with synchronized bundle metadata, the updated history fixtures cover the reconciled schema, and current-head CI plus the security review are green.

I do not have any further code changes to request before approval. This PR is ready for approval once GitHub finishes recomputing its mergeability state.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review current head 69a7ff409e1ed0ec4f4a512f18ce0bdbb0a09f82. Linked finding history now includes recurring stable IDs without requiring saved semantic matches. It reuses the indexed identity traversal and preserves explicit match reasons. Regression tests reproduce the missing history before the fix and pass afterward.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 69a7ff409e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@kmbroai kmbroai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved at 69a7ff409e1ed0ec4f4a512f18ce0bdbb0a09f82. The migration reconciliation, canonical plugin integration, linked-history follow-up, and exact-head CI/security review are complete.

@mldangelo-oai

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review current head a3c110fa03ed162f68ab3a2b4c9b6646dc8bb9e5 after the additive merge from main, including the conflict resolution and preserved behavior. Focused validation is recorded in the PR description.

@mldangelo-oai
mldangelo-oai merged commit a82fc14 into main Sep 1, 2026
39 checks passed
@mldangelo-oai
mldangelo-oai deleted the mdangelo/codex/scan-comparison-storage branch September 1, 2026 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants