snyk-docker-plugin
Version:
Snyk CLI docker plugin
25 lines (24 loc) • 1.36 kB
TypeScript
import { StaticAnalysis } from "./analyzer/types";
import { DockerFileAnalysis } from "./dockerfile/types";
import { DistributionDigests } from "./extractor/fetch-registry-distribution-digests";
import { ImageName } from "./extractor/image";
import { ResolvedAttestationManifest } from "./extractor/types";
import { ImageType, PluginOptions, PluginResponse } from "./types";
export declare function analyzeStatically(targetImage: string, dockerfileAnalysis: DockerFileAnalysis | undefined, imageType: ImageType, imagePath: string, globsToFind: {
include: string[];
exclude: string[];
}, options: Partial<PluginOptions>, imageName?: ImageName): Promise<PluginResponse>;
export declare const REGISTRY_METADATA_DEADLINE_MS = 30000;
interface RegistryMetadata {
attestations?: ResolvedAttestationManifest[];
digests?: DistributionDigests;
}
/**
* Fetches registry-side metadata for an image identifier scan: provenance
* attestations and the manifest/index digests of the scanned platform.
* Both requests use explicit credentials, falling back to `docker login`
* credentials, and run concurrently.
* Best-effort: this metadata is optional, so it never fails the scan.
*/
export declare function fetchRegistryMetadata(targetImage: string, analysis: StaticAnalysis, options: Partial<PluginOptions>): Promise<RegistryMetadata>;
export {};