Igvmfilegen: Support CoRIM generation and patch command - #3088
Merged
Ming-Wei Shih (mingweishih) merged 1 commit intoJul 21, 2026
Merged
Conversation
Copilot started reviewing on behalf of
Ming-Wei Shih (mingweishih)
March 20, 2026 22:29
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Adds CoRIM (Concise Reference Integrity Manifest) patching/extraction capabilities to igvmfilegen, enabling post-build injection of CoRIM document/signature data into an existing IGVM file (including support for splitting bundled COSE_Sign1 inputs).
Changes:
- Add new
DumpCorimandPatchCorimCLI subcommands to inspect and patch CoRIM headers in IGVM files. - Introduce a new
corimmodule implementing IGVM directive patching plus minimal COSE_Sign1 split/validation utilities (with unit tests). - Switch
igvm/igvm_defsworkspace deps to a git fork/branch that includes the required CoRIM header support.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| vm/loader/igvmfilegen/src/main.rs | Adds new CLI commands and implements CoRIM header dumping/patching entrypoints. |
| vm/loader/igvmfilegen/src/corim/mod.rs | Adds IGVM-level CoRIM patching logic and compatibility-mask helpers. |
| vm/loader/igvmfilegen/src/corim/cose.rs | Adds COSE_Sign1 parsing/splitting/validation helpers plus unit tests. |
| vm/loader/igvmfilegen/Cargo.toml | Adds open_enum dependency for the new COSE/CBOR helpers. |
| Cargo.toml | Switches igvm and igvm_defs from crates.io to a git fork/branch. |
| Cargo.lock | Updates lock entries for the new git-based igvm crates and incidental dependency resolution changes. |
Copilot started reviewing on behalf of
Ming-Wei Shih (mingweishih)
March 20, 2026 22:46
View session
Copilot started reviewing on behalf of
Ming-Wei Shih (mingweishih)
March 24, 2026 18:02
View session
Copilot started reviewing on behalf of
Ming-Wei Shih (mingweishih)
March 24, 2026 18:16
View session
Copilot started reviewing on behalf of
Ming-Wei Shih (mingweishih)
March 26, 2026 21:00
View session
Copilot started reviewing on behalf of
Ming-Wei Shih (mingweishih)
March 26, 2026 21:10
View session
Ming-Wei Shih (mingweishih)
force-pushed
the
igvmfilegen_corim_write
branch
from
May 29, 2026 19:14
568d310 to
6c10547
Compare
Ming-Wei Shih (mingweishih)
force-pushed
the
igvmfilegen_corim_write
branch
from
May 29, 2026 19:24
6c10547 to
6e2ff44
Compare
Comment on lines
+611
to
+612
| igvm = { git = "https://github.com/mingweishih/igvm", rev = "c389b9f", features = ["corim"] } | ||
| igvm_defs = { git = "https://github.com/mingweishih/igvm", rev = "c389b9f", default-features = false } |
Ming-Wei Shih (mingweishih)
force-pushed
the
igvmfilegen_corim_write
branch
from
June 12, 2026 18:30
3a7b319 to
eaf8b8f
Compare
Contributor
Author
Review responsesHigh-Impact issues:
Behavior nuances worth surfacing
Minor
Test Coverage
Petri failuresfailures are unrelated to this PR. |
Ming-Wei Shih (mingweishih)
requested review from
Copilot and
Mike Ebersol (mebersol)
June 12, 2026 23:34
Ming-Wei Shih (mingweishih)
force-pushed
the
igvmfilegen_corim_write
branch
from
June 17, 2026 20:48
eaf8b8f to
fd8b2ed
Compare
Ming-Wei Shih (mingweishih)
force-pushed
the
igvmfilegen_corim_write
branch
from
June 17, 2026 21:00
fd8b2ed to
224346f
Compare
Ming-Wei Shih (mingweishih)
force-pushed
the
igvmfilegen_corim_write
branch
from
June 22, 2026 22:03
224346f to
bf3969b
Compare
Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
Chris Oo (chris-oo)
approved these changes
Jul 21, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 12 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
vm/loader/igvmfilegen/src/platform_mask.rs:102
- Doc comment says this returns a "lowercase" platform name, but the fallback path can return
platform_{platform:?}viaisolation_label, which is not necessarily lowercase (e.g.,platform_Native,platform_SEV_SNP). Either normalize the fallback to lowercase or adjust the docs so callers don't rely on lowercase output.
/// Map a compatibility mask to a lowercase platform name suitable for use in
/// file names. Returns the platform's canonical short name (`"vbs"`, `"snp"`,
/// `"tdx"`) when the mask matches a known platform header; otherwise
/// `platform_<Debug>` for a matching header whose platform type has no
/// canonical short name, or `mask_0x<hex>` if the mask matches no platform
/// header at all.
Chris Oo (chris-oo)
approved these changes
Jul 21, 2026
This was referenced Jul 23, 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.
This PR adds the support of writing CoRIM to an existing IGVM file, allowing for injecting the CoRIM files post build in the pipeline.
By IGVM design, a signed CoRIM is expected to be broken into payload and signed envelope with payload detached and written into
CORIM_DOCUMENTandCORIM_SIGNATUREentries correspondingly. The idea is decoupling the payload generation and the signing process. However, given that the CoRIM detached signing might not always be supported by the signing infrastructure, the tool additionally supports taking a signed CoRIM as input and handles the decoupling before writing to the IGVM file.