Feat/upgrade slsa attestation - #791
Open
Derekwalter999 wants to merge 2 commits into
Open
Conversation
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.
Description
Resolves #711 Contract upgrade orchestrator: reproducible build attestation verification.
Context
To prevent supply-chain attacks where a malicious actor substitutes unverified Soroban code, we must enforce reproducible-build attestations matching SLSA Level 3 requirements. This ensures that any uploaded target code-id has explicit, cryptographically verifiable provenance from an authorized builder identity configured in the tenant settings.
Changes Made
Attestation Verifier Tests: The core verification logic already existed but lacked test coverage. Added src/security/attestationVerifier.test.ts with comprehensive edge-case assertions.
Security & Correctness Assumptions Validated:
Rejects attestations from unknown or unauthorized builder identities.
Rejects missing builder IDs, mismatched target_code_id digests, and unsupported SLSA predicate types.
Verification is wired directly into the orchestrator's createUpgrade flow.
Emits upgrade.attestation.verified audit trails for compliance.
Checklist
Attestation verification logic rigorously covered under test.
Correctly rejects unknown and unauthorized builders.
Emits required audit event (upgrade.attestation.verified).
95%+ test coverage maintained.