Dagger
Search

snyk

This module lets you security scan a container image using Snyk's hosted scanning API.

For more info and sample usage, check the readme: https://github.com/lukemarsden/dagger-snyk

Installation

dagger install github.com/lukemarsden/dagger-snyk@v0.3.0

Entrypoint

Return Type
Snyk
Example
func (m *myModule) example() *Snyk  {
	return dag.
			Snyk()
}
@function
def example() -> dag.Snyk:
	return (
		dag.snyk()
	)
@func()
example(): Snyk {
	return dag
		.snyk()
}

Types

Snyk 🔗

testCode() 🔗

example usage: “dagger call test-code –src . –token env:SNYK_TOKEN”

Return Type
String !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-No description provided
tokenSecret !-No description provided
severityThresholdString -No description provided
Example
dagger -m github.com/lukemarsden/dagger-snyk@4d59a12b675095d10f6294860053b3df9302a559 call \
 test-code --src DIR_PATH --token env:MYSECRET
func (m *myModule) example(ctx context.Context, src *Directory, token *Secret) string  {
	return dag.
			Snyk().
			TestCode(ctx, src, token)
}
@function
async def example(src: dagger.Directory, token: dagger.Secret) -> str:
	return await (
		dag.snyk()
		.test_code(src, token)
	)
@func()
async example(src: Directory, token: Secret): Promise<string> {
	return dag
		.snyk()
		.testCode(src, token)
}

testIac() 🔗

example usage: “dagger call test-iac –src . –token env:SNYK_TOKEN”

Return Type
String !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-No description provided
tokenSecret !-No description provided
severityThresholdString -No description provided
Example
dagger -m github.com/lukemarsden/dagger-snyk@4d59a12b675095d10f6294860053b3df9302a559 call \
 test-iac --src DIR_PATH --token env:MYSECRET
func (m *myModule) example(ctx context.Context, src *Directory, token *Secret) string  {
	return dag.
			Snyk().
			TestIac(ctx, src, token)
}
@function
async def example(src: dagger.Directory, token: dagger.Secret) -> str:
	return await (
		dag.snyk()
		.test_iac(src, token)
	)
@func()
async example(src: Directory, token: Secret): Promise<string> {
	return dag
		.snyk()
		.testIac(src, token)
}

testContainer() 🔗

example usage: “dagger call test-container –image alpine:latest –token env:SNYK_TOKEN”

Return Type
String !
Arguments
NameTypeDefault ValueDescription
imageString !-No description provided
tokenSecret !-No description provided
Example
dagger -m github.com/lukemarsden/dagger-snyk@4d59a12b675095d10f6294860053b3df9302a559 call \
 test-container --image string --token env:MYSECRET
func (m *myModule) example(ctx context.Context, image string, token *Secret) string  {
	return dag.
			Snyk().
			TestContainer(ctx, image, token)
}
@function
async def example(image: str, token: dagger.Secret) -> str:
	return await (
		dag.snyk()
		.test_container(image, token)
	)
@func()
async example(image: string, token: Secret): Promise<string> {
	return dag
		.snyk()
		.testContainer(image, token)
}