GrypeScanSettings Class

Summary

Contains the settings for a Grype scan.
Assembly
Cake.Grype.dll
Namespace
Cake.Grype.Scan
Base Types
graph BT Type-->Base0["GrypeSettings"] click Base0 "/api/Cake.Grype/GrypeSettings" Base0-->Base1["ToolSettings"] Type["GrypeScanSettings"] class Type type-node

Syntax

public sealed class GrypeScanSettings : GrypeSettings

Constructors

Name Summary
GrypeScanSettings()

Properties

Name Value Summary
AddCpesIfNone bool
Gets or sets a value indicating whether CPEs are generated for packages without CPE data (--add-cpes-if-none).
ByCve bool
Gets or sets a value indicating whether results are oriented by CVE instead of the original vulnerability id (--by-cve).
ConfigFiles ICollection<FilePath>
Gets or sets the Grype configuration files to use (-c, repeatable). Relative paths are resolved against the working directory.
Inherited from GrypeSettings
Distro string
Gets or sets the distro to match against, for example debian:12 (--distro).
Exclude ICollection<string>
Gets or sets glob expressions of paths excluded from the scan (--exclude, repeatable).
FailOn Nullable<GrypeSeverity>
Gets or sets the severity at or above which Grype exits with code 2 (-f). The exit code throws a CakeException after the outputs are written; accept it with HandleExitCode to continue. Unknown is not allowed.
From ICollection<string>
Gets or sets the source behaviours to use, for example registry (--from, repeatable).
IgnoreStates GrypeIgnoreStates
Gets or sets the fix states whose matches are ignored (--ignore-states).
Name string
Gets or sets the name of the target being analyzed (--name).
OnlyFixed bool
Gets or sets a value indicating whether vulnerabilities without a fix are ignored (--only-fixed).
OnlyNotFixed bool
Gets or sets a value indicating whether vulnerabilities with a fix are ignored (--only-notfixed).
OutputFile FilePath
Gets or sets the file the default report is written to instead of standard output (--file).
Outputs ICollection<GrypeOutput>
Gets or sets the report outputs (-o, repeatable). Grype prints the table when none are set.
Platform string
Gets or sets the platform for container image sources, for example linux/arm64 (--platform).
Profiles ICollection<string>
Gets or sets the configuration profiles to use (--profile, repeatable).
Inherited from GrypeSettings
Quiet bool
Gets or sets a value indicating whether all logging output is suppressed (-q).
Inherited from GrypeSettings
Scope Nullable<GrypeScope>
Gets or sets the image layers to analyze (-s).
ShowSuppressed bool
Gets or sets a value indicating whether suppressed matches are shown; table output only (--show-suppressed).
SortBy Nullable<GrypeSortBy>
Gets or sets how matches are sorted (--sort-by).
Template FilePath
Gets or sets the Go template file for the Template output (-t).
Verbosity GrypeVerbosity
Gets or sets the log verbosity (-v or -vv).
Inherited from GrypeSettings
Vex ICollection<FilePath>
Gets or sets VEX documents to consider (--vex, repeatable).

Extension Methods

Name Value Summary
Dump<GrypeScanSettings>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<GrypeScanSettings>(GrypeScanSettings[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<GrypeScanSettings>(string) void
Requires the Cake.Issues addin
NotNull<GrypeScanSettings>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
ThrowIfNull<GrypeScanSettings>(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<GrypeScanSettings>(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