GrypeAliases.

GrypeScan(ICakeContext, GrypeSource, GrypeScanSettings) Method

Summary

Scans a source for vulnerabilities with Grype using the specified settings.
Assembly
Cake.Grype.dll
Namespace
Cake.Grype
Containing Type
GrypeAliases

Syntax

public static void GrypeScan(this ICakeContext context, GrypeSource source, GrypeScanSettings settings)

Examples

var settings = new GrypeScanSettings
{
    Outputs = { GrypeOutput.Table(), GrypeOutput.Json("./artifacts/grype.json") },
};
foreach (var source in new List<GrypeSource> { GrypeSource.Sbom("./artifacts/api.cdx.json"), GrypeSource.Registry("myorg/api:1.2.3") })
{
    GrypeScan(source, settings);
}

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute
CakeNamespaceImportAttribute
CakeNamespaceImportAttribute

Parameters

Name Type Description
context ICakeContext The context.
source GrypeSource The source to scan.
settings GrypeScanSettings The settings.

Return Value

Type Description
void