fix: patch llguidance to remove reference to ring crate#1948
Merged
kunal-vaishnavi merged 2 commits intoJan 22, 2026
Merged
Conversation
Contributor
Author
|
@microsoft-github-policy-service agree company="Microsoft" |
eserscor
previously approved these changes
Jan 16, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request addresses security vulnerability MVS-2022-374v-6mvc by removing references to the deprecated ring crate from the llguidance dependency's Cargo.lock file. The fix applies a patch at build time that comments out unused workspace members in llguidance that transitively depend on ring, ensuring component governance compliance.
Changes:
- Added a patch file that removes
ringpackage entry from Cargo.lock and comments out workspace members (python_ext, sample_parser, json_stats, toktrie_hf_tokenizers, toktrie_hf_downloader, toktrie_tiktoken) that depend onring - Modified the CMake build script to apply the patch automatically when USE_GUIDANCE is enabled, using a marker file to ensure idempotent application
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| cmake/external/onnxruntime_external_deps.cmake | Added logic to apply a git patch to llguidance source after fetching, with idempotency check via marker file |
| cmake/external/llguidance/remove-ring-ref-in-cargo-lock.patch | New patch file that removes ring crate from Cargo.lock and comments out unused workspace members in Cargo.toml |
eserscor
approved these changes
Jan 21, 2026
kunal-vaishnavi
approved these changes
Jan 22, 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.
Fix MVS-2022-374v-6mvc by purging references to
ringfromCargo.lock.