Repository navigation
feat: report sealed only when a Cloud Seal verifies against pinned keys - #68
Merged
Merged
Conversation
RunOutcome.seal_verified() is true only for a success with execution outcome VERIFIED whose report carries a Cloud Execute receipt for this run (verified outcome) and whose seal_signature (openadapt.seal-signature/v1) verifies against a pinned issuer registry (OPENADAPT_SEAL_KEYS_PATH or OPENADAPT_SEAL_KEYS_JSON; never fetched at verify time). Then the result says sealed: true and proof: sealed. Every other case keeps sealed: false; a verified local run stays done with proof: local. Signed-off-by: Richard Abrich <richard.abrich@mldsai.com>
Member
Author
|
Self-review.
|
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.
Security-sensitive (proof semantics): left for Richard's review.
src/openadapt_agent/seal.pyverifies a Cloud Execute receipt'sseal_signature. It's byte-compatible with CloudsealSignature.ts(OpenAdaptAI/openadapt-cloud#399/#402) andopenadapt_types.seal(feat(execute): optional Cloud issuer seal_signature on ExecuteEvidenceReceiptV1 openadapt-types#44). It's a self-contained copy until types#44 is released; then it can import from types.sealed: true/proof: "sealed"requires all of the following:execution_outcome == VERIFIEDreport.execute_receipt.execution_id == run_idwith outcome verified or rolled_back_verifiedrun_idis bound to the receiptOPENADAPT_SEAL_KEYS_PATH/OPENADAPT_SEAL_KEYS_JSON, saved from/api/public/seal-keys; never fetched at verify time)sealed: false. Fail-closed semantics are unchanged: a verified local run is still done withproof: local.execute_receiptinto a local Flow report today, so in practice this stays false until a Cloud-backed path supplies the receipt. This PR is the verification gate.Tests:
tests/test_seal.py(forged, tampered, revoked, wrong-run, unsigned and no-keys cases all refuse, plus the runner end-to-end). 346 pass; ruff clean.