Skip to main content

read_delivered_artifact_bounded

Function read_delivered_artifact_bounded 

pub fn read_delivered_artifact_bounded(path: &Path) -> Result<Vec<u8>, String>
Expand description

Bounded, no-follow read of an already-delivered artifact under the workspace uploads/ directory, for the ACP consumer that embeds the blob. The artifact is opened once beneath its parent directory handle (cap-std, no-follow), its size is taken from that handle, and at most MAX_DELIVER_FILE_BYTES + 1 bytes are read from the same handle. A workspace writer that grows or replaces the content-addressed file between the tool’s write and this read therefore cannot cause an unbounded read, and a replacement symlink is refused, not followed.