Skip to content

Commit 23692f7

Browse files
author
thomhurst
committed
chore: Update grype CLI options
1 parent ed611ef commit 23692f7

3 files changed

Lines changed: 85 additions & 1 deletion

File tree

src/ModularPipelines.Grype/AssemblyInfo.Generated.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
using System.Reflection;
77

88
[assembly: AssemblyMetadata("ModularPipelines.OptionsGenerator.Tool", "grype")]
9-
[assembly: AssemblyMetadata("ModularPipelines.OptionsGenerator.GeneratedAt", "2026-03-29T03:15:57.4390081Z")]
9+
[assembly: AssemblyMetadata("ModularPipelines.OptionsGenerator.GeneratedAt", "2026-04-12T03:33:54.2492196Z")]
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
// <auto-generated>
2+
// This file was generated by ModularPipelines.OptionsGenerator.
3+
// Do not edit this file manually.
4+
// </auto-generated>
5+
6+
using System.CodeDom.Compiler;
7+
using System.Diagnostics.CodeAnalysis;
8+
using ModularPipelines.Attributes;
9+
using ModularPipelines.Grype.Options;
10+
11+
namespace ModularPipelines.Grype.Options;
12+
13+
/// <summary>
14+
/// Diff two databases, showing packages with added, removed, and modified vulnerability matches
15+
/// </summary>
16+
[GeneratedCode("ModularPipelines.OptionsGenerator", "")]
17+
[ExcludeFromCodeCoverage]
18+
[CliSubCommand("db", "diff")]
19+
public record GrypeDbDiffOptions : GrypeOptions
20+
{
21+
/// <summary>
22+
/// help for diff
23+
/// </summary>
24+
[CliFlag("--help", ShortForm = "-h")]
25+
public bool? Help { get; set; }
26+
27+
/// <summary>
28+
/// format to display results (available=[text, json]) (default "text")
29+
/// </summary>
30+
[CliOption("--output", ShortForm = "-o", Format = OptionFormat.EqualsSeparated)]
31+
public string? Output { get; set; }
32+
33+
/// <summary>
34+
/// only include packages
35+
/// </summary>
36+
[CliFlag("--packages")]
37+
public bool? Packages { get; set; }
38+
39+
/// <summary>
40+
/// only include vulnerabilities
41+
/// </summary>
42+
[CliFlag("--vulns")]
43+
public bool? Vulns { get; set; }
44+
45+
/// <summary>
46+
/// grype configuration file(s) to use
47+
/// </summary>
48+
[CliOption("--config", ShortForm = "-c", Format = OptionFormat.EqualsSeparated, AllowMultiple = true)]
49+
public IEnumerable<string>? Config { get; set; }
50+
51+
/// <summary>
52+
/// configuration profiles to use
53+
/// </summary>
54+
[CliOption("--profile", Format = OptionFormat.EqualsSeparated, AllowMultiple = true)]
55+
public IEnumerable<string>? Profile { get; set; }
56+
57+
/// <summary>
58+
/// suppress all logging output
59+
/// </summary>
60+
[CliFlag("--quiet", ShortForm = "-q")]
61+
public bool? Quiet { get; set; }
62+
63+
/// <summary>
64+
/// increase verbosity (-v = info, -vv = debug)
65+
/// </summary>
66+
[CliOption("--verbose", ShortForm = "-v", Format = OptionFormat.EqualsSeparated)]
67+
public int? Verbose { get; set; }
68+
69+
}

src/ModularPipelines.Grype/Services/GrypeDb.Generated.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,21 @@ public virtual async Task<CommandResult> Delete(
8484
return await _command.ExecuteCommandLineTool(options ?? new GrypeDbDeleteOptions(), executionOptions, cancellationToken);
8585
}
8686

87+
/// <summary>
88+
/// Diff two databases, showing packages with added, removed, and modified vulnerability matches
89+
/// </summary>
90+
/// <param name="options">The command options.</param>
91+
/// <param name="executionOptions">The execution configuration options.</param>
92+
/// <param name="cancellationToken">Cancellation token.</param>
93+
/// <returns>The command result.</returns>
94+
public virtual async Task<CommandResult> Diff(
95+
GrypeDbDiffOptions options = default,
96+
CommandExecutionOptions executionOptions = null,
97+
CancellationToken cancellationToken = default)
98+
{
99+
return await _command.ExecuteCommandLineTool(options ?? new GrypeDbDiffOptions(), executionOptions, cancellationToken);
100+
}
101+
87102
/// <summary>
88103
/// import a vulnerability database archive from a local FILE or URL.
89104
/// </summary>

0 commit comments

Comments
 (0)