Skip to content

Add policy-based file contents integrity checks - #51828

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/4f52faed822a1bbb4ed33a9975af0718a5f85662
Oct 7, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/4f52faed822a1bbb4ed33a9975af0718a5f85662

Conversation

@copyberry

@copyberry copyberry Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Add policy-based file contents integrity checks

What changed

Export FileContentsChecker and structured integrity findings from codex-rs/sandboxing to identify existing containment dependency files whose contents are writable under a prepared filesystem policy. Findings include the requested target, its resolved path, and the write roots that permit modification.

Resolve symlinks in targets, write roots, and read-only carveouts, and respect protected metadata paths and deny globs matching resolved contents. Missing targets produce no finding; non-file targets return an error. Callers remain responsible for dependency inventory, reporting, enforcement, and handling full-disk write access.

Testing

Add unit tests covering write grants, read-only and denied carveouts, overlapping grants, deny globs, symlink resolution, protected metadata, and missing targets.

## What changed

Export `FileContentsChecker` and structured integrity findings from `codex-rs/sandboxing` to identify existing containment dependency files whose contents are writable under a prepared filesystem policy. Findings include the requested target, its resolved path, and the write roots that permit modification.

Resolve symlinks in targets, write roots, and read-only carveouts, and respect protected metadata paths and deny globs matching resolved contents. Missing targets produce no finding; non-file targets return an error. Callers remain responsible for dependency inventory, reporting, enforcement, and handling full-disk write access.

## Testing

Add unit tests covering write grants, read-only and denied carveouts, overlapping grants, deny globs, symlink resolution, protected metadata, and missing targets.

GitOrigin-RevId: 4f52faed822a1bbb4ed33a9975af0718a5f85662
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/4f52faed822a1bbb4ed33a9975af0718a5f85662 branch from 10a67ed to 11da6b9 Compare October 7, 2026 20:54
@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

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-10-07T20:54:24.879281Z 10a67ed 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.

@copyberry
copyberry Bot merged commit 11da6b9 into main Oct 7, 2026
1 check passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/4f52faed822a1bbb4ed33a9975af0718a5f85662 branch October 7, 2026 20:54
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 7, 2026
@Cyber-neeXia
Cyber-neeXia deployed to issue-triage October 7, 2026 21:08 — with Image GitHub Actions Active
@Cyber-neeXia
Cyber-neeXia deployed to issue-triage October 7, 2026 21:08 — with Image GitHub Actions Active
@Cyber-neeXia
Cyber-neeXia deployed to issue-triage October 7, 2026 21:08 — with Image GitHub Actions Active
@purpleidea
purpleidea deployed to issue-triage October 7, 2026 21:10 — with Image GitHub Actions Active
@purpleidea
purpleidea deployed to issue-triage October 7, 2026 21:10 — with Image GitHub Actions Active
@purpleidea
purpleidea deployed to issue-triage October 7, 2026 21:10 — with Image GitHub Actions Active
@purpleidea
purpleidea deployed to issue-triage October 7, 2026 21:12 — with Image GitHub Actions Active
@sstephens93
sstephens93 deployed to issue-triage October 7, 2026 21:16 — with Image GitHub Actions Active
@sstephens93
sstephens93 deployed to issue-triage October 7, 2026 21:16 — with Image GitHub Actions Active
@sstephens93
sstephens93 deployed to issue-triage October 7, 2026 21:16 — with Image GitHub Actions Active

This branch was successfully deployed

1 active deployment
issue-triage — 11da6b9e Deployed Oct 7, 2026 by sstephens93 via Identify potential duplicates (all issues) #52796
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants