Skip to content

Reject non-boolean replace_all plan values - #3

Merged
1x0f8 merged 1 commit into
mainfrom
codex/fix-llm-plan-type-confusion-vulnerability
Aug 11, 2026
Merged

Reject non-boolean replace_all plan values#3
1x0f8 merged 1 commit into
mainfrom
codex/fix-llm-plan-type-confusion-vulnerability

Conversation

@1x0f8

@1x0f8 1x0f8 commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Motivation

  • The LLM plan schema treats replace_all as a boolean, but the local validatePlan did not enforce that type, allowing string values like "false" to be cast to true during execution and causing unintended global replacements.

Description

  • Enforce that replace_all is a boolean in validatePlan to reject missing or non-boolean replace_text operations (file: src/Agent.php).
  • Add a regression assertion to tests/smoke.php that validates a string-valued replace_all (e.g. 'false') is rejected by plan validation.

Testing

  • Ran PHP lint across bin, config, public, src, and tests with php -l and there were no syntax errors.
  • Executed the smoke test php tests/smoke.php which passed and includes the new assertion preventing non-boolean replace_all values.

Codex Task

@1x0f8
1x0f8 merged commit 626d3d0 into main Aug 11, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant