-
Notifications
You must be signed in to change notification settings - Fork 867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncontrolled input fix for ModelManager #2635
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2635 +/- ##
=======================================
Coverage 71.34% 71.34%
=======================================
Files 85 85
Lines 3905 3905
Branches 58 58
=======================================
Hits 2786 2786
Misses 1115 1115
Partials 4 4 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only need replace string with string[] for Runtime exec.
model.getModelDir().getAbsoluteFile()); | ||
|
||
ProcessBuilder processBuilder = new ProcessBuilder(commandParts); | ||
processBuilder.directory(model.getModelDir().getAbsoluteFile()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might break some cx environment setting such as SageMaker, where model dir is readonly.
Fixes
https://github.com/pytorch/serve/security/code-scanning/36
https://github.com/pytorch/serve/security/code-scanning/34