Dagger
Search

fossa

Today this module has a base() function that returns a Container and an analyze() function that can take a token for the Fossa cloud service to update analysis or just print the information to stdout locally. You must provide a directory of source code for the tool to analyze.

In the future, the module may add functions to take full advantage of fossa-cli capabilities including scanning container imgages.

Note: as of this writing, fossa-cli only supports amd64 on linux and not arm so we explicitly specify that the container that we load the cli into should be linux/amd64.

Installation

dagger install github.com/jpadams/daggerverse/fossa@v0.8.1

Entrypoint

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

Types

Fossa

analyze()

Analyzes a directory of source code, prints to stdout, optionally uploads results to Fossa

Return Type
String !
Arguments
NameTypeDefault ValueDescription
sourceDirectory !-Required source code dir
fossaTokenSecret -No description provided
Example
dagger -m github.com/jpadams/daggerverse/fossa@e5995c00d49e248557300f2e70da10670f5fa4bf call \
 analyze --source DIR_PATH
func (m *myModule) example(ctx context.Context, source *Directory) string  {
	return dag.
			Fossa().
			Analyze(ctx, source)
}
@function
async def example(source: dagger.Directory) -> str:
	return await (
		dag.fossa()
		.analyze(source)
	)
@func()
async example(source: Directory): Promise<string> {
	return dag
		.fossa()
		.analyze(source)
}

base()

Returns a minimal Container with fossa-cli

Return Type
Container !
Example
dagger -m github.com/jpadams/daggerverse/fossa@e5995c00d49e248557300f2e70da10670f5fa4bf call \
 base
func (m *myModule) example() *Container  {
	return dag.
			Fossa().
			Base()
}
@function
def example() -> dagger.Container:
	return (
		dag.fossa()
		.base()
	)
@func()
example(): Container {
	return dag
		.fossa()
		.base()
}