{"record":{"id":"ccf608db66a27bca","repo":"openai/codex","slug":"path-is-not-a-file-ccf608","errorCode":null,"errorMessage":"path `{}` is not a file","messagePattern":"path `(.+?)` is not a file","errorType":"validation","errorClass":"io::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/exec-server/src/regular_file.rs","lineNumber":12,"sourceCode":"use std::io;\nuse std::path::Path;\nuse tokio::io::AsyncReadExt;\n\npub(crate) async fn open(path: &Path) -> io::Result<tokio::fs::File> {\n    let mut options = tokio::fs::OpenOptions::new();\n    options.read(true);\n    configure_open(&mut options);\n\n    let file = options.open(path).await?;\n    if !is_disk_file(&file) || !file.metadata().await?.is_file() {\n        return Err(io::Error::new(\n            io::ErrorKind::InvalidInput,\n            format!(\"path `{}` is not a file\", path.display()),\n        ));\n    }\n    Ok(file)\n}\n\n/// Reads a regular UTF-8 file without following a symlink at its final path component.\npub async fn read_sensitive_file_to_string(path: &Path) -> io::Result<String> {\n    let mut options = tokio::fs::OpenOptions::new();\n    options.read(true);\n    configure_open(&mut options);\n\n    #[cfg(unix)]\n    options.custom_flags(libc::O_NONBLOCK | libc::O_NOFOLLOW);\n\n    #[cfg(windows)]\n    {","sourceCodeStart":1,"sourceCodeEnd":30,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/exec-server/src/regular_file.rs#L1-L30","documentation":"Error \"path `{}` is not a file\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/exec-server/src/regular_file.rs:12 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}