Repository navigation
prototype(snp_collateral): verify VCEK signature against ASK and enforce canonical HCL base64, report version, and component bounds (#646) - #651
Open
drk-ram wants to merge 1 commit into
Conversation
Contributor
|
🟡 Contributor Check: MEDIUM
Automated check by AgenTrust Contributor Check. |
drk-ram
force-pushed
the
drk-ram-fix-snp-collateral-646
branch
from
October 30, 2026 15:10
6d5a463 to
1fbe6b0
Compare
…rce canonical HCL base64, report version, and component bounds (agentrust-io#646) - Verify vcek.issuer == ask.subject and _verify_signed_by(vcek, ask) in appraise_collateral. - Require canonical base64 encoding on packet['hcl_b64'] and report_version >= 2 in appraise_collateral. - Bound now to [1, 9007199254740991 - max_age] under clock_or_age and reject mismatched appraisal['profile'] in tcb_component. Closes agentrust-io#646 Signed-off-by: Raghuvar Karthik Durga <177662415+drk-ram@users.noreply.github.com>
drk-ram
force-pushed
the
drk-ram-fix-snp-collateral-646
branch
from
October 30, 2026 15:11
1fbe6b0 to
717a2c1
Compare
Member
|
Batch response for this cluster is here: #653 (comment) |
This branch has not been deployed
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.
What this changes
Closes #646.
Hardens
appraise_collateralandtcb_componentinprototype/snp_collateral.py:vcek.issuer == ask.subjectand_verify_signed_by(vcek, ask)inappraise_collateral(CollateralDenied("product_chain")).packet["hcl_b64"]andreport_version >= 2inappraise_collateral(CollateralDenied("platform_evidence_format")).nowto1 <= now <= 9007199254740991 - max_ageunderCollateralDenied("clock_or_age")and rejects a mismatchedappraisal["profile"]underCollateralDenied("component_inputs")intcb_component.Validation commands and results:
PYTHONPATH=src python -m pytest tests/test_snp_collateral.py -q-> passedpython -m ruff check prototype/snp_collateral.py tests/test_snp_collateral.py-> passed (All checks passed!)python tools/check_dashes.py-> passed (no dashes outside examples/, spec/trace-v0.1.md)PYTHONPATH=src python tools/review_bar.py --base origin/main --head HEAD-> passed (7 changed test cases fail on behaviour at origin/main)Type of change
Spec section
prototype/snp_collateral.py(experimental SEV-SNP platform collateral appraisal prototype; no normative change tospec/trace-v0.2.md)Tests for a fix
vcek.issuer == ask.subject,_verify_signed_by(vcek, ask), canonicalhcl_b64round-trip, andversion >= 2inappraise_collateral:tests/test_snp_collateral.py::test_appraise_collateral_verifies_vcek_issuer_and_signature_and_report_bounds1 <= now <= 9007199254740991 - max_ageandappraisal["profile"] == PROFILEintcb_component:tests/test_snp_collateral.py::test_tcb_component_rejects_zero_or_overflow_now_and_wrong_profileChangelog entry
prototype.snp_collateral.appraise_collateralnow verifiesvcek.issuer == ask.subjectand the ASK signature over the VCEK certificate, requires canonical base64 onhcl_b64andreport_version >= 2, andtcb_componentenforces1 <= now <= 9007199254740991 - max_ageunderclock_or_ageand rejects mismatchedappraisal["profile"].Checklist
git commit -s)<!-- CHANGED: #NNN: description -->in spec text