Skip to content

igvmfilegen: prepare endorsements and re-sign SNP ID blocks - #4865

Open
Ming-Wei Shih (mingweishih) wants to merge 1 commit into
microsoft:mainfrom
mingweishih:legacy-hcl-corim-signing
Open

Ming-Wei Shih (mingweishih) wants to merge 1 commit into
microsoft:mainfrom
mingweishih:legacy-hcl-corim-signing

Conversation

@mingweishih

Copy link
Copy Markdown
Contributor

Support external signing workflows for existing IGVM images without rebuilding them or substituting image identity defaults. Keep CoRIM endorsement preparation separate from SNP ID-block signing.

  • Add prepare-endorsement and verify-endorsement for SNP, TDX, and VBS, with signing artifacts, hash provenance, and verification of the selected endorsement without permitting unrelated image changes.
  • Add prepare-snp-id-block with an optional decoded JSON dump and add-snp-id-block --replace-existing for identity-preserving external signatures. Validate existing signatures or unsigned placeholders.
  • Derive SNP endorsement SVN from an existing ID block, or require an explicit SVN when absent, as for TDX/VBS. Reject mismatches in both CoRIM preparation and ID-block addition or replacement.
  • Allow explicit firmware DLL resource and language selection for inspection and finalized endorsement verification.
  • Pin igvm and igvm_defs to upstream revision 568e2719972e, including checked SNP ID-block replacement from serializer: support checked SNP ID block replacement igvm#137.
  • Document the independent signing workflows and trust boundaries in the igvmfilegen tool guide. Signature verification does not establish signer authorization or certificate trust.

Validation: igvmfilegen Clippy (all targets), rustdoc, all 96 unit tests, cargo xtask fmt --fix, and git diff --check passed. Hardware acceptance was not tested.

Support external signing workflows for existing IGVM images without
rebuilding them or substituting image identity defaults. Keep CoRIM
endorsement preparation separate from SNP ID-block signing.

- Add prepare-endorsement and verify-endorsement for SNP, TDX, and VBS,
  with signing artifacts, hash provenance, and verification of the
  selected endorsement without permitting unrelated image changes.
- Add prepare-snp-id-block with an optional decoded JSON dump and
  add-snp-id-block --replace-existing for identity-preserving external
  signatures. Validate existing signatures or unsigned placeholders.
- Derive SNP endorsement SVN from an existing ID block, or require an
  explicit SVN when absent, as for TDX/VBS. Reject mismatches in both
  CoRIM preparation and ID-block addition or replacement.
- Allow explicit firmware DLL resource and language selection for
  inspection and finalized endorsement verification.
- Pin igvm and igvm_defs to upstream revision 568e2719972e, including
  checked SNP ID-block replacement from microsoft/igvm#137.
- Document the independent signing workflows and trust boundaries in
  the igvmfilegen tool guide. Signature verification does not establish
  signer authorization or certificate trust.

Validation: igvmfilegen Clippy (all targets), rustdoc, all 96 unit tests,
cargo xtask fmt --fix, and git diff --check passed. Hardware acceptance
was not tested.

Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
Copilot AI balanced review requested due to automatic review settings November 3, 2026 02:10
@mingweishih
Ming-Wei Shih (mingweishih) requested a review from a team as a code owner November 3, 2026 02:10
@github-actions github-actions Bot added the Guide label Nov 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Security-sensitive SNP re-signing and endorsement verification require human review of signer authorization and firmware assumptions, while hardware acceptance remains unvalidated.

No open issues 🎉

What changed in this PR

Extends igvmfilegen with external signing workflows for existing IGVM images, keeping CoRIM endorsement preparation separate from identity-preserving SNP ID-block signing.

Changes:

  • Adds endorsement preparation and verification for SNP, TDX, and VBS, with artifact hashes and checks against unrelated image changes.
  • Adds SNP signing-payload export and explicit ID-block replacement, including signature validation and guest SVN consistency checks.
  • Adds firmware DLL resource selection, updates IGVM dependencies, and documents signing workflows and trust boundaries.
File Description
vm/​loader/​igvmfilegen/​src/​snp_id_block.rs Adds identity validation, payload export, signature replacement, and SVN checks with tests.
vm/​loader/​igvmfilegen/​src/​prepare_endorsement.rs Implements endorsement preparation, artifact publication, and finalized-image verification with tests.
vm/​loader/​igvmfilegen/​src/​main.rs Wires new commands and options into the CLI and adds command tests.
vm/​loader/​igvmfilegen/​src/​firmware_dll.rs Adds explicit resource and language selection with ambiguity checks and tests.
vm/​loader/​igvmfilegen/​src/​corim_signature/​mod.rs Exposes signature verification and test helpers for endorsement workflows.
vm/​loader/​igvmfilegen/​Cargo.toml Adds tempfile for artifact publication.
Guide/​src/​dev_guide/​dev_tools/​igvmfilegen.md Documents independent signing workflows, verification, resource selection, and trust limits.
Cargo.toml Pins IGVM dependencies to the revision supporting checked ID-block replacement.
Cargo.lock Records updated IGVM dependencies and the tool’s tempfile dependency.

Review effort: Balanced

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants