Skip to content

Conversation

@iceweasel-oai
Copy link
Contributor

this enables app-server to pass in the correct workspace cwd for the current conversation

}

// This function is stubbed out to return None on non-Windows platforms
let cwd = match std::env::current_dir() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dylan-hurd-oai this is where you'll want to update it to use the conversation's cwd

Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's just pass in self.config.cwd here

return None;
}
codex_windows_sandbox::world_writable_warning_details(self.config.codex_home.as_path())
let cwd = match std::env::current_dir() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should use config.cwd here

}

// This function is stubbed out to return None on non-Windows platforms
let cwd = match std::env::current_dir() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's just pass in self.config.cwd here

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 +194 to +197
let cwd = match std::env::current_dir() {
Ok(cwd) => cwd,
Err(_) => return,
};
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 Preserve failed-scan notification

If std::env::current_dir() fails we now return early, so the client never receives the WindowsWorldWritableWarning notification. Before this change, world_writable_warning_details returned Some((Vec::new(), 0, true)), allowing the UI to display the failed-scan warning. Please keep propagating the failure (for example, by sending the notification with failed_scan = true) so users are still informed when the scan cannot run.

Useful? React with 👍 / 👎.

Comment on lines 268 to +276
for p in &flagged {
list.push_str(&format!("\n - {}", p.display()));
}
crate::logging::log_note(
&format!(
"AUDIT: world-writable scan FAILED; checked={checked}; duration_ms={elapsed_ms}; flagged:{}",
list
),
logs_base_dir,
);

return Ok(flagged);
}
// Log success once if nothing flagged
crate::logging::log_note(
&format!(
"AUDIT: world-writable scan OK; checked={checked}; duration_ms={elapsed_ms}"
),
&format!("AUDIT: world-writable scan OK; checked={checked}; duration_ms={elapsed_ms}"),
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 Restore failure logging

When flagged is non-empty we used to log the detailed failure via crate::logging::log_note, but that call disappeared in this revision. As a result we no longer emit the audit failure message to the logs, so operators lose visibility into which paths were world-writable. Please reinstate the logging before returning the flagged list.

Useful? React with 👍 / 👎.

@iceweasel-oai iceweasel-oai merged commit b3d3204 into main Nov 19, 2025
25 checks passed
@iceweasel-oai iceweasel-oai deleted the dev/iceweasel/world-writable-scan-cwd branch November 19, 2025 18:10
@github-actions github-actions bot locked and limited conversation to collaborators Nov 19, 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