Expand description
Capability-gated I/O for credentials owned by another CLI.
Every external open/read stays behind an opaque grant. Consumption opens one absolute regular file through a no-follow traversal, validates that same handle, and reads a bounded payload from it. This prevents a consented path from being redirected through a leaf or parent symlink/reparse point and avoids the old exists-then-read race.
Functions§
- read_
codewhale_ owned_ to_ string - Read one Codewhale-owned credential file through the same no-follow,
bounded I/O boundary used for external grants. On Unix the opened handle
must belong to the effective user and have no group/other permission bits.
The caller is responsible for constraining
pathto a validated basename below Codewhale’s credentials directory before invoking this function. - read_
to_ string - Open and read the exact granted file once. Missing files are reported as
Ok(None); every other unsafe or malformed filesystem shape fails closed.