Skip to main content

grype CLI reference

ModularPipelines.Grype provides strongly typed access to the grype CLI.

Installation

dotnet add package ModularPipelines.Grype

Import ModularPipelines.Grype.Extensions, then resolve the service with context.Grype().

Module example

using ModularPipelines.Context;
using ModularPipelines.Models;
using ModularPipelines.Modules;
using ModularPipelines.Grype.Extensions;
using ModularPipelines.Grype.Options;

public class RunCommandModule : Module<CommandResult>
{
protected override async Task<CommandResult?> ExecuteAsync(
IModuleContext context,
CancellationToken cancellationToken)
{
return await context.Grype().Explain(
new GrypeExplainOptions(),
cancellationToken: cancellationToken);
}
}

Commands

CLI commandOptions record
grype db checkGrypeDbCheckOptions
grype db deleteGrypeDbDeleteOptions
grype db diffGrypeDbDiffOptions
grype db importGrypeDbImportOptions
grype db listGrypeDbListOptions
grype db providersGrypeDbProvidersOptions
grype db searchGrypeDbSearchOptions
grype db search vulnGrypeDbSearchVulnOptions
grype db statusGrypeDbStatusOptions
grype db updateGrypeDbUpdateOptions
grype explainGrypeExplainOptions