fossa
Today this module has a base() function that returns a Container and ananalyze() 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/fossa@40ff1c78919316fb7e17e8455a7972bbd1d8ff2fEntrypoint
Return Type
Fossa !Example
dagger -m github.com/jpadams/fossa@40ff1c78919316fb7e17e8455a7972bbd1d8ff2f call \
func (m *MyModule) Example() *dagger.Fossa  {
	return dag.
			Fossa()
}@function
def example() -> dagger.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
| Name | Type | Default Value | Description | 
|---|---|---|---|
| source | Directory ! | - | A directory. | 
| fossaToken | Secret | - | No description provided | 
Example
dagger -m github.com/jpadams/fossa@40ff1c78919316fb7e17e8455a7972bbd1d8ff2f call \
 analyze --source DIR_PATHfunc (m *MyModule) Example(ctx context.Context, source *dagger.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/fossa@40ff1c78919316fb7e17e8455a7972bbd1d8ff2f call \
 basefunc (m *MyModule) Example() *dagger.Container  {
	return dag.
			Fossa().
			Base()
}@function
def example() -> dagger.Container:
	return (
		dag.fossa()
		.base()
	)@func()
example(): Container {
	return dag
		.fossa()
		.base()
}