Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ModularPipelines.Grype/AssemblyInfo.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
using System.Reflection;

[assembly: AssemblyMetadata("ModularPipelines.OptionsGenerator.Tool", "grype")]
[assembly: AssemblyMetadata("ModularPipelines.OptionsGenerator.GeneratedAt", "2026-03-29T03:15:57.4390081Z")]
[assembly: AssemblyMetadata("ModularPipelines.OptionsGenerator.GeneratedAt", "2026-04-12T03:33:54.2492196Z")]
69 changes: 69 additions & 0 deletions src/ModularPipelines.Grype/Options/GrypeDbDiffOptions.Generated.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// <auto-generated>
// This file was generated by ModularPipelines.OptionsGenerator.
// Do not edit this file manually.
// </auto-generated>

using System.CodeDom.Compiler;
using System.Diagnostics.CodeAnalysis;
using ModularPipelines.Attributes;
using ModularPipelines.Grype.Options;

namespace ModularPipelines.Grype.Options;

/// <summary>
/// Diff two databases, showing packages with added, removed, and modified vulnerability matches
/// </summary>
[GeneratedCode("ModularPipelines.OptionsGenerator", "")]
[ExcludeFromCodeCoverage]
[CliSubCommand("db", "diff")]
public record GrypeDbDiffOptions : GrypeOptions
{
/// <summary>
/// help for diff
/// </summary>
[CliFlag("--help", ShortForm = "-h")]
public bool? Help { get; set; }

/// <summary>
/// format to display results (available=[text, json]) (default "text")
/// </summary>
[CliOption("--output", ShortForm = "-o", Format = OptionFormat.EqualsSeparated)]
public string? Output { get; set; }

/// <summary>
/// only include packages
/// </summary>
[CliFlag("--packages")]
public bool? Packages { get; set; }

/// <summary>
/// only include vulnerabilities
/// </summary>
[CliFlag("--vulns")]
public bool? Vulns { get; set; }

/// <summary>
/// grype configuration file(s) to use
/// </summary>
[CliOption("--config", ShortForm = "-c", Format = OptionFormat.EqualsSeparated, AllowMultiple = true)]
public IEnumerable<string>? Config { get; set; }

/// <summary>
/// configuration profiles to use
/// </summary>
[CliOption("--profile", Format = OptionFormat.EqualsSeparated, AllowMultiple = true)]
public IEnumerable<string>? Profile { get; set; }

/// <summary>
/// suppress all logging output
/// </summary>
[CliFlag("--quiet", ShortForm = "-q")]
public bool? Quiet { get; set; }

/// <summary>
/// increase verbosity (-v = info, -vv = debug)
/// </summary>
[CliOption("--verbose", ShortForm = "-v", Format = OptionFormat.EqualsSeparated)]
public int? Verbose { get; set; }

}
15 changes: 15 additions & 0 deletions src/ModularPipelines.Grype/Services/GrypeDb.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,21 @@ public virtual async Task<CommandResult> Delete(
return await _command.ExecuteCommandLineTool(options ?? new GrypeDbDeleteOptions(), executionOptions, cancellationToken);
}

/// <summary>
/// Diff two databases, showing packages with added, removed, and modified vulnerability matches
/// </summary>
/// <param name="options">The command options.</param>
/// <param name="executionOptions">The execution configuration options.</param>
/// <param name="cancellationToken">Cancellation token.</param>
/// <returns>The command result.</returns>
public virtual async Task<CommandResult> Diff(
GrypeDbDiffOptions options = default,
CommandExecutionOptions executionOptions = null,
CancellationToken cancellationToken = default)
{
return await _command.ExecuteCommandLineTool(options ?? new GrypeDbDiffOptions(), executionOptions, cancellationToken);
}

/// <summary>
/// import a vulnerability database archive from a local FILE or URL.
/// </summary>
Expand Down
Loading