Skip to content

Conversation

codejedi365
Copy link
Collaborator

@codejedi365 codejedi365 commented May 13, 2025

Purpose

Rationale

Prevents the malicious execution of arbitrary code when a command injection is defined in the action yaml as part of the action parameter specification. Low impact exploitation if proper least privilege is implemented and pull request code is reviewed before merging to a release branch.

Includes a breaking change as the root_options action input parameter has been removed because it created a command injection vulnerability for arbitrary code to execute within the container context of the GitHub action if a command injection code was provided as part of the root_options parameter string. To eliminate the vulnerability, each relevant option that can be provided to semantic-release has been individually added as its own parameter and will be processed individually to prevent command injection. Please review our Github Actions Configuration page on the Python Semantic Release Documentation website to review the newly available configuration options that replace the root_options parameter.

How did you test?

Added an additional test to run the github action simulator with the new parameter config_file.

@codejedi365 codejedi365 force-pushed the fix/github-action-cmd-injection-vulnerability branch 4 times, most recently from 4bb4c61 to a3ef23b Compare May 14, 2025 03:16
…n script

Prevents the malicious execution of arbitrary code when a command injection is
defined in the action yaml as part of the action parameter specification. Low
impact exploitation if proper least privilege is implemented and pull request
code is reviewed before merging to a release branch.

BREAKING CHANGE: The `root_options` action input parameter has been removed
because it created a command injection vulernability for arbitrary code to
execute within the container context of the GitHub action if a command injection
code was provided as part of the `root_options` parameter string. To eliminate
the vulnerability, each relevant option that can be provided to `semantic-release`
has been individually added as its own parameter and will be processed individually
to prevent command injection. Please review our `Github Actions Configuration`__
page on the Python Semantic Release Documentation website to review the newly available
configuration options that replace the `root_options` parameter.

__ https://python-semantic-release.readthedocs.io/en/stable/automatic-releases/github-actions.html

Resolves: python-semantic-release#55
@codejedi365 codejedi365 force-pushed the fix/github-action-cmd-injection-vulnerability branch from a3ef23b to 4e97de7 Compare May 23, 2025 22:40
@codejedi365 codejedi365 changed the title fix(github-action)!: resolve command injection vulnerability in actio… fix(github-action)!: resolve command injection vulnerability in action script May 25, 2025
@codejedi365 codejedi365 merged commit 1863c50 into python-semantic-release:main May 25, 2025
3 checks passed
@codejedi365 codejedi365 deleted the fix/github-action-cmd-injection-vulnerability branch May 25, 2025 07:49
@codejedi365
Copy link
Collaborator Author

🎉 This PR has been published as part of v10.0.0 🎉

You can find more information about this release on the GitHub Releases page.

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.

Command injection through GH action inputs
1 participant