sshserver.pl: pass command-line to system() safely#20996
sshserver.pl: pass command-line to system() safely#20996vszakats wants to merge 3 commits intocurl:masterfrom
system() safely#20996Conversation
system()system() safely
system() safelysystem() safely
|
augment review |
There was a problem hiding this comment.
Pull request overview
This PR hardens tests/sshserver.pl by switching ssh-keygen invocation from a shell-constructed command string to Perl’s list-form system() call, preventing shell interpretation of arguments (including those influenced by environment variables like CURL_TEST_SSH_KEY_FORMAT).
Changes:
- Build
ssh-keygenoptional arguments as an array (@sshkeygenopt) instead of concatenating into a string. - Invoke
ssh-keygenvia list-formsystem($prog, @args)for both host and client key generation.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
🤖 Augment PR SummarySummary: Hardens 🤖 Was this summary useful? React with 👍 or 👎 |
Found by Codex Security
Follow-up to 89f306a #16781