govulncheck
This module aids to run govulncheck anywhere, without managing it as a pipelinedependency.
Installation
dagger install github.com/act3-ai/dagger/govulncheck@v0.1.0Entrypoint
Return Type
Govulncheck !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| container | Container | - | Custom container to use as a base container. Must have go available. It's recommended to use github.com/sagikazarmark/daggerverse/go for a custom container, excluding the source directory. |
| version | String | "latest" | Version of govulncheck to use as a binary source. |
| netrc | Secret | - | Mount netrc credentials for a private git repository. |
Example
dagger -m github.com/act3-ai/dagger/govulncheck@ab8312136bccd2439e9391a01d22de75e5c04b28 call \
func (m *MyModule) Example() *dagger.Govulncheck {
return dag.
Govulncheck()
}@function
def example() -> dagger.Govulncheck:
return (
dag.govulncheck()
)@func()
example(): Govulncheck {
return dag
.govulncheck()
}Types
Govulncheck 🔗
container() 🔗
Return Type
Container ! Example
dagger -m github.com/act3-ai/dagger/govulncheck@ab8312136bccd2439e9391a01d22de75e5c04b28 call \
containerfunc (m *MyModule) Example() *dagger.Container {
return dag.
Govulncheck().
Container()
}@function
def example() -> dagger.Container:
return (
dag.govulncheck()
.container()
)@func()
example(): Container {
return dag
.govulncheck()
.container()
}scanSource() 🔗
Run govulncheck on a source directory.
e.g. govulncheck -mode=source.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory ! | - | Go source directory |
| ignoreError | Boolean | - | Output results, without an error. |
| patterns | String | "./..." | file patterns to include, |
Example
dagger -m github.com/act3-ai/dagger/govulncheck@ab8312136bccd2439e9391a01d22de75e5c04b28 call \
scan-source --source DIR_PATHfunc (m *MyModule) Example(ctx context.Context, source *dagger.Directory) string {
return dag.
Govulncheck().
ScanSource(ctx, source)
}@function
async def example(source: dagger.Directory) -> str:
return await (
dag.govulncheck()
.scan_source(source)
)@func()
async example(source: Directory): Promise<string> {
return dag
.govulncheck()
.scanSource(source)
}scanBinary() 🔗
Run govulncheck on a binary.
e.g. govulncheck -mode=binary <binary>.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| binary | File ! | - | binary file |
| ignoreError | Boolean | - | Output results, without an error. |
Example
dagger -m github.com/act3-ai/dagger/govulncheck@ab8312136bccd2439e9391a01d22de75e5c04b28 call \
scan-binary --binary file:pathfunc (m *MyModule) Example(ctx context.Context, binary *dagger.File) string {
return dag.
Govulncheck().
ScanBinary(ctx, binary)
}@function
async def example(binary: dagger.File) -> str:
return await (
dag.govulncheck()
.scan_binary(binary)
)@func()
async example(binary: File): Promise<string> {
return dag
.govulncheck()
.scanBinary(binary)
}withDb() 🔗
Specify a vulnerability database url.
e.g. govlulncheck -db <url>.
Return Type
Govulncheck !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| url | String | "https://vuln.go.dev" | vulnerability database url. |
Example
dagger -m github.com/act3-ai/dagger/govulncheck@ab8312136bccd2439e9391a01d22de75e5c04b28 call \
with-dbfunc (m *MyModule) Example() *dagger.Govulncheck {
return dag.
Govulncheck().
WithDb()
}@function
def example() -> dagger.Govulncheck:
return (
dag.govulncheck()
.with_db()
)@func()
example(): Govulncheck {
return dag
.govulncheck()
.withDb()
}withFormat() 🔗
Specify the output format.
e.g. govulncheck -format <format>.
Return Type
Govulncheck !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| format | String | "text" | Output format. Supported values: 'text', 'json', 'sarif', and 'openvex'. |
Example
dagger -m github.com/act3-ai/dagger/govulncheck@ab8312136bccd2439e9391a01d22de75e5c04b28 call \
with-formatfunc (m *MyModule) Example() *dagger.Govulncheck {
return dag.
Govulncheck().
WithFormat()
}@function
def example() -> dagger.Govulncheck:
return (
dag.govulncheck()
.with_format()
)@func()
example(): Govulncheck {
return dag
.govulncheck()
.withFormat()
}withScanLevel() 🔗
Set the scanning level.
e.g. govulncheck -scan <level>.
Return Type
Govulncheck !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| level | String | "symbol" | scanning level. Supported values: 'module', 'package', or 'symbol'. |
Example
dagger -m github.com/act3-ai/dagger/govulncheck@ab8312136bccd2439e9391a01d22de75e5c04b28 call \
with-scan-levelfunc (m *MyModule) Example() *dagger.Govulncheck {
return dag.
Govulncheck().
WithScanLevel()
}@function
def example() -> dagger.Govulncheck:
return (
dag.govulncheck()
.with_scan_level()
)@func()
example(): Govulncheck {
return dag
.govulncheck()
.withScanLevel()
}withShow() 🔗
Enable display of additional information.
e.g. govulncheck -show <enable>....
Return Type
Govulncheck !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| enable | [String ! ] ! | - | Enable additional info. Supported values: 'traces', 'color', 'version', and 'verbose'. |
Example
dagger -m github.com/act3-ai/dagger/govulncheck@ab8312136bccd2439e9391a01d22de75e5c04b28 call \
with-show --enable string1 --enable string2func (m *MyModule) Example(enable []string) *dagger.Govulncheck {
return dag.
Govulncheck().
WithShow(enable)
}@function
def example(enable: List[str]) -> dagger.Govulncheck:
return (
dag.govulncheck()
.with_show(enable)
)@func()
example(enable: string[]): Govulncheck {
return dag
.govulncheck()
.withShow(enable)
}