Repository navigation
Conversation
…HSA-c32q-gm5x-gjxh) R_LINTR, POWERSHELL_POWERSHELL, POWERSHELL_POWERSHELL_FORMATTER and ARM_ARM_TTK wrote the scanned file path between single quotes in the R / PowerShell script they run, so a quote in a file name ran as interpreter code. Paths and config files are now passed through MEGALINTER_LINT_* environment variables read by the script, and files whose name contains control characters are skipped with a warning. Hardening: php-cs-fixer generated config escapes directory names and the included config path; raku zef install no longer goes through a shell. TEST_KEYWORDS=r_lintr_test or powershell_powershell_test or powershell_powershell_formatter_test or arm_arm_ttk_test or php_php_cs_fixer_test or raku_raku_test or interpreter_path_injection_test
nvuillam
requested review from
Kurt-von-Laven,
bdovaz and
echoix
as code owners
October 30, 2026 23:42
TEST_KEYWORDS=r_lintr_test or powershell_powershell_test or powershell_powershell_formatter_test or arm_arm_ttk_test or php_php_cs_fixer_test or raku_raku_test or interpreter_path_injection_test
Member
Author
|
Superseded by #9404 |
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.
Summary
Improves security of
RLinter,PowershellLinterandArmLinter: they wrote the scanned file path between single quotes inside the script sent toR -e/pwsh -Command, so file names containing quotes or special characters were not handled safely.MEGALINTER_LINT_*environment variables (newLinter.lint_command_env, merged into the subprocess env) and read withSys.getenv()/$env:— no path is written in a script anymore, so ASCII and Unicode smart quotes are inertLinter.drop_files_unsafe_for_interpreter)powershell_formatter:-LiteralPathforGet-Content/Out-File, output encoding validatedPhpCsFixerLinter: PHP-escapes excluded directory names and the included config path in the generated configRakuLinter:zef installruns withoutshell=TrueTest plan
interpreter_path_injection_test.py(names with quotes incl. U+2018/U+2019/U+201B/U+2032, config paths, fix mode, env merge, skip, PHP escaping)r_lintr,powershell_powershell,powershell_powershell_formatter,arm_arm_ttk,php_php_cs_fixer,raku_raku