grype
Scan a container image using Grype
Installation
dagger install github.com/opopops/daggerverse/grype@v1.2.0
Entrypoint
Return Type
Grype !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
image | String ! | "cgr.dev/chainguard/wolfi-base:latest" | Grype image |
registryUsername | String | null | No description provided |
registryPassword | Secret | null | No description provided |
user | String ! | "nonroot" | Image user |
container | Container | null | No description provided |
Example
dagger -m github.com/opopops/daggerverse/grype@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
--image string --user string
func (m *myModule) example(image string, user string) *Grype {
return dag.
Grype(image, user)
}
@function
def example(image: str, user: str, ) -> dag.Grype:
return (
dag.grype(image, user)
)
@func()
example(image: string, user: string, ): Grype {
return dag
.grype(image, user)
}
Types
Grype 🔗
Grype CLI
image() 🔗
Grype image
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/grype@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
--image string --user string image
func (m *myModule) example(ctx context.Context, image string, user string) string {
return dag.
Grype(image, user).
Image(ctx)
}
@function
async def example(image: str, user: str, ) -> str:
return await (
dag.grype(image, user)
.image()
)
@func()
async example(image: string, user: string, ): Promise<string> {
return dag
.grype(image, user)
.image()
}
registryUsername() 🔗
Return Type
String
Example
dagger -m github.com/opopops/daggerverse/grype@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
--image string --user string registry-username
func (m *myModule) example(ctx context.Context, image string, user string) string {
return dag.
Grype(image, user).
RegistryUsername(ctx)
}
@function
async def example(image: str, user: str, ) -> str:
return await (
dag.grype(image, user)
.registry_username()
)
@func()
async example(image: string, user: string, ): Promise<string> {
return dag
.grype(image, user)
.registryUsername()
}
registryPassword() 🔗
Return Type
Secret
Example
dagger -m github.com/opopops/daggerverse/grype@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
--image string --user string registry-password
func (m *myModule) example(image string, user string) *Secret {
return dag.
Grype(image, user).
RegistryPassword()
}
@function
def example(image: str, user: str, ) -> dagger.Secret:
return (
dag.grype(image, user)
.registry_password()
)
@func()
example(image: string, user: string, ): Secret {
return dag
.grype(image, user)
.registryPassword()
}
user() 🔗
Image user
Return Type
String !
Example
dagger -m github.com/opopops/daggerverse/grype@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
--image string --user string user
func (m *myModule) example(ctx context.Context, image string, user string) string {
return dag.
Grype(image, user).
User(ctx)
}
@function
async def example(image: str, user: str, ) -> str:
return await (
dag.grype(image, user)
.user()
)
@func()
async example(image: string, user: string, ): Promise<string> {
return dag
.grype(image, user)
.user()
}
container() 🔗
Returns configured grype container
Return Type
Container !
Example
dagger -m github.com/opopops/daggerverse/grype@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
--image string --user string container
func (m *myModule) example(image string, user string) *Container {
return dag.
Grype(image, user).
Container()
}
@function
def example(image: str, user: str, ) -> dagger.Container:
return (
dag.grype(image, user)
.container()
)
@func()
example(image: string, user: string, ): Container {
return dag
.grype(image, user)
.container()
}
withRegistryAuth() 🔗
Authenticate with registry
Return Type
Grype !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
username | String ! | - | Registry username |
secret | Secret ! | - | Registry password |
address | String | "docker.io" | No description provided |
Example
dagger -m github.com/opopops/daggerverse/grype@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
--image string --user string with-registry-auth --username string --secret env:MYSECRET
func (m *myModule) example(image string, user string, username string, secret *Secret) *Grype {
return dag.
Grype(image, user).
WithRegistryAuth(username, secret)
}
@function
def example(image: str, user: str, username: str, secret: dagger.Secret) -> dag.Grype:
return (
dag.grype(image, user)
.with_registry_auth(username, secret)
)
@func()
example(image: string, user: string, username: string, secret: Secret): Grype {
return dag
.grype(image, user)
.withRegistryAuth(username, secret)
}
scan() 🔗
Scan
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | String ! | - | Source to scan |
failOn | String | null | No description provided |
outputFormat | String ! | "table" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/grype@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
--image string --user string scan --source string --output-format string
func (m *myModule) example(ctx context.Context, image string, user string, source string, outputFormat string) string {
return dag.
Grype(image, user).
Scan(ctx, source, outputFormat)
}
@function
async def example(image: str, user: str, source: str, output_format: str) -> str:
return await (
dag.grype(image, user)
.scan(source, output_format)
)
@func()
async example(image: string, user: string, source: string, outputFormat: string): Promise<string> {
return dag
.grype(image, user)
.scan(source, outputFormat)
}
withScan() 🔗
Scan (for chaining)
Return Type
Grype !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | String ! | - | Source to scan |
failOn | String | null | No description provided |
outputFormat | String ! | "table" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/grype@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
--image string --user string with-scan --source string --output-format string
func (m *myModule) example(image string, user string, source string, outputFormat string) *Grype {
return dag.
Grype(image, user).
WithScan(source, outputFormat)
}
@function
def example(image: str, user: str, source: str, output_format: str) -> dag.Grype:
return (
dag.grype(image, user)
.with_scan(source, output_format)
)
@func()
example(image: string, user: string, source: string, outputFormat: string): Grype {
return dag
.grype(image, user)
.withScan(source, outputFormat)
}
scanImage() 🔗
Scan container image
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | String ! | - | Image to scan |
scheme | String | "registry" | No description provided |
failOn | String | null | No description provided |
outputFormat | String ! | "table" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/grype@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
--image string --user string scan-image --source string --output-format string
func (m *myModule) example(ctx context.Context, image string, user string, source string, outputFormat string) string {
return dag.
Grype(image, user).
ScanImage(ctx, source, outputFormat)
}
@function
async def example(image: str, user: str, source: str, output_format: str) -> str:
return await (
dag.grype(image, user)
.scan_image(source, output_format)
)
@func()
async example(image: string, user: string, source: string, outputFormat: string): Promise<string> {
return dag
.grype(image, user)
.scanImage(source, outputFormat)
}
withScanImage() 🔗
Scan container image (for chaining)
Return Type
Grype !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | String ! | - | Image to scan |
scheme | String | "registry" | No description provided |
failOn | String | null | No description provided |
outputFormat | String ! | "table" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/grype@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
--image string --user string with-scan-image --source string --output-format string
func (m *myModule) example(image string, user string, source string, outputFormat string) *Grype {
return dag.
Grype(image, user).
WithScanImage(source, outputFormat)
}
@function
def example(image: str, user: str, source: str, output_format: str) -> dag.Grype:
return (
dag.grype(image, user)
.with_scan_image(source, output_format)
)
@func()
example(image: string, user: string, source: string, outputFormat: string): Grype {
return dag
.grype(image, user)
.withScanImage(source, outputFormat)
}
scanDirectory() 🔗
Scan directory
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | Directory to scan |
scheme | String | "dir" | No description provided |
failOn | String | null | No description provided |
outputFormat | String ! | "table" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/grype@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
--image string --user string scan-directory --source DIR_PATH --output-format string
func (m *myModule) example(ctx context.Context, image string, user string, source *Directory, outputFormat string) string {
return dag.
Grype(image, user).
ScanDirectory(ctx, source, outputFormat)
}
@function
async def example(image: str, user: str, source: dagger.Directory, output_format: str) -> str:
return await (
dag.grype(image, user)
.scan_directory(source, output_format)
)
@func()
async example(image: string, user: string, source: Directory, outputFormat: string): Promise<string> {
return dag
.grype(image, user)
.scanDirectory(source, outputFormat)
}
withScanDirectory() 🔗
Scan dir (for chaining)
Return Type
Grype !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | Directory to scan |
scheme | String | "registry" | No description provided |
failOn | String | null | No description provided |
outputFormat | String ! | "table" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/grype@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
--image string --user string with-scan-directory --source DIR_PATH --output-format string
func (m *myModule) example(image string, user string, source *Directory, outputFormat string) *Grype {
return dag.
Grype(image, user).
WithScanDirectory(source, outputFormat)
}
@function
def example(image: str, user: str, source: dagger.Directory, output_format: str) -> dag.Grype:
return (
dag.grype(image, user)
.with_scan_directory(source, output_format)
)
@func()
example(image: string, user: string, source: Directory, outputFormat: string): Grype {
return dag
.grype(image, user)
.withScanDirectory(source, outputFormat)
}
scanFile() 🔗
Scan file
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | File ! | - | File to scan |
scheme | String | "file" | No description provided |
failOn | String | null | No description provided |
outputFormat | String ! | "table" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/grype@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
--image string --user string scan-file --source file:path --output-format string
func (m *myModule) example(ctx context.Context, image string, user string, source *File, outputFormat string) string {
return dag.
Grype(image, user).
ScanFile(ctx, source, outputFormat)
}
@function
async def example(image: str, user: str, source: dagger.File, output_format: str) -> str:
return await (
dag.grype(image, user)
.scan_file(source, output_format)
)
@func()
async example(image: string, user: string, source: File, outputFormat: string): Promise<string> {
return dag
.grype(image, user)
.scanFile(source, outputFormat)
}
withScanFile() 🔗
Scan file (for chaining)
Return Type
Grype !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | File ! | - | File to scan |
scheme | String | "registry" | No description provided |
failOn | String | null | No description provided |
outputFormat | String ! | "table" | Report output formatter |
Example
dagger -m github.com/opopops/daggerverse/grype@39ab1d40ef95cad4c174eb0f74290b103335ff3b call \
--image string --user string with-scan-file --source file:path --output-format string
func (m *myModule) example(image string, user string, source *File, outputFormat string) *Grype {
return dag.
Grype(image, user).
WithScanFile(source, outputFormat)
}
@function
def example(image: str, user: str, source: dagger.File, output_format: str) -> dag.Grype:
return (
dag.grype(image, user)
.with_scan_file(source, output_format)
)
@func()
example(image: string, user: string, source: File, outputFormat: string): Grype {
return dag
.grype(image, user)
.withScanFile(source, outputFormat)
}