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/wouter2397/dagger-modules/trivy@0c280408f00c68beabccc31d2d2f3cedbb91014eEntrypoint
Return Type
Trivy Example
dagger -m github.com/wouter2397/dagger-modules/trivy@0c280408f00c68beabccc31d2d2f3cedbb91014e call \
func (m *MyModule) Example() *dagger.Trivy {
return dag.
Trivy()
}@function
def example() -> dagger.Trivy:
return (
dag.trivy()
)@func()
example(): Trivy {
return dag
.trivy()
}Types
Trivy 🔗
base() 🔗
Return Type
Container ! Example
dagger -m github.com/wouter2397/dagger-modules/trivy@0c280408f00c68beabccc31d2d2f3cedbb91014e call \
basefunc (m *MyModule) Example() *dagger.Container {
return dag.
Trivy().
Base()
}@function
def example() -> dagger.Container:
return (
dag.trivy()
.base()
)@func()
example(): Container {
return dag
.trivy()
.base()
}scanImage() 🔗
Return Type
File !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| imageRef | String ! | - | No description provided |
Example
dagger -m github.com/wouter2397/dagger-modules/trivy@0c280408f00c68beabccc31d2d2f3cedbb91014e call \
scan-image --image-ref stringfunc (m *MyModule) Example(imageRef string) *dagger.File {
return dag.
Trivy().
ScanImage(imageRef)
}@function
def example(image_ref: str) -> dagger.File:
return (
dag.trivy()
.scan_image(image_ref)
)@func()
example(imageRef: string): File {
return dag
.trivy()
.scanImage(imageRef)
}scanContainer() 🔗
Return Type
File !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ctr | Container ! | - | No description provided |
| imageRef | String ! | - | No description provided |
Example
dagger -m github.com/wouter2397/dagger-modules/trivy@0c280408f00c68beabccc31d2d2f3cedbb91014e call \
scan-container --ctr IMAGE:TAG --image-ref stringfunc (m *MyModule) Example(ctr *dagger.Container, imageRef string) *dagger.File {
return dag.
Trivy().
ScanContainer(ctr, imageRef)
}@function
def example(ctr: dagger.Container, image_ref: str) -> dagger.File:
return (
dag.trivy()
.scan_container(ctr, image_ref)
)@func()
example(ctr: Container, imageRef: string): File {
return dag
.trivy()
.scanContainer(ctr, imageRef)
}analyzeResults() 🔗
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| sbom | File ! | - | No description provided |
Example
dagger -m github.com/wouter2397/dagger-modules/trivy@0c280408f00c68beabccc31d2d2f3cedbb91014e call \
analyze-results --sbom file:pathfunc (m *MyModule) Example(ctx context.Context, sbom *dagger.File) string {
return dag.
Trivy().
AnalyzeResults(ctx, sbom)
}@function
async def example(sbom: dagger.File) -> str:
return await (
dag.trivy()
.analyze_results(sbom)
)@func()
async example(sbom: File): Promise<string> {
return dag
.trivy()
.analyzeResults(sbom)
}scanAndAnalyze() 🔗
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| imageRef | String ! | - | No description provided |
Example
dagger -m github.com/wouter2397/dagger-modules/trivy@0c280408f00c68beabccc31d2d2f3cedbb91014e call \
scan-and-analyze --image-ref stringfunc (m *MyModule) Example(ctx context.Context, imageRef string) string {
return dag.
Trivy().
ScanAndAnalyze(ctx, imageRef)
}@function
async def example(image_ref: str) -> str:
return await (
dag.trivy()
.scan_and_analyze(image_ref)
)@func()
async example(imageRef: string): Promise<string> {
return dag
.trivy()
.scanAndAnalyze(imageRef)
}