Self-transparent code update#7681
Merged
maxtropets merged 28 commits intomicrosoft:mainfrom Mar 6, 2026
Merged
Conversation
0e828f8 to
fddeb44
Compare
maxtropets
commented
Feb 25, 2026
maxtropets
commented
Feb 25, 2026
maxtropets
commented
Feb 25, 2026
maxtropets
commented
Feb 25, 2026
fddeb44 to
bca9542
Compare
maxtropets
commented
Feb 25, 2026
bca9542 to
733c953
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements self-transparent code updates for CCF's MST (Multi-party Secure Transparency) use case. It enables operators to set a JavaScript-based code update policy that validates transparent statements (SCITT-compliant COSE envelopes) containing self-signed CCF receipts. When a node attempts to join with untrusted host_data, the system can fall back to verifying a transparent statement that proves the code was registered in a trusted transparency log (the CCF service itself).
Changes:
- Adds infrastructure for transparent code update policy stored in KV and evaluated via JavaScript
- Introduces transparent statement verification that validates COSE signatures, DID:x509 issuer resolution, and self-issued CCF receipts
- Extends node join protocol to accept optional code_transparent_statement_path configuration
- Adds sample application endpoints for registering and retrieving transparent statements with embedded receipts
Reviewed changes
Copilot reviewed 32 out of 32 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/infra/remote.py | Adds code_transparent_statement_path parameter to test infrastructure |
| tests/infra/node.py | Propagates code_transparent_statement_path to node setup |
| tests/infra/network.py | Adds code_transparent_statement_path to network configuration |
| tests/infra/consortium.py | Adds governance methods for setting/removing code update policy |
| tests/config.jinja | Adds conditional code_transparent_statement_path to join config |
| tests/code_update.py | Implements comprehensive test for code update policy feature (but comments out all existing tests) |
| src/node/rpc/*.h | Extends verify_quote interface to accept code_transparent_statement and network_identity_subsystem |
| src/node/quote.cpp | Implements verify_code_transparent_statement with signature, policy, and receipt verification |
| src/node/js_policy.h | New file implementing JavaScript policy evaluation for code updates |
| src/node/cose_common.h | Refactors CWT claims structure, adds Sign1ProtectedHeader and decode functions |
| src/crypto/cose_utils.h | Extracts parse_x5chain utility for reuse across codebase |
| src/host/*.cpp/.h | Adds code_transparent_statement_path configuration support |
| samples/apps/logging/logging.cpp | Adds endpoints for registering and retrieving transparent statements |
| samples/constitutions/default/actions.js | Adds governance actions for code update policy management |
| include/ccf/service/tables/code_update_policy.h | New table definition for code update policy storage |
| include/ccf/node/*.h | Updates startup config and quote verification interface |
| doc/schemas/*.json | Updates OpenAPI and host config schemas |
eddyashton
reviewed
Feb 25, 2026
achamayou
reviewed
Feb 25, 2026
achamayou
reviewed
Feb 25, 2026
achamayou
reviewed
Feb 25, 2026
13 tasks
Co-authored-by: Amaury Chamayou <amaury@xargs.fr>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…axtropets/CCF into f/self-transparent-code-update
achamayou
reviewed
Mar 4, 2026
eddyashton
reviewed
Mar 5, 2026
Co-authored-by: Eddy Ashton <ashton.eddy@gmail.com>
achamayou
approved these changes
Mar 5, 2026
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.
The final item for #7401's self-transparency section.
TL;DR
host_dataisn't allowed explicitlyDon't forget before merging