syft
A utility to generate sboms with syft
Installation
dagger install github.com/Transmitt0r/daggerverse/syft@v0.2.0
Entrypoint
Return Type
Syft !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
container | Container | - | base container to use |
version | String | - | version to use, ignored if container is provided |
Example
dagger -m github.com/Transmitt0r/daggerverse/syft@b7029c4c8087d553c2129790efe26fd8bf2cd3b4 call \
func (m *myModule) example() *Syft {
return dag.
Syft()
}
@function
def example() -> dag.Syft:
return (
dag.syft()
)
@func()
example(): Syft {
return dag
.syft()
}
Types
Syft 🔗
container() 🔗
Container with syft installed
Return Type
Container !
Example
dagger -m github.com/Transmitt0r/daggerverse/syft@b7029c4c8087d553c2129790efe26fd8bf2cd3b4 call \
container
func (m *myModule) example() *Container {
return dag.
Syft().
Container()
}
@function
def example() -> dagger.Container:
return (
dag.syft()
.container()
)
@func()
example(): Container {
return dag
.syft()
.container()
}
withOutputFormat() 🔗
Add a output format to syft
Return Type
Syft !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
format | String ! | - | format of the output, e.g. spdx, syft-table, syft-json |
file | String ! | - | output filename, e.g. syft.json |
Example
dagger -m github.com/Transmitt0r/daggerverse/syft@b7029c4c8087d553c2129790efe26fd8bf2cd3b4 call \
with-output-format --format string --file string
func (m *myModule) example(format string, file string) *Syft {
return dag.
Syft().
WithOutputFormat(format, file)
}
@function
def example(format: str, file: str) -> dag.Syft:
return (
dag.syft()
.with_output_format(format, file)
)
@func()
example(format: string, file: string): Syft {
return dag
.syft()
.withOutputFormat(format, file)
}
scanDirectory() 🔗
Scans a directory and generates an sbom
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
directory | Directory ! | - | directory for which the SBOM should be generated |
exclude | [String ! ] | - | No description provided |
scope | String | - | squashed or all-layers |
platform | String | - | e.g. linux/arm64 |
sourceName | String | - | No description provided |
sourceVersion | String | - | No description provided |
selectCatalogers | [String ! ] | - | No description provided |
template | File | - | No description provided |
Example
dagger -m github.com/Transmitt0r/daggerverse/syft@b7029c4c8087d553c2129790efe26fd8bf2cd3b4 call \
scan-directory --directory DIR_PATH
func (m *myModule) example(directory *Directory) *Directory {
return dag.
Syft().
ScanDirectory(directory)
}
@function
def example(directory: dagger.Directory) -> dagger.Directory:
return (
dag.syft()
.scan_directory(directory)
)
@func()
example(directory: Directory): Directory {
return dag
.syft()
.scanDirectory(directory)
}
scanContainer() 🔗
Scans a container and generates an sbom
Return Type
Directory !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
container | Container ! | - | container for which the SBOM should be generated |
exclude | [String ! ] | - | No description provided |
scope | String | - | squashed or all-layers |
platform | String | - | e.g. linux/arm64 |
sourceName | String | - | No description provided |
sourceVersion | String | - | No description provided |
selectCatalogers | [String ! ] | - | No description provided |
template | File | - | No description provided |
Example
dagger -m github.com/Transmitt0r/daggerverse/syft@b7029c4c8087d553c2129790efe26fd8bf2cd3b4 call \
scan-container --container IMAGE:TAG
func (m *myModule) example(container *Container) *Directory {
return dag.
Syft().
ScanContainer(container)
}
@function
def example(container: dagger.Container) -> dagger.Directory:
return (
dag.syft()
.scan_container(container)
)
@func()
example(container: Container): Directory {
return dag
.syft()
.scanContainer(container)
}