Skip to content

Python: Model shell -c command arguments - #22434

Open
theinfosecguy wants to merge 1 commit into
github:mainfrom
theinfosecguy:python-shell-c-command-modeling
Open

Python: Model shell -c command arguments#22434
theinfosecguy wants to merge 1 commit into
github:mainfrom
theinfosecguy:python-shell-c-command-modeling

Conversation

@theinfosecguy

Copy link
Copy Markdown
Contributor

Fixes #21735.

Models command arguments passed with -c to recognized POSIX shell interpreters through os.exec*, os.spawn*, os.posix_spawn*, and argument-vector subprocess APIs.

This detects tainted shell commands while leaving ordinary argument vectors unchanged. The modeling is limited to literal shell executables, an exact -c flag, and literal argument sequences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

False negative: missing os.exec* APIs with sh -c as sink in py/code-injection.

1 participant