Skip to content

fix(plugin): preserve nested attack-path evidence in previews - #691

Merged
soyeon-oai merged 3 commits into
mainfrom
codex/fix-finding-preview-attack-path-depth
Aug 27, 2026
Merged

fix(plugin): preserve nested attack-path evidence in previews#691
soyeon-oai merged 3 commits into
mainfrom
codex/fix-finding-preview-attack-path-depth

Conversation

@soyeon-oai

@soyeon-oai soyeon-oai commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Preserve valid nested attack-path string arrays in saved finding previews instead of replacing their elements with null.

This supersedes #511 and carries its original fix forward onto the current canonical plugin source after the plugin ownership migration.

Fixes #490.

Changes

  • Keep the existing depth limit for individually bounded finding sections.
  • Allow one additional container level only when already-bounded sections are embedded into the complete finding preview.
  • Thread the selected maximum depth through recursive JSON bounding rather than changing the default limit globally.
  • Apply the fix to plugins/codex-security, leaving _bundled_plugin as generated package output.
  • Add regression coverage for the supported nested string-array shapes and for one unsupported additional nesting level.

Testing

  • Focused Bun tests: 7 passed, 0 failed.
  • pnpm run check:plugin-source
  • pnpm run types
  • Generated and validated the npm tarball, including installed CLI and MCP initialization smoke checks.
  • Compared 508 deterministic normal and adversarial preview inputs; the 16 KB complete-preview bound and section depth limit remained enforced.
  • Ran scans show --json against the saved reproduction from scans show replaces nested attack-path strings with null #490; nested evidence references, transformations, and preconditions remained strings rather than null.

Risk and rollout

Low. Byte budgets, field ordering, per-section depth limits, and guidance reservation behavior are unchanged. The complete finding wrapper accounts for its own container level, while section projections retain the existing default depth cap. The generated npm payload is still produced from the canonical plugin source during build and release.

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.

Change impact

The final preview wrapper now accounts for its own container level, so supported nested strings survive without relaxing section limits.

flowchart LR
  subgraph column_0["Saved finding"]
    direction TB
    node_0["Read saved finding details<br/><code>finding_result</code>"]
  end
  subgraph column_1["Preview projection"]
    direction TB
    node_1["Preserve supported nesting<br/><code>bounded_finding_details</code>"]
  end
  subgraph column_2["CLI result"]
    direction TB
    node_2["Return intact evidence strings<br/><code>scans show</code>"]
    node_3["Keep the depth boundary covered<br/><code>finding-preview.test.ts</code>"]
  end
  node_0 -->|"projects"| node_1
  node_1 -->|"returns"| node_2
  node_1 -->|"covered by"| node_3
  class node_0 context
  class node_1 changed
  class node_2 affected
  class node_3 affected
  classDef changed fill:#d7f5e5,stroke:#237a4b,color:#111
  classDef affected fill:#e6f0ff,stroke:#3569a8,color:#111
  classDef context fill:#f2f3f5,stroke:#6e7781,color:#111
Loading

Limits: GitHub CI was still running at this exact head when the evidence was collected. · Local package checks do not prove that this commit has been released to npm.

Source evidence (5)

@github-actions github-actions Bot added the bug Something isn't working label Aug 27, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 27, 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 Completed 2026-08-27T22:18:47.970886Z 2ed926c PR opened
🔒 Security Review Completed 2026-08-27T22:19:00.636914Z 2ed926c PR opened
ℹ️ 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.

@soyeon-oai
soyeon-oai merged commit d35019a into main Aug 27, 2026
66 of 96 checks passed
@soyeon-oai
soyeon-oai deleted the codex/fix-finding-preview-attack-path-depth branch August 27, 2026 22:42
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.

scans show replaces nested attack-path strings with null

3 participants