Skip to content

Conversation

@kiblik
Copy link
Contributor

@kiblik kiblik commented Nov 24, 2025

Signed-off-by: kiblik <5609770+kiblik@users.noreply.github.com>
@dryrunsecurity
Copy link

DryRun Security

This pull request contains a command-injection risk in the GitHub Actions workflow (.github/workflows/test-helm-chart.yml): the PR title is incompletely sanitized before being used in a shell command, allowing an attacker to include metacharacters (e.g., ;, `, $, quotes, parentheses) in a title to execute arbitrary commands in the runner (e.g., "test; echo pwned").

Command Injection in .github/workflows/test-helm-chart.yml
Vulnerability Command Injection
Description The GitHub Actions workflow attempts to sanitize the pull request title before using it in a shell command. However, the sanitization is incomplete, as it does not remove critical shell metacharacters such as spaces, single quotes, double quotes, backslashes, dollar signs, parentheses, semicolons, or backticks. An attacker can craft a malicious pull request title containing these characters to inject arbitrary shell commands, which will be executed by the yq command within the GitHub Actions runner. For example, a title like test; echo pwned would execute echo pwned.

yq -i '.annotations."artifacthub.io/changes" += "- kind: changed\n description: $title\n"' helm/defectdojo/Chart.yaml
git add helm/defectdojo/Chart.yaml
git commit -m "ci: update Chart annotations from PR #${{ github.event.pull_request.number }}" || echo "No changes to commit"


All finding details can be found in the DryRun Security Dashboard.

@valentijnscholten valentijnscholten added this to the 2.53.0 milestone Nov 24, 2025
Copy link
Contributor

@mtesauro mtesauro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

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