Dagger
Search

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.1

Entrypoint

Return Type
Trivy
Example
dagger -m github.com/fluent-ci-templates/trivy-pipeline@c6db35427568ed2a12fa5e64e59390f7d01c18cb 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
NameTypeDefault ValueDescription
srcDirectory !-No description provided
exitCodeInteger 0No description provided
formatString "table"No description provided
outputFileString -No description provided
Example
dagger -m github.com/fluent-ci-templates/trivy-pipeline@c6db35427568ed2a12fa5e64e59390f7d01c18cb 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
NameTypeDefault ValueDescription
srcDirectory !-No description provided
exitCodeInteger 0No description provided
formatString "table"No description provided
outputFileString -No description provided
Example
dagger -m github.com/fluent-ci-templates/trivy-pipeline@c6db35427568ed2a12fa5e64e59390f7d01c18cb 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
NameTypeDefault ValueDescription
srcDirectory !-No description provided
exitCodeInteger 0No description provided
repoUrlString -No description provided
formatString "table"No description provided
outputFileString -No description provided
Example
dagger -m github.com/fluent-ci-templates/trivy-pipeline@c6db35427568ed2a12fa5e64e59390f7d01c18cb 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
NameTypeDefault ValueDescription
srcDirectory !-No description provided
exitCodeInteger 0No description provided
imageString -No description provided
formatString "table"No description provided
outputFileString -No description provided
Example
dagger -m github.com/fluent-ci-templates/trivy-pipeline@c6db35427568ed2a12fa5e64e59390f7d01c18cb 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
NameTypeDefault ValueDescription
srcDirectory !-No description provided
exitCodeInteger 0No description provided
pathString -No description provided
formatString "table"No description provided
outputFileString -No description provided
Example
dagger -m github.com/fluent-ci-templates/trivy-pipeline@c6db35427568ed2a12fa5e64e59390f7d01c18cb 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)
}