This content is part of a third party extension that is not supported by the Cake project.
For more information about this extension see Cake.Grype.
Summary
What Grype scans: an SBOM, a directory, a file, a container image, package URLs or CPEs.
Relative paths are made absolute when the scan runs. A
string converts implicitly and is
passed to Grype unchanged, for example "registry:alpine:3.20".
- Assembly
- Cake
.Grype .dll - Namespace
- Cake
.Grype - Base Types
-
- Object
graph BT
Type-->Base0["Object"]
Type["GrypeSource"]
class Type type-node
Syntax
public sealed class GrypeSource
Methods
| Name | Value | Summary |
|---|---|---|
| Cpe |
GrypeSource |
A single CPE, for example
cpe:2.3:a:openssl:openssl:3.0.14:*:*:*:*:*:*:*.static
|
| CpeFile |
GrypeSource |
A file with one CPE per line (
cpes:).static
|
| Directory |
GrypeSource |
A directory on disk (
dir:).static
|
| Docker |
GrypeSource |
An image from the Docker daemon (
docker:).static
|
| DockerArchive |
GrypeSource |
A tarball created by
docker save (docker-archive:).static
|
| File |
GrypeSource |
A single file on disk (
file:).static
|
| Image |
GrypeSource |
A container image reference, resolved by Grype's default lookup (a Docker daemon first).
static
|
| OciArchive |
GrypeSource |
An OCI archive (
oci-archive:).static
|
| OciDirectory |
GrypeSource |
An OCI layout directory (
oci-dir:).static
|
| Parse |
GrypeSource |
A source exactly as Grype expects it on the command line; relative paths are not resolved.
static
|
| Podman |
GrypeSource |
An image from the Podman daemon (
podman:).static
|
| Purl |
GrypeSource |
A single package URL, for example
pkg:apk/[email protected]?distro=alpine-3.20.3.static
|
| PurlFile |
GrypeSource |
A file with one package URL per line (
purl:).static
|
| Registry |
GrypeSource |
An image pulled directly from a registry, no container runtime required (
registry:).static
|
| Sbom |
GrypeSource |
An SBOM file: Syft JSON, CycloneDX or SPDX (
sbom:).static
|
| Singularity |
GrypeSource |
A Singularity Image Format container (
singularity:).static
|
| ToArgument |
string |
Renders the command-line argument, making relative paths absolute.
|
| ToString |
string | |
| Zarf |
GrypeSource |
All SBOMs within a Zarf package archive (
zarf:).static
|
Operators
| Name | Value | Summary |
|---|---|---|
| implicit operator |
GrypeSource |
Extension Methods
| Name | Value | Summary |
|---|---|---|
| Dump |
string |
Get a basic string representation of specified object.
From LoggingExtensions
Requires the Cake.Incubator addin
|
| IsIn |
bool |
Checks if the source is contained in a list
From EnumerableExtensions
Requires the Cake.Incubator addin
|
| NotNull |
void |
From IssuesArgumentChecks
Requires the Cake.Issues addin
|
| NotNull |
void |
Throws an exception if the specified parameter's value is null.
From Extensions
Requires the Cake.Ftp addin
|
| ThrowIfNull |
T |
Throws a
System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
From AssertExtensions
Requires the Cake.Incubator addin
|
| ThrowIfNull |
T |
Throws a
System.ArgumentNullException if the value is null, otherwise returns the value
From AssertExtensions
Requires the Cake.Incubator addin
|
| ToDictionary |
IDictionary |
From ObjectHelpers
Requires the Cake.DeployParams addin
|
| To |
string |
From StringExtensions
Requires the Cake.Issues addin
|
