Compare commits

...

1 Commits

3 changed files with 12 additions and 11 deletions

View File

@@ -190,15 +190,10 @@ impl MessageProcessor {
return;
}
// This function is stubbed out to return None on non-Windows platforms
let cwd = match std::env::current_dir() {
Ok(cwd) => cwd,
Err(_) => return,
};
if let Some((sample_paths, extra_count, failed_scan)) =
codex_windows_sandbox::world_writable_warning_details(
self.config.codex_home.as_path(),
cwd,
self.config.cwd.as_path(),
)
{
self.outgoing

View File

@@ -2300,11 +2300,10 @@ impl ChatWidget {
{
return None;
}
let cwd = match std::env::current_dir() {
Ok(cwd) => cwd,
Err(_) => return Some((Vec::new(), 0, true)),
};
codex_windows_sandbox::world_writable_warning_details(self.config.codex_home.as_path(), cwd)
codex_windows_sandbox::world_writable_warning_details(
self.config.codex_home.as_path(),
self.config.cwd.as_path(),
)
}
#[cfg(not(target_os = "windows"))]

View File

@@ -268,6 +268,13 @@ pub fn audit_everyone_writable(
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);
}