Dagger
Search

grype

No long description provided.

Installation

dagger install github.com/hampusctl/daggerverse/grype@6c23f05a146beb9759d5b04a72bb032dcc285a9d

Entrypoint

Return Type
Grype !
Arguments
NameTypeDefault ValueDescription
containerContainer -container is an existing container to use instead of creating a new one
apkoFileFile -apkoFile is a custom Apko image file to import instead of using repository:tag
repositoryString !"ghcr.io/anchore/grype"repository is the Docker repository for the Grype image (default: ghcr.io/anchore/grype)
tagString !"latest"tag is the Docker tag for the Grype image (default: latest)
extraCaCerts[File ! ] -extraCaCerts are additional CA certificate files to add to the container
Example
dagger -m github.com/hampusctl/daggerverse/grype@6c23f05a146beb9759d5b04a72bb032dcc285a9d call \
 --repository string --tag string
func (m *MyModule) Example(repository string, tag string) *dagger.Grype  {
	return dag.
			Grype(repository, tag)
}
@function
def example(repository: str, tag: str, ) -> dagger.Grype:
	return (
		dag.grype(repository, tag)
	)
@func()
example(repository: string, tag: string, ): Grype {
	return dag
		.grype(repository, tag)
}

Types

Grype 🔗

Grype provides functionality for scanning SBOMs using Anchore Grype.

container() 🔗

Return Type
Container !
Example
dagger -m github.com/hampusctl/daggerverse/grype@6c23f05a146beb9759d5b04a72bb032dcc285a9d call \
 --repository string --tag string container
func (m *MyModule) Example(repository string, tag string) *dagger.Container  {
	return dag.
			Grype(repository, tag).
			Container()
}
@function
def example(repository: str, tag: str, ) -> dagger.Container:
	return (
		dag.grype(repository, tag)
		.container()
	)
@func()
example(repository: string, tag: string, ): Container {
	return dag
		.grype(repository, tag)
		.container()
}

scan() 🔗

ScanSbom runs a vulnerability scan from a provided SBOM file and returns a markdown report. The SBOM is mounted into the container and scanned, with results formatted as a markdown table.

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
sbomFile !-sbom is the SBOM file to scan (Syft JSON, CycloneDX, SPDX, etc.)
configFile -config is the Grype configuration file to use
templateFile -template is the Go template file to use when outputFormat=template
failOnSeverityString !"medium"failOnSeverity is the severity level to fail on
extraArgs[String ! ] -extraArgs are additional command-line arguments passed to 'grype'
Example
dagger -m github.com/hampusctl/daggerverse/grype@6c23f05a146beb9759d5b04a72bb032dcc285a9d call \
 --repository string --tag string scan --sbom file:path --fail-on-severity string
func (m *MyModule) Example(repository string, tag string, sbom *dagger.File, failOnSeverity string) *dagger.Directory  {
	return dag.
			Grype(repository, tag).
			Scan(sbom, failOnSeverity)
}
@function
def example(repository: str, tag: str, sbom: dagger.File, fail_on_severity: str) -> dagger.Directory:
	return (
		dag.grype(repository, tag)
		.scan(sbom, fail_on_severity)
	)
@func()
example(repository: string, tag: string, sbom: File, failOnSeverity: string): Directory {
	return dag
		.grype(repository, tag)
		.scan(sbom, failOnSeverity)
}