Skip to content

Conversation

@kiblik
Copy link
Contributor

@kiblik kiblik commented Oct 23, 2025

@dryrunsecurity
Copy link

DryRun Security

This pull request contains a command injection vulnerability in the GitHub Actions workflow (.github/workflows/test-helm-chart.yml) where github.event.pull_request.title is interpolated into a shell run step and a malicious PR title with a single quote can break out of the quoted string to execute arbitrary commands on the runner; the existing if-condition does not reliably mitigate this because an attacker can craft a branch name from a fork to meet it. Fix by properly sanitizing or avoiding direct shell interpolation (use safe inputs, environment variables, or GitHub Actions toolkit commands).

Command Injection in GitHub Actions in .github/workflows/test-helm-chart.yml
Vulnerability Command Injection in GitHub Actions
Description The GitHub Actions workflow directly interpolates github.event.pull_request.title into a shell command within a run step. Although the string is single-quoted, a malicious pull request title containing a single quote character (') can break out of the quoted string, allowing an attacker to inject and execute arbitrary shell commands on the GitHub Actions runner. The if condition does not prevent exploitation, as an attacker can create a PR from a forked repository with a branch name matching the condition (e.g., renovate/malicious-branch).

yq -i '.annotations."artifacthub.io/changes" += "- kind: changed\n description: ${{ github.event.pull_request.title }}\n"' helm/defectdojo/Chart.yaml
- name: Run helm-docs (update)
uses: losisin/helm-docs-github-action@a57fae5676e4c55a228ea654a1bcaec8dd3cf5b5 # v1.6.2


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

@valentijnscholten valentijnscholten added this to the 2.51.3 milestone Oct 23, 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

@valentijnscholten valentijnscholten merged commit 3881936 into DefectDojo:bugfix Oct 27, 2025
148 checks passed
@kiblik kiblik deleted the helm_update_renovate branch October 27, 2025 17:19
@valentijnscholten valentijnscholten modified the milestones: 2.51.3, 2.52.0 Oct 27, 2025
kiblik added a commit to kiblik/django-DefectDojo that referenced this pull request Nov 4, 2025
kiblik added a commit to kiblik/django-DefectDojo that referenced this pull request Nov 4, 2025
kiblik added a commit to kiblik/django-DefectDojo that referenced this pull request Nov 4, 2025
kiblik added a commit to kiblik/django-DefectDojo that referenced this pull request Nov 4, 2025
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.

6 participants