Skip to content

Conversation

@iceweasel-oai
Copy link
Contributor

3 improvements:

  1. show up to 3 actual paths that are world-writable
  2. do the scan/warning for Read-Only mode too, because it also applies there
  3. remove the "Cancel" option since it doesn't always apply (like on startup)

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

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.

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

@iceweasel-oai
Copy link
Contributor Author

@codex review

Copy link
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

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.

ℹ️ 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 +654 to 656
if let Ok(ref paths) = result
&& !paths.is_empty()
{
Copy link
Contributor

Choose a reason for hiding this comment

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

P1 Badge Avoid unstable let-chains in scan check

The new guard in spawn_world_writable_scan uses if let Ok(ref paths) = result && !paths.is_empty(), which relies on the let_chains feature (codex-rs/tui/src/app.rs lines 654‑656). This syntax is still unstable on the Rust channel used by the repo, so the crate will not compile (rustc emits E0658: "let expressions in this position are unstable"). Please split the guard into a normal if let followed by an explicit if !paths.is_empty() (or equivalent) so the code builds on stable Rust.

Useful? React with 👍 / 👎.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@codex The workspace pins rust-toolchain.toml:2 to 1.90.0, where let-chains are stable. This compiles just fine, all CI checks pass. Not going to change this

Copy link
Contributor

Choose a reason for hiding this comment

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

Summary

  • Added logging for failed world-writable scans so we record the error and still surface the warning with a failed_scan flag when the sandbox audit cannot complete. tui/src/app.rsL640-L688
  • Clarified that windows_world_writable_flagged treats scan failures as unsafe by using map_or(true, …) and documenting why errors still trigger the warning path. tui/src/chatwidget.rsL2142-L2155

Testing

  • cargo test -p codex-tui

View task →

Copy link
Collaborator

@etraut-openai etraut-openai left a comment

Choose a reason for hiding this comment

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

Looks good overall. I left one recommendation.

let title_line = Line::from("Unprotected directories found").bold();
let info_line = if failed_scan {
Line::from(vec![
"We couldn't complete the world-writable scan, so protections cannot be verified. "
Copy link
Collaborator

Choose a reason for hiding this comment

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

Minor nit: It's a bit unusual and inconsistent to use "We" in an error message like this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ahh yeah, I agree. Lemme land this and update in my next PR (it should be rare for folks to ever see this message)

@iceweasel-oai iceweasel-oai merged commit a47181e into main Nov 8, 2025
25 checks passed
@iceweasel-oai iceweasel-oai deleted the dev/iceweasel/world-writable-warning-better branch November 8, 2025 19:35
@github-actions github-actions bot locked and limited conversation to collaborators Nov 8, 2025
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.

3 participants