Fix a CVE by using myst_parser instead of m2r2#153
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the documentation build toolchain to address CVEs caused by m2r2 pinning mistune==0.8.4, switching the Sphinx Markdown integration over to myst-parser and updating the lockfile accordingly.
Changes:
- Replace
m2r2withmyst-parserin the docs dependency group. - Update Sphinx configuration to use the
myst_parserextension. - Adjust one Markdown reference page formatting/anchors for MyST/Sphinx compatibility and refresh the dependency lockfile.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pyproject.toml | Swaps docs dependency from m2r2 to myst-parser to eliminate the vulnerable mistune pin. |
| poetry.lock | Updates resolved dependency graph (including newer mistune) consistent with the switch to myst-parser. |
| docs/conf.py | Replaces the Sphinx extension m2r2 with myst_parser. |
| docs/reference/using-measurement-data-services.md | Minor formatting tweaks and adds explicit section labels compatible with MyST/Sphinx linking. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mjohanse-emr
approved these changes
Jun 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.
What does this Pull Request accomplish?
Fix
https://github.com/ni/datastore-python/security/dependabot/35
https://github.com/ni/datastore-python/security/dependabot/37
https://github.com/ni/datastore-python/security/dependabot/38
m2r2, which we were using for Sphinx docs build, pinsmistuneat 0.8.4, which has a CVE. We can usemyst_parserinstead.Why should this Pull Request be merged?
CRA - Addressing CVEs
What testing has been done?
Built the docs locally and inspected the .md files to ensure the markdown files are still shown correctly.