Skip to content
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

fix: make Github Action safe to RCE via pull request title #1600

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

lociko
Copy link
Contributor

@lociko lociko commented Feb 3, 2025

  • Make GitHub Action safe against Remote Code Execution via PR title.

Summary of changes

A malicious actor can create a valid pull request that fixes a legitimate issue in the project. Once the issue is reviewed and the PR is approved before merging, the actor can change the PR title to something like:

Some PR "; printenv|base64 -d; echo "123

This allows them to exfiltrate environment variables and potentially compromise sensitive data.

Test plan

Tested by running

# command(s) to exercise these changes

@lociko lociko changed the title Fix: Make Github Action safe to code RCE via Pull Request title Fix: Make Github Action safe to RCE via Pull Request title Feb 4, 2025
@huxuan huxuan changed the title Fix: Make Github Action safe to RCE via Pull Request title fix: make Github Action safe to RCE via pull request title Feb 5, 2025
@huxuan
Copy link
Member

huxuan commented Feb 5, 2025

LGTM. Thanks for making pipx safer!

Let us wait for other maintainers' review.

@dukecat0 dukecat0 merged commit c6844ba into pypa:main Feb 5, 2025
11 checks passed
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.

3 participants