AppUpdater 4.1.0: verify GitHub artifact attestations - #23
Merged
Conversation
Coverage Report for CI Build 30756539078Coverage increased (+9.1%) to 70.447%Details
Uncovered Changes
Coverage Regressions1 previously-covered line in 1 file lost coverage.
Coverage Stats
💛 - Coveralls |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds opt-in, fail-closed verification of GitHub Artifact Attestations (Sigstore bundle + SLSA provenance) to AppUpdater, including an embedded Sigstore trust bootstrap and TUF-based trust root refresh, with accompanying fixtures and tests.
Changes:
- Introduces
GitHubAttestationPolicyand end-to-end provenance verification (bundle, cert identity, Rekor transparency, SLSA statement binding). - Adds Sigstore TUF client + embedded bootstrap resources for offline/bootstrapping behavior.
- Expands test coverage with fixtures for Sigstore bundles and Sigstore TUF metadata rotation/rollback cases.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| AppUpdater.swift | Wires attestation verification into update preparation; tightens network transfer handling; adds promoted-DMG digest re-check. |
| Package.swift | Adds Attestation sources and processes embedded resources + test fixtures. |
| Attestation/Sigstore.swift | Implements GitHub attestations API client, policy validation, bundle fetching/decompression, and verification loop. |
| Attestation/Verification.swift | Verifies Sigstore bundle (DSSE, cert identity/chain/SCT) + Rekor transparency material + SLSA statement constraints. |
| Attestation/TUF.swift | Implements Sigstore TUF trusted-root refresh, caching, rotation/rollback checks, and trusted-root decoding. |
| Attestation/X509.swift | Minimal X.509 parsing + EKU/key-usage checks, chain validation, SCT verification, and signature verification. |
| Attestation/Primitives.swift | Provides canonical JSON, DER/TLS parsing helpers, signature verification, Snappy, and Merkle proof verification. |
| Resources/tuf-root.json | Embedded TUF root used for Sigstore trust bootstrapping. |
| Resources/trusted-root.json | Embedded Sigstore trusted root snapshot fallback. |
| Resources/README.txt | Documents purpose of embedded trust resources. |
| README.md | Documents new provenance feature and updated security model; bumps package version to 4.1.0. |
| Tests/AppUpdaterTests/AppUpdaterTests.swift | Adds decoding + promoted-digest validation tests; asserts default attestationPolicy is nil. |
| Tests/AppUpdaterTests/SigstoreVerificationTests.swift | Adds fixture-based Sigstore bundle verification test + mutation-based negative tests. |
| Tests/AppUpdaterTests/TUFTests.swift | Adds tests for root rotation, rollback, expiry, truncation/tampering, and threshold enforcement. |
| Tests/AppUpdaterTests/AttestationPrimitiveTests.swift | Adds unit tests for canonical JSON, DER parsing, Snappy, P-256 verification, and Merkle proof basics. |
| Tests/Fixtures/AutomicVault-2.8.0.bundle.json | Fixture: decompressed GitHub SLSA/Sigstore bundle used by verification tests. |
| Tests/Fixtures/README.md | Fixture provenance/licensing note for the Automic Vault bundle fixture. |
| Tests/Fixtures/tuf-trusted-root.json | Fixture: Sigstore trusted root JSON used by TUF tests. |
| Tests/Fixtures/tuf-timestamp.json | Fixture: TUF timestamp metadata used by TUF tests. |
| Tests/Fixtures/tuf-742.timestamp.json | Fixture: older TUF timestamp metadata used to test rollback detection. |
| Tests/Fixtures/tuf-165.snapshot.json | Fixture: TUF snapshot metadata used by TUF tests. |
| Tests/Fixtures/tuf-14.targets.json | Fixture: TUF targets metadata used by TUF tests. |
| Tests/Fixtures/tuf-14.root.json | Fixture: older TUF root used to test sequential root rotation. |
| Tests/Fixtures/tuf-15.root.json | Fixture: newer TUF root used to test sequential root rotation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
Author
|
@copilot do you consider your issues resolved by the latest commit? |
Contributor
Yes, both issues are resolved in commit
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes automic-vault/automic-vault#88
Adds opt-in, fail-closed GitHub Actions provenance verification directly to AppUpdater.
GitHubAttestationPolicywhile preserving AppUpdater 4 behavior when unsetValidation: all 73 tests pass, including TUF, parser/network, mutation, transaction, compatibility, and Automic Vault 2.8.0 fixture coverage.