Skip to content

fix(sdk): keep restored scan artifacts within their output directory - #468

Draft
mldangelo-oai wants to merge 3 commits into
mainfrom
mdangelo/codex/confine-postscan-artifact-restoration-20260815
Draft

fix(sdk): keep restored scan artifacts within their output directory#468
mldangelo-oai wants to merge 3 commits into
mainfrom
mdangelo/codex/confine-postscan-artifact-restoration-20260815

Conversation

@mldangelo-oai

@mldangelo-oai mldangelo-oai commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Keep completed scan artifact restoration within the selected scan output directory.

Changes

  • Reuse the completed-contract directory checks when restoring preserved artifacts.
  • Bind restoration to the approved canonical output root and reject linked artifact-parent directories.
  • Preserve missing-artifact restoration, cancellation behavior, and the existing synthetic post-scan coverage.
  • Merge current main additively.

Testing

  • Bun 1.3.14: bun test --timeout 30000 tests-ts/api-post-scan.test.ts tests-ts/contract.test.ts — 35 passed, 0 failed.
  • Bun 1.3.14: bun test --timeout 30000 --randomize --seed 12345 ./tests-ts with JUnit reporting — 1,294 passed, 11 skipped, 0 failed across 63 files. The skips cover Windows-only tests and the opt-in real-service integration smoke.
  • pnpm run types — passed.
  • pnpm run format — passed.
  • git diff --check 5d1afcd312933121e36dc892dcb12e8d2e3e1de3...HEAD — passed.
  • Three independent native code-review passes and a separate source verifier — no remaining findings at 4ca4c82b4f14ede84e666742c52639391a127384.
  • The standard full-suite, cross-platform, and package CI results will be checked on the pushed head.

Risk and rollout

Normal completed-artifact restoration remains unchanged. Public contract readers keep their existing path canonicalization, including supported output directories beneath directory links. Restoration now uses the same non-symlink artifact-parent requirement as completed-contract reads and stops if the approved canonical output root has changed. No public SDK export or dependency is added.

Public disclosure review

Newly authored material was reviewed for public disclosure. Existing automated review comments contain access-restricted report references; maintainer cleanup remains outstanding.

  • 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.

@github-actions github-actions Bot added the bug Something isn't working label Aug 15, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 6e0e19c3b8

ℹ️ 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

Security review completed. No security issues were found in this pull request.

Reviewed commit: 6e0e19c3b8

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current head, 4ca4c82b4f14ede84e666742c52639391a127384.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 4ca4c82b4f

ℹ️ 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

Security review completed. No security issues were found in this pull request.

Reviewed commit: 4ca4c82b4f

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

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.

1 participant