trivy
This module has been generated via dagger init and serves as a reference tobasic module structure as you get started with Dagger.
Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.
The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.
Installation
dagger install github.com/z5labs/daggerverse/trivy@de964337c54aad97de8016472ea46620230035aeEntrypoint
Return Type
Trivy !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| imageTag | String ! | "latest" | No description provided |
| severity | [String ! ] ! | ["UNKNOWN","LOW","MEDIUM","HIGH","CRITICAL"] | No description provided |
| format | String ! | "table" | No description provided |
Example
dagger -m github.com/z5labs/daggerverse/trivy@de964337c54aad97de8016472ea46620230035ae call \
--image-tag string --severity string1 --severity string2 --format stringfunc (m *MyModule) Example(imageTag string, severity []string, format string) *dagger.Trivy {
return dag.
Trivy(imageTag, severity, format)
}@function
def example(image_tag: str, severity: List[str], format: str) -> dagger.Trivy:
return (
dag.trivy(image_tag, severity, format)
)@func()
example(imageTag: string, severity: string[], format: string): Trivy {
return dag
.trivy(imageTag, severity, format)
}Types
Trivy 🔗
ctr() 🔗
Return Type
Container ! Example
dagger -m github.com/z5labs/daggerverse/trivy@de964337c54aad97de8016472ea46620230035ae call \
--image-tag string --severity string1 --severity string2 --format string ctrfunc (m *MyModule) Example(imageTag string, severity []string, format string) *dagger.Container {
return dag.
Trivy(imageTag, severity, format).
Ctr()
}@function
def example(image_tag: str, severity: List[str], format: str) -> dagger.Container:
return (
dag.trivy(image_tag, severity, format)
.ctr()
)@func()
example(imageTag: string, severity: string[], format: string): Container {
return dag
.trivy(imageTag, severity, format)
.ctr()
}scanContainer() 🔗
Scan a container for vulnerabilities.
Return Type
Void !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ctr | Container ! | - | No description provided |
Example
dagger -m github.com/z5labs/daggerverse/trivy@de964337c54aad97de8016472ea46620230035ae call \
--image-tag string --severity string1 --severity string2 --format string scan-container --ctr IMAGE:TAGfunc (m *MyModule) Example(ctx context.Context, imageTag string, severity []string, format string, ctr *dagger.Container) {
return dag.
Trivy(imageTag, severity, format).
ScanContainer(ctx, ctr)
}@function
async def example(image_tag: str, severity: List[str], format: str, ctr: dagger.Container) -> None:
return await (
dag.trivy(image_tag, severity, format)
.scan_container(ctr)
)@func()
async example(imageTag: string, severity: string[], format: string, ctr: Container): Promise<void> {
return dag
.trivy(imageTag, severity, format)
.scanContainer(ctr)
}