Documentation ¶
Index ¶
- func ExtractArchiveToTempDir(ctx context.Context, path string) (string, error)
- func ExtractBz2(ctx context.Context, d, f string) error
- func ExtractDeb(ctx context.Context, d, f string) error
- func ExtractGzip(ctx context.Context, d string, f string) error
- func ExtractRPM(ctx context.Context, d, f string) error
- func ExtractTar(ctx context.Context, d string, f string) error
- func ExtractUPX(ctx context.Context, d, f string) error
- func ExtractZip(ctx context.Context, d string, f string) error
- func ExtractZlib(ctx context.Context, d string, f string) error
- func ExtractionMethod(ext string) func(context.Context, string, string) error
- func IsValidPath(target, dir string) bool
- func OCI(ctx context.Context, path string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractArchiveToTempDir ¶
extractArchiveToTempDir creates a temporary directory and extracts the archive file for scanning.
func ExtractBz2 ¶
Extract Bz2 extracts bzip2 files.
func ExtractDeb ¶
ExtractDeb extracts .deb packages.
func ExtractGzip ¶
extractGzip extracts .gz archives.
func ExtractRPM ¶
extractRPM extracts .rpm packages.
func ExtractTar ¶
extractTar extracts .apk and .tar* archives.
func ExtractZip ¶
ExtractZip extracts .jar and .zip archives.
func ExtractZlib ¶
extractZlib extracts extension-agnostic zlib-compressed files.
func ExtractionMethod ¶
func IsValidPath ¶
isValidPath checks if the target file is within the given directory.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.