zizmor
Zizmor lints GitHub Actions workflows for security issues using zizmor.
Installation
dagger install github.com/MacroPower/x/toolchains/zizmor@3f4ef26289cf6c0690d4ce596cd8832b729b8ad4Entrypoint
Return Type
Zizmor !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| source | Directory | - | Project source directory. Ignore patterns belong in the consuming project's root dagger.json customizations, not here. |
| image | String | - | zizmor container image. |
| configPath | String | - | Path to the zizmor config file, relative to the source root. When empty, zizmor auto-discovers a config or uses its built-in defaults. |
| workflowsDir | String | - | Directory of workflows to lint, relative to the source root. |
Example
dagger -m github.com/MacroPower/x/toolchains/zizmor@3f4ef26289cf6c0690d4ce596cd8832b729b8ad4 call \
func (m *MyModule) Example() *dagger.Zizmor {
return dag.
Zizmor()
}@function
def example() -> dagger.Zizmor:
return (
dag.zizmor()
)@func()
example(): Zizmor {
return dag
.zizmor()
}Types
Zizmor 🔗
Zizmor lints GitHub Actions workflows for security issues using zizmor. Create instances with [New].
source() 🔗
Project source directory.
Return Type
Directory ! Example
dagger -m github.com/MacroPower/x/toolchains/zizmor@3f4ef26289cf6c0690d4ce596cd8832b729b8ad4 call \
sourcefunc (m *MyModule) Example() *dagger.Directory {
return dag.
Zizmor().
Source()
}@function
def example() -> dagger.Directory:
return (
dag.zizmor()
.source()
)@func()
example(): Directory {
return dag
.zizmor()
.source()
}image() 🔗
zizmor container image reference.
Return Type
String ! Example
dagger -m github.com/MacroPower/x/toolchains/zizmor@3f4ef26289cf6c0690d4ce596cd8832b729b8ad4 call \
imagefunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Zizmor().
Image(ctx)
}@function
async def example() -> str:
return await (
dag.zizmor()
.image()
)@func()
async example(): Promise<string> {
return dag
.zizmor()
.image()
}configPath() 🔗
Path to the zizmor config file, relative to the source root. When empty, zizmor auto-discovers a config (e.g. .github/zizmor.yml) or falls back to its built-in audit defaults, so the module drops into projects that have no config file.
Return Type
String ! Example
dagger -m github.com/MacroPower/x/toolchains/zizmor@3f4ef26289cf6c0690d4ce596cd8832b729b8ad4 call \
config-pathfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Zizmor().
ConfigPath(ctx)
}@function
async def example() -> str:
return await (
dag.zizmor()
.config_path()
)@func()
async example(): Promise<string> {
return dag
.zizmor()
.configPath()
}workflowsDir() 🔗
Directory of workflows to lint, relative to the source root.
Return Type
String ! Example
dagger -m github.com/MacroPower/x/toolchains/zizmor@3f4ef26289cf6c0690d4ce596cd8832b729b8ad4 call \
workflows-dirfunc (m *MyModule) Example(ctx context.Context) string {
return dag.
Zizmor().
WorkflowsDir(ctx)
}@function
async def example() -> str:
return await (
dag.zizmor()
.workflows_dir()
)@func()
async example(): Promise<string> {
return dag
.zizmor()
.workflowsDir()
}lint() 🔗
Lint runs zizmor against the workflows directory. The config file is passed only when [Zizmor.ConfigPath] is set; otherwise zizmor auto-discovers a config or uses its built-in defaults.
Return Type
Void ! Example
dagger -m github.com/MacroPower/x/toolchains/zizmor@3f4ef26289cf6c0690d4ce596cd8832b729b8ad4 call \
lintfunc (m *MyModule) Example(ctx context.Context) {
return dag.
Zizmor().
Lint(ctx)
}@function
async def example() -> None:
return await (
dag.zizmor()
.lint()
)@func()
async example(): Promise<void> {
return dag
.zizmor()
.lint()
}lintBase() 🔗
LintBase returns the zizmor container with the project source mounted at /src. It is exposed so consumers can wrap it (e.g. with a cache-bust) for benchmarks without pulling in another toolchain dependency.
Return Type
Container ! Example
dagger -m github.com/MacroPower/x/toolchains/zizmor@3f4ef26289cf6c0690d4ce596cd8832b729b8ad4 call \
lint-basefunc (m *MyModule) Example() *dagger.Container {
return dag.
Zizmor().
LintBase()
}@function
def example() -> dagger.Container:
return (
dag.zizmor()
.lint_base()
)@func()
example(): Container {
return dag
.zizmor()
.lintBase()
}