Skip to content

Add commit signature verification before source build - #6

Closed
morgaesis wants to merge 1 commit into
mainfrom
add-musl-artifact-selection
Closed

Add commit signature verification before source build#6
morgaesis wants to merge 1 commit into
mainfrom
add-musl-artifact-selection

Conversation

@morgaesis

Copy link
Copy Markdown
Contributor

Verify the postil-cli commit's GPG signature before falling back to cargo install when prebuilt binaries are unavailable. This prevents building from a compromised repository.

The verification step fetches the commit object and uses git verify-commit to validate the signature, failing with a clear error if verification fails. The runner must have access to the signer's public key (e.g., imported from a keyserver).

Includes CI tests for both signed commits (should pass) and unsigned commits (should fail).

When prebuilt binaries are unavailable, verify the source commit's GPG
signature before falling back to cargo install. This prevents building from
a compromised repository and closes a supply-chain attack vector.

The verification step:
- Fetches the commit object from the remote repository
- Uses git verify-commit to validate the GPG signature
- Fails with a clear error if the commit is unsigned or verification fails
- Requires that git has access to the signer's public key

Also adds platform support documentation and CI tests for both signed and
unsigned commit verification, plus musl target selection for prebuilt artifacts.
@morgaesis

Copy link
Copy Markdown
Contributor Author

Superseded by #9 — same change (commit signature verification before source build), rebased cleanly onto main after #7 merged.

@morgaesis morgaesis closed this Jul 11, 2026
@morgaesis
morgaesis deleted the add-musl-artifact-selection branch July 11, 2026 03:31
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