grype
Scan a container image using Grype
Installation
dagger install github.com/opopops/daggerverse/grype@50a6237cf86e74768e554c4b1220e3079c79246cEntrypoint
Return Type
Grype !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| image | String ! | "cgr.dev/chainguard/grype: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@50a6237cf86e74768e554c4b1220e3079c79246c call \
--image string --user stringfunc (m *MyModule) Example(image string, user string) *dagger.Grype {
return dag.
Grype(image, user)
}@function
def example(image: str, user: str, ) -> dagger.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@50a6237cf86e74768e554c4b1220e3079c79246c call \
--image string --user string imagefunc (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@50a6237cf86e74768e554c4b1220e3079c79246c call \
--image string --user string registry-usernamefunc (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@50a6237cf86e74768e554c4b1220e3079c79246c call \
--image string --user string registry-passwordfunc (m *MyModule) Example(image string, user string) *dagger.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@50a6237cf86e74768e554c4b1220e3079c79246c call \
--image string --user string userfunc (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() 🔗
Return Type
Container Example
dagger -m github.com/opopops/daggerverse/grype@50a6237cf86e74768e554c4b1220e3079c79246c call \
--image string --user string containerfunc (m *MyModule) Example(image string, user string) *dagger.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()
}report() 🔗
Retrieves Grype output file
Return Type
File ! Example
dagger -m github.com/opopops/daggerverse/grype@50a6237cf86e74768e554c4b1220e3079c79246c call \
--image string --user string reportfunc (m *MyModule) Example(image string, user string) *dagger.File {
return dag.
Grype(image, user).
Report()
}@function
def example(image: str, user: str, ) -> dagger.File:
return (
dag.grype(image, user)
.report()
)@func()
example(image: string, user: string, ): File {
return dag
.grype(image, user)
.report()
}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@50a6237cf86e74768e554c4b1220e3079c79246c call \
--image string --user string scan --source string --output-format stringfunc (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@50a6237cf86e74768e554c4b1220e3079c79246c call \
--image string --user string with-scan --source string --output-format stringfunc (m *MyModule) Example(image string, user string, source string, outputFormat string) *dagger.Grype {
return dag.
Grype(image, user).
WithScan(source, outputFormat)
}@function
def example(image: str, user: str, source: str, output_format: str) -> dagger.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@50a6237cf86e74768e554c4b1220e3079c79246c call \
--image string --user string scan-image --source string --output-format stringfunc (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@50a6237cf86e74768e554c4b1220e3079c79246c call \
--image string --user string with-scan-image --source string --output-format stringfunc (m *MyModule) Example(image string, user string, source string, outputFormat string) *dagger.Grype {
return dag.
Grype(image, user).
WithScanImage(source, outputFormat)
}@function
def example(image: str, user: str, source: str, output_format: str) -> dagger.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)
}scanDir() 🔗
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@50a6237cf86e74768e554c4b1220e3079c79246c call \
--image string --user string scan-dir --source DIR_PATH --output-format stringfunc (m *MyModule) Example(ctx context.Context, image string, user string, source *dagger.Directory, outputFormat string) string {
return dag.
Grype(image, user).
ScanDir(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_dir(source, output_format)
)@func()
async example(image: string, user: string, source: Directory, outputFormat: string): Promise<string> {
return dag
.grype(image, user)
.scanDir(source, outputFormat)
}withScanDir() 🔗
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@50a6237cf86e74768e554c4b1220e3079c79246c call \
--image string --user string with-scan-dir --source DIR_PATH --output-format stringfunc (m *MyModule) Example(image string, user string, source *dagger.Directory, outputFormat string) *dagger.Grype {
return dag.
Grype(image, user).
WithScanDir(source, outputFormat)
}@function
def example(image: str, user: str, source: dagger.Directory, output_format: str) -> dagger.Grype:
return (
dag.grype(image, user)
.with_scan_dir(source, output_format)
)@func()
example(image: string, user: string, source: Directory, outputFormat: string): Grype {
return dag
.grype(image, user)
.withScanDir(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@50a6237cf86e74768e554c4b1220e3079c79246c call \
--image string --user string scan-file --source file:path --output-format stringfunc (m *MyModule) Example(ctx context.Context, image string, user string, source *dagger.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@50a6237cf86e74768e554c4b1220e3079c79246c call \
--image string --user string with-scan-file --source file:path --output-format stringfunc (m *MyModule) Example(image string, user string, source *dagger.File, outputFormat string) *dagger.Grype {
return dag.
Grype(image, user).
WithScanFile(source, outputFormat)
}@function
def example(image: str, user: str, source: dagger.File, output_format: str) -> dagger.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)
}