GrypeAliases.

GrypeScanSbom(ICakeContext, FilePath, GrypeScanSettings) Method

Summary

Scans an SBOM (Syft JSON, CycloneDX or SPDX) for vulnerabilities with Grype using the specified settings.
Assembly
Cake.Grype.dll
Namespace
Cake.Grype
Containing Type
GrypeAliases

Syntax

public static void GrypeScanSbom(this ICakeContext context, FilePath sbom, GrypeScanSettings settings)

Examples

GrypeScanSbom("./artifacts/bom.cdx.json", new GrypeScanSettings
{
    Outputs = { GrypeOutput.Table(), GrypeOutput.Json("./artifacts/grype.json") },
    SortBy = GrypeSortBy.Risk,
});

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute
CakeNamespaceImportAttribute
CakeNamespaceImportAttribute

Parameters

Name Type Description
context ICakeContext The context.
sbom FilePath The SBOM file.
settings GrypeScanSettings The settings.

Return Value

Type Description
void