Fluxion::Executor::Archive
Extracts one named member from a gzipped tar archive.
Written rather than delegated because the safety properties are the point. A release tarball is attacker-influenced input, so this reader:
- bounds the decompressed stream, not just the compressed file, which is what stops a decompression bomb;
- bounds each entry individually;
- selects by an exact post-strip path match, never by basename, because two members can share one;
- refuses symlinks, hardlinks, and device nodes, so nothing can redirect the extraction outside the destination.
Only tar.gz is handled in-process. .zip and .tar.xz are delegated,
rather than growing two more parsers with the same obligations.
Constants
Header fields, at their fixed USTAR offsets.
GNU long-name records: the following header's name comes from this entry's body rather than its own name field.
Regular files. \0 is the pre-POSIX spelling of 0.
Instance methods
Extracts the member at archive_path (after stripping strip_components
leading path segments) into destination. Returns its SHA-256.
Lists the regular-file members, for diagnostics when a path does not match. Bounded like everything else here.
GNU tar writes ./bin/rg when archiving a directory's contents, but a
profile author writes bin/rg. The prefix carries no meaning, so it is
removed rather than made the user's problem.