GrypeSeverity Class

Summary

A vulnerability severity as Grype reports it. Values are ordered, so severity >= GrypeSeverity.High works.
Assembly
Cake.Grype.dll
Namespace
Cake.Grype
Base Types
  • Enum
graph BT Type-->Base0["Enum"] Type["GrypeSeverity"] class Type type-node

Syntax

public sealed class GrypeSeverity : Enum

Remarks

Unknown means "not assessed yet" (for example a reserved CVE without analysis), not "low". It ranks below every assessed severity, so severity thresholds, including Grype's own --fail-on, never match it. Check for it explicitly if unassessed findings should block a build.

Fields

Name Constant Value Summary
Critical 5
Critical.
static
High 4
High.
static
Low 2
Low.
static
Medium 3
Medium.
static
Negligible 1
Negligible.
static
Unknown 0
No severity has been assessed.
static
value__

Extension Methods

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