trivy
This module provides a set of functions for scanning container images, repositories, and local filesystems for vulnerabilities using Trivy.
Installation
dagger install github.com/fluent-ci-templates/trivy-pipeline@v0.5.0
Entrypoint
Return Type
Trivy
Example
dagger -m github.com/fluent-ci-templates/trivy-pipeline@8eaf27441a7349e010bb778f63986b966ad6974f call \
func (m *myModule) example() *Trivy {
return dag.
Trivy()
}
@function
def example() -> dag.Trivy:
return (
dag.trivy()
)
@func()
example(): Trivy {
return dag
.trivy()
}
Types
Trivy 🔗
config() 🔗
Scan a configuration file
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory ! | - | No description provided |
exitCode | Integer | 0 | No description provided |
format | String | "table" | No description provided |
outputFile | String | - | No description provided |
Example
dagger -m github.com/fluent-ci-templates/trivy-pipeline@8eaf27441a7349e010bb778f63986b966ad6974f call \
config --src DIR_PATH
func (m *myModule) example(src *Directory) *File {
return dag.
Trivy().
Config(src)
}
@function
def example(src: dagger.Directory) -> dagger.File:
return (
dag.trivy()
.config(src)
)
@func()
example(src: Directory): File {
return dag
.trivy()
.config(src)
}
fs() 🔗
Scan a local filesystem
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory ! | - | No description provided |
exitCode | Integer | 0 | No description provided |
format | String | "table" | No description provided |
outputFile | String | - | No description provided |
Example
dagger -m github.com/fluent-ci-templates/trivy-pipeline@8eaf27441a7349e010bb778f63986b966ad6974f call \
fs --src DIR_PATH
func (m *myModule) example(src *Directory) *File {
return dag.
Trivy().
Fs(src)
}
@function
def example(src: dagger.Directory) -> dagger.File:
return (
dag.trivy()
.fs(src)
)
@func()
example(src: Directory): File {
return dag
.trivy()
.fs(src)
}
repo() 🔗
Scan a repository
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory ! | - | No description provided |
exitCode | Integer | 0 | No description provided |
repoUrl | String | - | No description provided |
format | String | "table" | No description provided |
outputFile | String | - | No description provided |
Example
dagger -m github.com/fluent-ci-templates/trivy-pipeline@8eaf27441a7349e010bb778f63986b966ad6974f call \
repo --src DIR_PATH
func (m *myModule) example(src *Directory) *File {
return dag.
Trivy().
Repo(src)
}
@function
def example(src: dagger.Directory) -> dagger.File:
return (
dag.trivy()
.repo(src)
)
@func()
example(src: Directory): File {
return dag
.trivy()
.repo(src)
}
image() 🔗
Scan a container image
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory ! | - | No description provided |
exitCode | Integer | 0 | No description provided |
image | String | - | No description provided |
format | String | "table" | No description provided |
outputFile | String | - | No description provided |
Example
dagger -m github.com/fluent-ci-templates/trivy-pipeline@8eaf27441a7349e010bb778f63986b966ad6974f call \
image --src DIR_PATH
func (m *myModule) example(src *Directory) *File {
return dag.
Trivy().
Image(src)
}
@function
def example(src: dagger.Directory) -> dagger.File:
return (
dag.trivy()
.image(src)
)
@func()
example(src: Directory): File {
return dag
.trivy()
.image(src)
}
sbom() 🔗
Scan a software bill of materials
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
src | Directory ! | - | No description provided |
exitCode | Integer | 0 | No description provided |
path | String | - | No description provided |
format | String | "table" | No description provided |
outputFile | String | - | No description provided |
Example
dagger -m github.com/fluent-ci-templates/trivy-pipeline@8eaf27441a7349e010bb778f63986b966ad6974f call \
sbom --src DIR_PATH
func (m *myModule) example(src *Directory) *File {
return dag.
Trivy().
Sbom(src)
}
@function
def example(src: dagger.Directory) -> dagger.File:
return (
dag.trivy()
.sbom(src)
)
@func()
example(src: Directory): File {
return dag
.trivy()
.sbom(src)
}