Skip to content

fix(security): harden trust boundaries - #3254

Merged
kwakayama merged 18 commits into
mainfrom
codex/security-boundaries-20260802
Aug 2, 2026
Merged

fix(security): harden trust boundaries#3254
kwakayama merged 18 commits into
mainfrom
codex/security-boundaries-20260802

Conversation

@kojiwakayama

@kojiwakayama kojiwakayama commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • make request auth, CORS, input, response-stream, and path boundaries fail closed on malformed or hostile values
  • harden rooted SecureFs authority while preserving native and generation-verified virtual snapshot reads
  • add bounded skill path and project-file operation budgets, including bounded buffering, no-progress rejection, cooperative yielding, and cancellation
  • remove obsolete duplicated rate-limit, sanitizer, and compatibility surfaces while retaining documented public compatibility
  • migrate filesystem consumers to physical validation where filesystem admission occurs and lexical validation only for the owned temporary build root
  • add the generated public veryfront/security API reference and tighten improved test/module-boundary ratchets
  • preserve static file serving through an explicit project-relative SecureFs boundary without relaxing the absolute-path policy
  • make browser ESM fixtures opt into their esm.sh CSP dependency explicitly; core CSP remains dependency-free

Verification

  • deno task verify:quick
  • deno task test:integration (256 suites, 2,595 steps, 0 failures)
  • deno task test:e2e:binary:fresh (62 steps, 0 failures)
  • affected server integration suites (13 suites, 123 steps, 0 failures)
  • focused security/skill/project-file suites and runtime response-stream tests
  • git range-diff across the rebase onto 99104f669f3a80e1617af3cd2e2c82ec4d5cac4e
  • git diff --check

@kojiwakayama
kojiwakayama requested a review from kwakayama as a code owner August 2, 2026 13:15

@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: eec309f3fd

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/security/input-validation/index.ts
@kojiwakayama
kojiwakayama force-pushed the codex/security-boundaries-20260802 branch from eec309f to 2bd1289 Compare August 2, 2026 13:26
Base automatically changed from codex/platform-bounded-io-capabilities-20260802 to codex/config-schema-foundations-20260802 August 2, 2026 14:11
@kojiwakayama

Copy link
Copy Markdown
Contributor Author

@codex review

@kojiwakayama
kojiwakayama force-pushed the codex/config-schema-foundations-20260802 branch from df080ea to 8a9d1f7 Compare August 2, 2026 14:16
@kojiwakayama
kojiwakayama force-pushed the codex/security-boundaries-20260802 branch from 988cabd to 0564ff8 Compare August 2, 2026 14:22

@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: 988cabd8b0

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/agent/runtime/project-skill-loader.ts
Comment thread src/agent/runtime/project-skill-loader.ts
@kojiwakayama

Copy link
Copy Markdown
Contributor Author

@codex review

1 similar comment
@kojiwakayama

Copy link
Copy Markdown
Contributor Author

@codex review

@kojiwakayama
kojiwakayama force-pushed the codex/config-schema-foundations-20260802 branch from 8a9d1f7 to 2bf1764 Compare August 2, 2026 14:30

@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: 564cbc3b4e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/security/input-validation/parsers.ts Outdated
@kojiwakayama
kojiwakayama force-pushed the codex/security-boundaries-20260802 branch 3 times, most recently from c86da37 to fb91e88 Compare August 2, 2026 15:23
Base automatically changed from codex/config-schema-foundations-20260802 to main August 2, 2026 15:43
Copilot AI review requested due to automatic review settings August 2, 2026 17:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

Copilot AI review requested due to automatic review settings August 2, 2026 17:44
@kojiwakayama
kojiwakayama force-pushed the codex/security-boundaries-20260802 branch from 4015ca8 to a7ba7e1 Compare August 2, 2026 17:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@kojiwakayama

Copy link
Copy Markdown
Contributor Author

@codex review

Comment thread src/security/input-validation/handler.test.ts Fixed
Comment thread src/security/input-validation/handler.test.ts Fixed

@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: a7ba7e15ec

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/security/path-validation/index.ts
The agent factory allowlist test counted reads by wrapping readFile, but
the skill loader now reads through readFileBytesWithinLimit, so the
counters observed nothing; wrap the bounded reader instead. The useUpload
suite left React's post-unmount scheduler task pending, tripping Deno's
leak sanitizer; unmount now drains one macrotask, matching the pattern
used across the react suites.
The dishonest-reader post-verification now surfaces the helper's
RangeError (size overflow is a RangeError across the bounded-read
surface), and preflight only emits allow-* headers for an origin the
CORS policy admits — give the OPTIONS test an admitted origin so it
exercises the positive path.
Copilot AI review requested due to automatic review settings August 2, 2026 18:11
@kojiwakayama
kojiwakayama force-pushed the codex/security-boundaries-20260802 branch from a7ba7e1 to 0a9c0bd Compare August 2, 2026 18:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@kojiwakayama

Copy link
Copy Markdown
Contributor Author

@codex review

Copilot AI review requested due to automatic review settings August 2, 2026 18:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@kojiwakayama

Copy link
Copy Markdown
Contributor Author

@codex review

@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: e710dfa06a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/security/index.ts
Comment thread src/security/index.ts
Copilot AI review requested due to automatic review settings August 2, 2026 18:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

@kwakayama
kwakayama added this pull request to the merge queue Aug 2, 2026
Merged via the queue into main with commit c32aad6 Aug 2, 2026
31 checks passed
@kwakayama
kwakayama deleted the codex/security-boundaries-20260802 branch August 2, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants