SEC: Block shell escapes in latex and ps commands#31282
Merged
WeatherGod merged 1 commit intomatplotlib:mainfrom Mar 13, 2026
Merged
SEC: Block shell escapes in latex and ps commands#31282WeatherGod merged 1 commit intomatplotlib:mainfrom
WeatherGod merged 1 commit intomatplotlib:mainfrom
Conversation
1 task
WeatherGod
reviewed
Mar 11, 2026
WeatherGod
reviewed
Mar 11, 2026
Member
|
Looks like the |
e05114b to
dec7e56
Compare
Contributor
Author
|
It's possible switching away from |
tacaswell
approved these changes
Mar 11, 2026
Member
tacaswell
left a comment
There was a problem hiding this comment.
I am indifferent to settling on one or two - on latex cli args or leaving as-is.
dec7e56 to
22f4279
Compare
Member
|
In principle, I approve these changes, but I don't know if the test failure is one of the spurious failures or actually related to these changes. |
Member
|
Someone must have re-run them, I'm only seeing a codecov failures but it is short an upload so I am not worried. |
WeatherGod
approved these changes
Mar 13, 2026
andreas16700
added a commit
to andreas16700/matplotlib
that referenced
this pull request
Mar 16, 2026
andreas16700
added a commit
to andreas16700/matplotlib
that referenced
this pull request
Mar 16, 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.
PR summary
See the discussion in #31249
This blocks our LaTeX and ps commands from arbitrary code execution in the shell:
--no-shell-escapeadded to all latex commands-R0to-R1to disallow shell execution.-R1is the default, so is there a reason we had this manually set to a lower security level? See the docs here: https://www.tug.org/texinfohtml/dvips.html#Option-details-1-dSAFERflag added to two ghostscript / ps calls which were missing it. May be the default, but now it's explicit, see the docs here: https://ghostscript.readthedocs.io/en/latest/Use.html#dsaferAI Disclosure
Claude used for the audit (found a few more spots to hit!), code manually reviewed
PR checklist