Skip to content

fix(serve): Invoke pip without shell in xgboost install_package - #5981

Merged
lucasjia-aws merged 1 commit into
aws:masterfrom
lucasjia-aws:fix/xgboost-inference-install-package-no-shell
Jul 9, 2026
Merged

lucasjia-aws merged 1 commit into
aws:masterfrom
lucasjia-aws:fix/xgboost-inference-install-package-no-shell

Conversation

@lucasjia-aws

Copy link
Copy Markdown
Collaborator

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.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

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.
@lucasjia-aws
lucasjia-aws force-pushed the fix/xgboost-inference-install-package-no-shell branch from fcd3d40 to a81da52 Compare July 9, 2026 19:02
@lucasjia-aws
lucasjia-aws merged commit 82990b2 into aws:master Jul 9, 2026
15 of 18 checks passed
@lucasjia-aws
lucasjia-aws deleted the fix/xgboost-inference-install-package-no-shell branch July 27, 2026 19:15

This branch was previously deployed

1 inactive deployment
auto-approve — a81da528 Deployed Jul 9, 2026 by lucasjia-aws via wait-for-approval #927
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants