GrypeReportReader Class

Summary

Reads Grype JSON reports (-o json).
Assembly
Cake.Grype.dll
Namespace
Cake.Grype.Json
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["GrypeReportReader"] class Type type-node

Syntax

public sealed class GrypeReportReader

Remarks

The report is deserialized from a stream using System.Text.Json's built-in (streaming) collection converters, so large arrays such as matches and ignoredMatches are read incrementally rather than buffered whole; fields the model does not map (for example matchDetails, artifact locations or descriptor.configuration) are skipped, which keeps memory low for large reports.

Constructors

Name Summary
GrypeReportReader(IFileSystem, ICakeEnvironment) Initializes a new instance of the GrypeReportReader class.

Methods

Name Value Summary
Parse(Stream) GrypeReport
Parses a report from a stream of UTF-8 JSON (a byte order mark is allowed).
static
Read(FilePath) GrypeReport
Reads a report file.

Extension Methods

Name Value Summary
Dump<GrypeReportReader>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<GrypeReportReader>(GrypeReportReader[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<GrypeReportReader>(string) void
Requires the Cake.Issues addin
NotNull<GrypeReportReader>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
ThrowIfNull<GrypeReportReader>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<GrypeReportReader>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin
ToStringWithNullMarkup() string
Requires the Cake.Issues addin