Skip to main content

Crate kache_format

Crate kache_format 

Source
Expand description

Cache-entry metadata and validation shared by local and remote storage.

Structs§

CachedFile
EntryMeta
Metadata stored alongside cached artifacts.

Constants§

CACHE_KEY_VERSION
Cache-key recipe version written into entry metadata.
GATED_EMIT_KINDS
Emit kinds represented by the current entry format.

Functions§

is_blob_hash
A blob hash is a 64-char blake3 hex digest. Validated where untrusted meta.json enters (download/import) so a malformed hash can never reach path construction or the integrity gate (#211).
is_safe_artifact_name
A cached artifact’s name must be a single, normal path component — no absolute/rooted path, no .., no separators. meta.json names are attacker-influenced for a shared/MITM’d bucket, and Path::join with an absolute or ..-bearing component escapes the entry/target dir (e.g. dir.join("/etc/x") == "/etc/x"), giving an arbitrary read/overwrite primitive. Enforced at the import and restore trust boundaries (#211).
is_valid_cache_key
Is s a well-formed cache key: exactly 64 lowercase hex chars, matching the blake3::Hash::to_hex() output produced by cache-key recipes?
is_valid_crate_name
Is s a crate name safe to use as an S3 object-key path component?