{"record":{"id":"b008d858cd2cf460","repo":"Hmbown/CodeWhale","slug":"secure-external-credential-reads-are-unsupported-o","errorCode":null,"errorMessage":"secure external credential reads are unsupported on this platform","messagePattern":"secure external credential reads are unsupported on this platform","errorType":"exception","errorClass":"std::io::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/external_credentials.rs","lineNumber":640,"sourceCode":"            continue;\n        }\n        let metadata = std::fs::symlink_metadata(&current)?;\n        if metadata.file_attributes() & FILE_ATTRIBUTE_REPARSE_POINT != 0 {\n            return Err(io::Error::new(\n                io::ErrorKind::PermissionDenied,\n                format!(\n                    \"external credential path contains reparse point {}\",\n                    codewhale_config::quote_os_path(&current)\n                ),\n            ));\n        }\n    }\n    Ok(())\n}\n\n#[cfg(not(any(unix, windows)))]\nfn open_secure_regular_file(_path: &Path, _require_owner_only: bool) -> io::Result<File> {\n    Err(io::Error::new(\n        io::ErrorKind::Unsupported,\n        \"secure external credential reads are unsupported on this platform\",\n    ))\n}\n\n#[cfg(test)]\npub(crate) fn reset_side_effect_trap() {\n    SIDE_EFFECT_TRAP.with(|trap| trap.set([0; 5]));\n}\n\n#[cfg(test)]\n#[must_use]\npub(crate) fn side_effect_trap_counts() -> (usize, usize) {\n    SIDE_EFFECT_TRAP.with(|trap| {\n        let counts = trap.get();\n        (counts[0], counts[1])\n    })\n}","sourceCodeStart":622,"sourceCodeEnd":658,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/external_credentials.rs#L622-L658","documentation":"Compile-time platform guard in open_secure_regular_file: with neither unix nor windows target cfg enabled, there is no implementation for hardened credential file opening, so any call fails unconditionally. This is a static limitation, not a runtime fault of a specific file.","triggerScenarios":"Thrown at crates/tui/src/external_credentials.rs:640 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Port open_secure_regular_file to the target platform with equivalent owner/permission checks.","Run the credential flows on a supported platform (unix or windows).","Disable features that require secure external-credential reads on unsupported platforms."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}