Skip to content

feat: Sigil attestation rules (wasm_attest, wasm_verify_chain, wasm_show_chain)#445

Merged
avrabe merged 1 commit intomainfrom
feat/wasm-attestation-rules
Apr 19, 2026
Merged

feat: Sigil attestation rules (wasm_attest, wasm_verify_chain, wasm_show_chain)#445
avrabe merged 1 commit intomainfrom
feat/wasm-attestation-rules

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented Apr 19, 2026

Summary

  • Exposes wsc 0.7.0's transformation-attestation commands as Bazel rules so the PulseEngine pipeline can build and verify SLSA-style provenance chains end-to-end.
  • wasm_attest — records a transformation attestation for an external tool (meld_fuse and wasm_optimize already self-attest via their attestation attr).
  • wasm_verify_chain — policy-enforcing ship-gate, optionally consuming a TOML policy or a legacy trusted-tools JSON.
  • wasm_show_chain — emits the attestation chain as JSON or text for CI diagnostics.
  • Extends the wasmsign2_wrapper Go tool with two internal coordination flags (--bazel-stage-source, --bazel-capture-stdout) so the new rules use ctx.actions.run rather than run_shell, staying aligned with the "Bazel Way First" rule.

Context

Follow-up to #442 (pipeline rules) and #444 (meld native toolchain). wsc 0.7.0 ships attest, verify-chain, and show-chain alongside the signing commands we already wrap — this PR surfaces those commands as proper Bazel rules.

Verified end-to-end locally: bazel build //examples/wasm_signing:signed_component_chain_json produces a JSON artifact with the expected "No transformation attestations found in module" output (the signed component has no transformations yet — meaningful chains appear once meld_fuse/wasm_optimize run).

Test plan

  • bazel build //tools/wasmsign2_wrapper //wasm:defs — wrapper rebuilds with new flags
  • bazel build --nobuild //wasm/... //wasm/private/... //tools/wasmsign2_wrapper/... — 21 targets analyze
  • bazel build //examples/wasm_signing:signed_component_chain_json — real show-chain end-to-end against a signed component
  • CI green across Linux/macOS/Windows

Notes

wasm_verify_chain is not demoed in examples/wasm_signing because it requires at least one transformation attestation in the chain (its "no chain at all" error is pre-policy and report_only does not rescue it). That demo belongs with a meld_fuse / wasm_optimize pipeline, which will come with the integration example.

🤖 Generated with Claude Code

…how_chain)

Exposes wsc 0.7.0's transformation-attestation surface as Bazel rules so the
full PulseEngine pipeline can build and verify SLSA-style provenance chains:

  wasm_attest        — record a transformation attestation for an external
                       tool (meld_fuse and wasm_optimize already self-attest)
  wasm_verify_chain  — policy-enforcing ship-gate, optionally reading a
                       TOML policy or legacy trusted-tools JSON
  wasm_show_chain    — emit the attestation chain as JSON or text for CI
                       diagnostics

The existing wasmsign2_wrapper Go tool is extended with two internal
coordination flags so the new rules stay Bazel-native:
  --bazel-stage-source=PATH    copy PATH to --output-file before wsc runs
                               (wsc attest rewrites --output-file in place)
  --bazel-capture-stdout=PATH  capture wsc's stdout into a Bazel output
                               (wsc show-chain writes to stdout)

This lets the rules call ctx.actions.run directly rather than resorting to
run_shell for staging or redirection.

examples/wasm_signing gains a wasm_show_chain demo target that confirms the
wiring end-to-end (produces "No transformation attestations found in module"
since the input is only signed, not transformed). wasm_verify_chain is not
demoed here because it requires at least one transformation attestation in
the chain — that's a natural fit for an end-to-end meld_fuse example later.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@avrabe avrabe merged commit b7e2bbe into main Apr 19, 2026
28 checks passed
@avrabe avrabe deleted the feat/wasm-attestation-rules branch April 19, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant