Hmbown/CodeWhale · error · std::io::Error
secure external credential reads are unsupported on this pla
Error message
secure external credential reads are unsupported on this platform
What it means
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.
Source
Thrown at crates/tui/src/external_credentials.rs:640
continue;
}
let metadata = std::fs::symlink_metadata(¤t)?;
if metadata.file_attributes() & FILE_ATTRIBUTE_REPARSE_POINT != 0 {
return Err(io::Error::new(
io::ErrorKind::PermissionDenied,
format!(
"external credential path contains reparse point {}",
codewhale_config::quote_os_path(¤t)
),
));
}
}
Ok(())
}
#[cfg(not(any(unix, windows)))]
fn open_secure_regular_file(_path: &Path, _require_owner_only: bool) -> io::Result<File> {
Err(io::Error::new(
io::ErrorKind::Unsupported,
"secure external credential reads are unsupported on this platform",
))
}
#[cfg(test)]
pub(crate) fn reset_side_effect_trap() {
SIDE_EFFECT_TRAP.with(|trap| trap.set([0; 5]));
}
#[cfg(test)]
#[must_use]
pub(crate) fn side_effect_trap_counts() -> (usize, usize) {
SIDE_EFFECT_TRAP.with(|trap| {
let counts = trap.get();
(counts[0], counts[1])
})
}View on GitHub (pinned to 0c42157ee5)
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.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at crates/tui/src/external_credentials.rs:640 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20).
Data as JSON: /api/errors/b008d858cd2cf460.
Report an issue: GitHub.