Skip to content

fix: validate code evidence paths - #1567

Merged
mldangelo-oai merged 5 commits into
openai:mainfrom
peter-research:fix/code-evidence-safe-paths
Oct 19, 2026
Merged

mldangelo-oai merged 5 commits into
openai:mainfrom
peter-research:fix/code-evidence-safe-paths

Conversation

@peter-research

@peter-research peter-research commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The SDK could load unsafe codeEvidence[].path values in sealed scans even though the Python producer rejects them. Apply the existing canonical source-path policy while preserving valid POSIX filenames. Addresses #541.

Changes

  • Validate code-evidence paths with the SDK helper already used for finding locations.
  • Preserve valid colon-containing names and original sealed text.
  • Keep the generated schema unchanged and add producer/reader regression coverage for accepted and rejected paths.
  • Verify publication rejects unsafe paths while preserving snippets for valid paths that cannot produce safe source links.

Testing

  • Python finalizer and example suites: 192 passed, 2 skipped, 147 subtests passed.
  • SDK contract and publication suites: 121 passed, 453 assertions (92 contract tests and 29 publication tests). Baseline reader comparisons also verified.
  • All five portable plugin checks passed: pinned Ruff lint/format, SDK build:ci, source compatibility checker, and its 9 Node tests.
  • Package type and format checks passed; independent review found no remaining issue.
  • Contract tests used the tracked non-MCP plugin fixture projection. Full native packaging and the complete SDK suite remain unverified locally.

Risk and rollout

No public CLI changes. Unsafe code-evidence paths now fail SDK loading, matching producer behavior. Previously supported POSIX filenames and sealed path spellings remain accepted.

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.

@mldangelo-oai mldangelo-oai 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.

The added pattern rejects supported POSIX source names in both finalization and sealed loading. Please preserve the existing source-path contract when applying it to code evidence.

Comment thread plugins/codex-security/schemas/findings.schema.json Outdated

@mldangelo-oai mldangelo-oai 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.

Code evidence now uses the existing SDK path policy, preserving valid colon-containing filenames and sealed bytes. The producer and reader regression checks pass.

@mldangelo-oai mldangelo-oai 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.

The code-evidence validation preserves valid filenames and sealed text. Publication coverage now verifies both unsafe-path rejection and unchanged snippets for valid paths without source links. The 121 focused contract/publication tests, type checks, formatting, and portable checks pass.

@mldangelo-oai
mldangelo-oai merged commit 5df9b77 into openai:main Oct 19, 2026
98 of 113 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 19, 2026
3 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants