CI integration
Attestack can record CI runs as tamper-evident sessions and export signed bundles as workflow artifacts.
GitHub Actions (recommended)
Section titled “GitHub Actions (recommended)”Copy .github/workflows/attestack-evidence.yml into your repo or call it as a reusable workflow from CI.
The example workflow:
- Builds or installs
attestack - Runs
attestack ci start(session title fromGITHUB_WORKFLOW/GITHUB_RUN_ID) - Runs your test command via
attestack ci run -- … - Runs
attestack ci finish(stop + bundle create) - Uploads
.attestack/bundles/*.attestack.zipas an artifact
CI commands
Section titled “CI commands”| Command | Purpose |
|---|---|
attestack ci start | init (if needed) + start with CI-derived title |
attestack ci run -- <cmd> | Run a command inside the active CI session |
attestack ci finish | stop + bundle create + print bundle path |
Environment variables used for session titles:
GITHUB_WORKFLOWGITHUB_RUN_IDCI(generic fallback)
Generic CI (GitLab, Buildkite, etc.)
Section titled “Generic CI (GitLab, Buildkite, etc.)”attestack initattestack start "CI ${CI_PIPELINE_ID:-local}"attestack run -- make testattestack stopattestack bundle createattestack verify .attestack/bundles/*.attestack.zipPipeline wrappers (Dagger, Earthly, Nix)
Section titled “Pipeline wrappers (Dagger, Earthly, Nix)”Wrap the pipeline entrypoint with attestack ci so the whole run is one signed bundle.
Dagger
Section titled “Dagger”attestack ci start --title "Dagger ${DAGGER_SESSION:-local}"attestack ci run -- dagger call testattestack ci finishRun from your git checkout root. Upload .attestack/bundles/*.attestack.zip as a CI artifact.
Earthly
Section titled “Earthly”attestack ci start --title "Earthly ${EARTHLY_TARGET:-+test}"attestack ci run -- earthly +testattestack ci finishFor monorepos, use one session per target or one session per pipeline job.
Nix flake check
Section titled “Nix flake check”attestack ci start --title "nix flake check"attestack ci run -- nix flake checkattestack ci finishIn a flake.nix CI derivation, call the same three commands around your test attribute — Attestack stays outside Nix; only the wrapped command runs in the sandbox.
GitHub Actions reusable workflow
Section titled “GitHub Actions reusable workflow”See .github/workflows/attestack-evidence.yml and examples/github-actions/attestack-evidence.yml.
After attestack ci finish, generate a PR body snippet:
BUNDLE="$(ls .attestack/bundles/*.attestack.zip | tail -1)"attestack pr-summary --bundle "$BUNDLE"Paste the Markdown into your pull request description, or pipe it to gh pr edit --body-file -.
Verifying CI bundles locally
Section titled “Verifying CI bundles locally”attestack verify ./downloaded/ci-bundle.attestack.zipIf you no longer have the original repository identity, pass the public key:
attestack verify ./bundle.attestack.zip --public-key .attestack/identities/default.public.jsonSecurity notes
Section titled “Security notes”- Do not commit
.attestack/private material; use--redact-pathson bundle export for external sharing - CI secrets are never captured by
attestack run(environment variables are excluded by default) - Bundles are signed with your Ed25519 identity; protect
~/.attestack/keys/
Future: Sigstore signing
Section titled “Future: Sigstore signing”Optional Sigstore signing for release and CI bundles is planned for a future release.