Repository navigation
Commit fcd3d40
committed
fix(serve): Invoke pip without shell in xgboost install_package
Replace the shell-interpreted, string-built pip command in
install_package() with a list-argument subprocess call using
sys.executable -m pip. This removes the shell=True pattern and
prevents shell metacharacter interpretation in package_name as a
defense-in-depth hardening against accidental misuse.1 parent 3024a57 commit fcd3d40
1 file changed
Lines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
155 | 156 | | |
156 | 157 | | |
157 | 158 | | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
| 159 | + | |
162 | 160 | | |
163 | 161 | | |
164 | | - | |
| 162 | + | |
165 | 163 | | |
166 | 164 | | |
167 | 165 | | |
| |||
0 commit comments