Skip to main content

Module tarball

Module tarball 

Source
Expand description

Safe tarball extraction with defense-in-depth against path traversal.

extract_safe takes any impl Read source and a target directory, iterates entries manually, and rejects any entry that would escape the target directory, is not a regular file or directory, or would be written through a pre-planted symlink.

This module has no dependency on HTTP, ureq, or GithubClient. The split seam from the network layer is at the impl Read boundary.

Enums§

Error
Errors returned by tarball extraction operations.

Functions§

extract_safe
Extract a .tar.gz archive from source into target, rejecting any entry that would escape the target or is not a regular file/directory.