Dagger
Search

trivy

Finds vulnerabilities from container image ref or Dagger Container

Installation

dagger install github.com/jpadams/daggerverse/trivy@v0.5.0

Entrypoint

Return Type
Trivy
Example
dagger -m github.com/jpadams/daggerverse/trivy@1e7077df01ea8c849620c6fe2e7993b223c48bb4 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 🔗

base() 🔗

Return a Container from the official trivy image.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
trivyImageTagString "latest"No description provided
Example
dagger -m github.com/jpadams/daggerverse/trivy@1e7077df01ea8c849620c6fe2e7993b223c48bb4 call \
 base
func (m *myModule) example() *Container  {
	return dag.
			Trivy().
			Base()
}
@function
def example() -> dagger.Container:
	return (
		dag.trivy()
		.base()
	)
@func()
example(): Container {
	return dag
		.trivy()
		.base()
}

scanImage() 🔗

Scan an image ref.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
imageRefString !-No description provided
severityString "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL"No description provided
exitCodeInteger 0No description provided
formatString "table"No description provided
trivyImageTagString "latest"No description provided
Example
dagger -m github.com/jpadams/daggerverse/trivy@1e7077df01ea8c849620c6fe2e7993b223c48bb4 call \
 scan-image --image-ref string
func (m *myModule) example(ctx context.Context, imageRef string) string  {
	return dag.
			Trivy().
			ScanImage(ctx, imageRef)
}
@function
async def example(image_ref: str) -> str:
	return await (
		dag.trivy()
		.scan_image(image_ref)
	)
@func()
async example(imageRef: string): Promise<string> {
	return dag
		.trivy()
		.scanImage(imageRef)
}

scanContainer() 🔗

Scan a Dagger Container.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
ctrContainer !-No description provided
imageRefString "user-provided-container:latest"No description provided
severityString "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL"No description provided
exitCodeInteger 0No description provided
formatString "table"No description provided
trivyImageTagString "latest"No description provided
Example
dagger -m github.com/jpadams/daggerverse/trivy@1e7077df01ea8c849620c6fe2e7993b223c48bb4 call \
 scan-container --ctr IMAGE:TAG
func (m *myModule) example(ctx context.Context, ctr *Container) string  {
	return dag.
			Trivy().
			ScanContainer(ctx, ctr)
}
@function
async def example(ctr: dagger.Container) -> str:
	return await (
		dag.trivy()
		.scan_container(ctr)
	)
@func()
async example(ctr: Container): Promise<string> {
	return dag
		.trivy()
		.scanContainer(ctr)
}