Skip to content

fix(cli): reject NUL bytes in binary overview paths - #9751

Closed
ShuaixinHuang wants to merge 1 commit into
morluto:mainfrom
ShuaixinHuang:fix/analyze-path-nul-v2
Closed

ShuaixinHuang wants to merge 1 commit into
morluto:mainfrom
ShuaixinHuang:fix/analyze-path-nul-v2

Conversation

@ShuaixinHuang

@ShuaixinHuang ShuaixinHuang commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Addresses #9749.

Aligns the analyze CLI path schema with the shared local path boundary by rejecting empty and NUL-containing paths before execution.

Author readiness

Human owner: @ShuaixinHuang

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T02:00:43.230049Z cf07563 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.

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

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

Comment on lines +3 to +6
const localPath = z
.string()
.min(1)
.regex(/^[^\x00]*$/u, "Local path cannot contain NUL");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Reuse the shared local-path schema

The shared boundary already exports localPathStringSchema from src/domain/localPath.ts with these exact nonempty/NUL-free constraints, and src/cli/firmwareCommands.ts already uses it directly with Incur. Introducing an independent copy here means changes to the shared path contract must also be maintained separately for analyze. AGENTS.md requires directly related cleanup of duplicated interpretations when fixing a boundary bug; import and use the existing schema instead of defining another owner for the same validation rule.

AGENTS.md reference: AGENTS.md:L25-L25

Useful? React with 👍 / 👎.

@morluto morluto closed this Nov 10, 2026
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.

2 participants