{"record":{"id":"e02954d65c73a7d7","repo":"astrid-runtime/astrid","slug":"shuttle-member-is-size-bytes-exceeding-the","errorCode":null,"errorMessage":"shuttle member '{}' is {size} bytes, exceeding the {MAX_MEMBER_BYTES}-byte limit","messagePattern":"shuttle member '(.+?)' is (.+?) bytes, exceeding the (.+?)-byte limit","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-cli/src/commands/distro/shuttle.rs","lineNumber":224,"sourceCode":"        // nodes, FIFOs, sockets, and any other special entry type are\n        // rejected: a `.shuttle` only ever legitimately carries regular\n        // files, so an exotic type is either corruption or an attack.\n        if !et.is_file() {\n            bail!(\n                \"malicious shuttle detected: unsupported entry type for '{}' \\\n                 (only regular files are allowed)\",\n                entry_path.display()\n            );\n        }\n\n        // A corrupt/undecodable size field must fail closed, not be coerced\n        // to 0 — otherwise header corruption silently bypasses the cap.\n        let size = entry\n            .header()\n            .size()\n            .context(\"malicious shuttle detected: unreadable member size\")?;\n        if size > MAX_MEMBER_BYTES {\n            bail!(\n                \"shuttle member '{}' is {size} bytes, exceeding the {MAX_MEMBER_BYTES}-byte limit\",\n                entry_path.display()\n            );\n        }\n\n        let out_path = dest.join(&entry_path);\n        if let Some(parent) = out_path.parent() {\n            std::fs::create_dir_all(parent)?;\n        }\n        entry\n            .unpack(&out_path)\n            .with_context(|| format!(\"failed to unpack {}\", out_path.display()))?;\n    }\n    Ok(())\n}\n\n/// The archive-relative path of a capsule member: `capsules/<name>.capsule`.\npub(crate) fn capsule_member_path(name: &str) -> String {","sourceCodeStart":206,"sourceCodeEnd":242,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-cli/src/commands/distro/shuttle.rs#L206-L242","documentation":"`unpack` reads each member's declared size from the tar header and refuses any member larger than `MAX_MEMBER_BYTES`, mirroring the pack-side limit. The size is read explicitly (failing if the header is unreadable) so header corruption cannot silently bypass the cap.","triggerScenarios":"Calling `shuttle::unpack` on an archive whose member header declares `size() > MAX_MEMBER_BYTES`, or whose size field is unreadable (which yields the related 'unreadable member size' error).","commonSituations":"A tampered archive with inflated headers; installing a capsule packed with a larger limit by a different version of the tool; corruption from a bad transfer.","solutions":["Re-pack the capsule with the current tool version so all members fit `MAX_MEMBER_BYTES`.","Verify the archive integrity (signature/checksum) — an inflated header usually means tampering or corruption.","If content genuinely needs more space, increase `MAX_MEMBER_BYTES` consistently on both pack and unpack sides."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// check declared sizes before unpack with an archive listing\n// tar -tvf x.shuttle  -> verify every member < MAX_MEMBER_BYTES\nfn within_limit(size: u64) -> bool { size <= MAX_MEMBER_BYTES }","typeGuard":"fn within_member_limit(size: u64) -> bool { size <= MAX_MEMBER_BYTES }","tryCatchPattern":"if let Err(e) = shuttle::unpack(archive, dest) {\n    if e.to_string().contains(\"exceeding\") {\n        eprintln!(\"member exceeds limit; verify archive integrity or repack: {e}\");\n    }\n}","preventionTips":["Pack and unpack with the same tool version so limits match","Verify capsule signatures/checksums to detect tampered headers","Pre-check member sizes before shipping a capsule"],"tags":["archive","size-limit","unpack","validation"],"backgroundTag":"file-size-limit-exceeded","analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}