Recipe
Turn on the merge gateBeta
Your CI reads the governance facts for the agent's session, applies your policy, and signs the decision. GitHub enforces it when you make it a required check.
name: machinaut
on: pull_request
jobs:
governed-run:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
id-token: write # keyless signing with this workflow's identity
attestations: write
steps:
- id: ship
run: echo "session-id=$SESSION_ID" >> "$GITHUB_OUTPUT" # your agent + lodestar ship --sensitivity-ceiling secret
- id: gate
uses: machinise/machinaut-pr-action@v2
with:
mode: gate
machinaut-api-key: ${{ secrets.MACHINAUT_API_KEY }}
project-id: your-project-id
session-id: ${{ steps.ship.outputs.session-id }}
dry-run: true # evaluate and comment, never sign, never fail
- name: Keep the governed-run evidence
if: always() && steps.gate.outputs.statement-path != ''
uses: actions/upload-artifact@v4
with:
name: machinaut-governed-run
path: |
${{ steps.gate.outputs.summary-path }}
${{ steps.gate.outputs.statement-path }}
${{ steps.gate.outputs.bundle-path }}1. Add the workflow in dry-run
Save your project key as the repo secret MACHINAUT_API_KEY. With dry-run: true the gate evaluates and comments, but never signs and never fails the step.
Ship the session with --sensitivity-ceiling secret. At the default ceiling Lodestar withholds approvals and alerts, and the default gate policy fails closed on withheld evidence.
GitHub artifact attestations need a public repository or GitHub Enterprise Cloud. With an empty session-id the step skips and passes, so the gate cannot catch an agent PR that shipped nothing.
2. Make it a required check
- Let the workflow run once, so GitHub knows the check.
- In Settings → Rules → Rulesets, require the status check
governed-runand an up-to-date branch. - Remove
dry-run. Afaildecision now fails the check.
3. Pin the signer identity
An org owner pins your CI's signing identity from the Attestations card on a session page. Until then, no entry reads as verified.
What the gate proves, and what it does not
It proves what your CI asserted about what Machinaut held at as_of, signed by your CI’s identity. It does not prove the agent could not have misbehaved, and it does not prove the event log is complete: the shipper ships what the writer wrote, so a writer bypass is invisible here.
Hash verification, approval-signature verification, quorum adjudication, redaction and sentinel detection are Lodestar OSS properties. Machinaut’s part is the hosted summary, the predicate standard, the gate workflow, the verification display, and (planned) the fleet-wide view of which PRs carried an attestation. Sigstore and in-toto are third-party standards Machinaut verifies against.
A relay_only hold is not a verified approval. A session with redacted records is attested by commitment, not content. GitHub enforces the required check; Machinaut cannot block a merge and never claims to.
Policy inputs and statuses: the attestation gate reference.