snyk-docker-plugin
Version:
Snyk CLI docker plugin
23 lines (22 loc) • 1.65 kB
TypeScript
/// <reference types="node" />
import { AutoDetectedUserInstructions, ImageType } from "../types";
import { PluginOptions } from "../types";
import { ExtractAction, ExtractedLayers, ExtractionResult, ImageConfig } from "./types";
export declare class InvalidArchiveError extends Error {
constructor(message: any);
}
/**
* Given a path on the file system to a image archive, open it up to inspect the layers
* and look for specific files. File content can be transformed with a custom callback function if needed.
* @param fileSystemPath Path to an existing archive.
* @param extractActions This denotes a file pattern to look for and how to transform the file if it is found.
* By default the file is returned raw if no processing is desired.
*/
export declare function extractImageContent(imageType: ImageType, fileSystemPath: string, extractActions: ExtractAction[], options: Partial<PluginOptions>): Promise<ExtractionResult>;
export declare function getRootFsLayersFromConfig(imageConfig: ImageConfig): string[];
export declare function getPlatformFromConfig(imageConfig: ImageConfig): string | undefined;
export declare function getDetectedLayersInfoFromConfig(imageConfig: any): AutoDetectedUserInstructions;
export declare function getUserInstructionLayersFromConfig(imageConfig: any): any;
export declare function isWhitedOutFile(filename: string): RegExpMatchArray | null;
export declare function getContentAsBuffer(extractedLayers: ExtractedLayers, extractAction: ExtractAction): Buffer | undefined;
export declare function getContentAsString(extractedLayers: ExtractedLayers, extractAction: ExtractAction): string | undefined;