Sign GitHub commits with Passport
Sign a commit with Touch ID on your Mac, then verify it in GitHub and Passport. Passport uses the GitHub-compatible format by default for your hardware signing key.
Set up signing in your repository
Install Passport on your Mac and enroll with your team’s Passport server. Use a server that supports GitHub-compatible Passport signatures. If your hardware key is already enrolled and selected, run only the last command in your clone.
Replace the example server, SSH login, and hostname with the ones your team gave you.
laissez keys enroll-se --ca https://passport.example
laissez ssh setup https://passport.example --principal alice \
--hosts 'ssh.example.com' --signing-key attested
laissez git setup --ca https://passport.example
Add your public key to GitHub
Export the public key from your Passport app and register it with GitHub.
key_file=$(mktemp)
laissez git public-key > "$key_file" &&
gh ssh-key add "$key_file" --type signing --title 'Passport Secure Enclave'
For browser setup, copy it with laissez git public-key | pbcopy on your Mac.
Open Settings → SSH and GPG keys → New SSH key, select Signing Key,
and paste the public key. GitHub manages commit
signing and SSH login keys separately. GitHub’s key setup guide
Sign and check a commit
After editing your repository’s README, create a signed commit.
git add -- README.md
git commit -S --only -m "Explain token setup" -- README.md
Read Passport’s Sign commit window and approve with Touch ID. After
Git creates the commit, run git push. Open the commit on GitHub to see its Verified badge. If the badge is missing, check
that the Passport public key is on your account as a signing key and that
the commit uses an email verified on that account. GitHub’s signature verification guide · GitHub’s verification results
| Where you look | What it checks |
|---|---|
| GitHub Verified | GitHub checked the commit signature against the public signing key registered to your account. |
| Passport verified | Passport checked the signature and found a matching approval record for the hardware key. |
Passport’s verification runs on the team’s configured GitHub check or public maintainer profile.
Upgrade the Passport server before switching a repository that requires the Passport check. If you’re still using a signing certificate issued before the upgrade, let it expire before making the first GitHub-compatible commit so the server has a record of the replacement certificate.
Keep working, then sign a whole stack at once
When you are away from your Mac, a coding agent can keep committing on an unsigned branch. You review and sign everything later with one Touch ID.
laissez git commit --defer -m "Explain token setup" # commits on passport/pending/<branch>
laissez git pending # what is waiting
laissez git sign-pending # review and sign the stack
laissez git commit --defer takes the usual git commit arguments and leaves your
branch where it was. laissez git sign-pending shows every commit in one Passport
window. After one approval, Passport signs them all and your branch moves to
the signed commits, or, on any failure, nothing moves. The unsigned commits
stay available under refs/passport/unsigned/<branch>/.
Things to know:
- Each commit's committer date becomes the time you sign, because a signing certificate is only valid for minutes. Author, author date, committer name, message and files do not change.
- If Passport needs a new signing certificate first, you may see one extra Touch ID.
- If your branch moved since the stack started, signing stops and tells you how to rebase the stack. If the stack merged work from another branch, you rebuild it by hand, because a rebase would rewrite that work.
- Commits merged in from another branch are not re-signed and keep their ids.
- Signing refuses while a rebase or bisect is using the branch, or while the branch is checked out in another worktree.
- Deferred branch names can use ASCII letters, digits and
. _ / - + @ = ,. - Up to 100 commits can be signed at once.
- Passport blocks an accidental
git pushof a pending branch where it can, but--no-verifyor another clone can get around that. Require signed commits on your Git host for real enforcement.
Use a signing certificate for offline verification
If your release process uses the offline laissez-verify-commit tool,
keep the signing certificate inside the commit signature.
laissez git setup --ca https://passport.example --certificate-signatures
Run laissez git setup without that flag to use the GitHub-compatible format again.
Gate releases with laissez-verify-commit
laissez-verify-commit checks a release tag before you publish it. Sign the
tag with git tag -s while certificate signatures are on, then verify the
full tag ref:
curl -fsSL https://passport.example/v1/ca.pub -o laissez-ca.pub
laissez-verify-commit --ca-pubkey "$(cat laissez-ca.pub)" --ref refs/tags/v2.4.0
--ca-pubkey takes the key line itself, not a file path. By default the
tool requires all of these:
- The ref points at a signed annotated tag whose name matches the ref and
which tags a commit. It refuses lightweight tags, a tag object moved to
another name, and refs outside
refs/tags/. The commit the tag names is the one reported. - The signing certificate comes from the pinned CA, and
laissez:git-signingis its only principal. - The certificate is on the attested key that asks you to approve each
signature. Its
key-attest@iqlusion.iovalue isapp-attest(ortoken:<issuer>). The tool refuses certificates on the device key, because that key signs without asking anyone. Add--allow-device-keyonly if you accept those signatures. - The certificate says posture passed
(
lz-posture-outcome@laissez=pass). - The tagger time falls inside the certificate's validity.
The signer chooses the tagger time. Use --max-signature-age 1h to also
refuse tags made more than an hour before the check runs. Revocation is
not checked: a certificate counts for any tag whose tagger time falls
inside its validity, even after the device or person is revoked.
Optional flags:
--require-assurancetakes a list of sources. Possible values areapp-attest,tpm,yubikey-piv,yubikey-openpgp,fidoandtoken:<issuer>, andapp-attestalso acceptstoken:<issuer>.--require-key-policytakes values such asconsent=biometry-current;location=device;per-signature=receipt;presence=every;vouched-by=app.--require-policy-hashpins the posture checks the certificate was issued on.--commit <rev>verifies a commit's own signature instead of a tag.
The tool ignores replace refs when it reads objects.
If your CA signs certificates through a customer-held laissez-signer, add
lz-posture-outcome@laissez and lz-policy-hash@laissez to
the signer's [floor] extensions before you upgrade. Git-signing
certificates now carry both, and a floor that does not allow them refuses
every git-signing request.
Migrating from the earlier release-gate snippet
Earlier snippets used settings that now fail:
ref: ${{ github.ref_name }}: pass the full ref,ref: ${{ github.ref }}, and add the tag-fetch step shown below.require-assurance: app-vouched,yubikey-pivorsecure-enclave-attested: these are not values a certificate carries. Useapp-attest, or leave the input out to accept any attested key.require-posture-pass: true: remove it. The posture check is on by default, and the action has no such input.laissez-verify-commitwith no--ref, or withHEADor a short tag name: the tool no longer defaults toHEAD. Pass--ref refs/tags/<name>for a release, or--commit <rev>to check a commit's own signature.--ca-pubkey <file>: pass the key line,--ca-pubkey "$(cat <file>)".- Releases signed on the device key (no Touch ID prompt) now fail. Sign the
tag with the attested key, or pass
--allow-device-keyto the binary if you accept those signatures.
In GitHub Actions
In GitHub Actions, run the check on tag pushes with the
.github/actions/verify-release action, or copy the workflow from your
CA's Connect page. actions/checkout may leave the tag as a lightweight
tag, so fetch the tag object first. The fetch step reads the ref from the
GITHUB_REF environment variable. A ${{ github.ref }} written into a
run: line would be pasted into the shell script, and a tag name can contain
shell syntax.
on:
push:
tags: ["v*"]
jobs:
verify-release-tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: git fetch --force origin "+$GITHUB_REF:$GITHUB_REF"
- uses: iqlusioninc/laissez/.github/actions/verify-release@main
with:
ref: ${{ github.ref }}
ca-pubkey: ${{ vars.LAISSEZ_CA_PUBKEY }}
max-signature-age: 1h
The tagged commit supplies this workflow, so it does not replace the GitHub App check or a tag ruleset. Gate pull requests with the GitHub App check, not with a workflow, because a pull request can change the workflows in its own branch.