Dagger
Search

syft

No long description provided.

Installation

dagger install github.com/hampusctl/daggerverse/syft@18e6a8a8022cbfe71dc889541717d260de413395

Entrypoint

Return Type
Syft !
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/syft"repository is the Docker repository for the Syft image (default: ghcr.io/anchore/syft)
tagString !"latest"tag is the Docker tag for the Syft image (default: latest)
extraCaCerts[File ! ] -extraCaCerts are additional CA certificate files to add to the container
Example
dagger -m github.com/hampusctl/daggerverse/syft@18e6a8a8022cbfe71dc889541717d260de413395 call \
 --repository string --tag string
func (m *MyModule) Example(repository string, tag string) *dagger.Syft  {
	return dag.
			Syft(repository, tag)
}
@function
def example(repository: str, tag: str, ) -> dagger.Syft:
	return (
		dag.syft(repository, tag)
	)
@func()
example(repository: string, tag: string, ): Syft {
	return dag
		.syft(repository, tag)
}

Types

Syft 🔗

Syft provides functionality for generating Software Bill of Materials (SBOM) using Anchore Syft.

container() 🔗

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

scan() 🔗

ScanImage generates an SBOM from a container image and returns it as a file. Supports various image sources like docker:, registry:, oci-archive:, etc.

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
imageContainer -image is a container image to scan (e.g., "alpine:latest" or "docker:myimage:tag")
directoryDirectory -directory is a directory to scan for SBOM (can be "." for current directory)
fileFile -file is a single file to scan for SBOM
outputFormatString !"spdx-json"outputFormat specifies the SBOM output format. Supported formats: cyclonedx-json, cyclonedx-xml, github-json, purls, spdx-json, spdx-tag-value, syft-json, syft-table, syft-text, template
templateFile -template is the Go template file to use when outputFormat=template
schemeString -scheme prefixes the source path (e.g., "docker:SOURCE")
extraArgs[String ! ] -extraArgs are additional command-line arguments passed directly to `syft scan`
Example
dagger -m github.com/hampusctl/daggerverse/syft@18e6a8a8022cbfe71dc889541717d260de413395 call \
 --repository string --tag string scan --output-format string
func (m *MyModule) Example(repository string, tag string, outputFormat string) *dagger.Directory  {
	return dag.
			Syft(repository, tag).
			Scan(outputFormat)
}
@function
def example(repository: str, tag: str, output_format: str) -> dagger.Directory:
	return (
		dag.syft(repository, tag)
		.scan(output_format)
	)
@func()
example(repository: string, tag: string, outputFormat: string): Directory {
	return dag
		.syft(repository, tag)
		.scan(outputFormat)
}