Dagger
Search

grant

This module has been generated via dagger init and serves as a reference to
basic module structure as you get started with Dagger.

Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.

The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.

Installation

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

Entrypoint

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

Types

Grant 🔗

container() 🔗

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

check() 🔗

Grant runs a grant scan and returns a markdown report from a provided SBOM.

Return Type
Directory !
Arguments
NameTypeDefault ValueDescription
sbomFile !-sbom is the SBOM file to scan (Syft JSON, CycloneDX, SPDX, etc.)
configFile !-config is the Grant configuration file to use
extraArgs[String ! ] -extraArgs are additional command-line arguments passed to 'grant'
Example
dagger -m github.com/hampusctl/daggerverse/grant@18e6a8a8022cbfe71dc889541717d260de413395 call \
 --repository string --tag string check --sbom file:path --config file:path
func (m *MyModule) Example(repository string, tag string, sbom *dagger.File, config *dagger.File) *dagger.Directory  {
	return dag.
			Grant(repository, tag).
			Check(sbom, config)
}
@function
def example(repository: str, tag: str, sbom: dagger.File, config: dagger.File) -> dagger.Directory:
	return (
		dag.grant(repository, tag)
		.check(sbom, config)
	)
@func()
example(repository: string, tag: string, sbom: File, config: File): Directory {
	return dag
		.grant(repository, tag)
		.check(sbom, config)
}