snyk-docker-plugin
Version:
Snyk CLI docker plugin
19 lines (18 loc) • 956 B
TypeScript
import { PluginOptions } from "../../types";
import { ExtractAction, ExtractedLayersAndManifest } from "../types";
/**
* Retrieve the products of files content from the specified oci-archive.
*
* Uses a two-pass approach:
* 1. First pass: Parse JSON metadata (manifests, configs, indexes) to determine
* which layers are needed for the target platform.
* 2. Second pass: Extract only the required layer blobs.
*
* This avoids memory issues from buffering large layer blobs unnecessarily.
*
* @param ociArchiveFilesystemPath Path to image file saved in oci-archive format.
* @param extractActions Array of pattern-callbacks pairs.
* @param options PluginOptions
* @returns Array of extracted files products sorted by the reverse order of the layers from last to first.
*/
export declare function extractArchive(ociArchiveFilesystemPath: string, extractActions: ExtractAction[], options: PluginOptions): Promise<ExtractedLayersAndManifest>;