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/verify-changed-files action to v15 [security] #1288

Conversation

plural-renovate[bot]
Copy link
Contributor

This PR contains the following updates:

Package Type Update Change
tj-actions/verify-changed-files action major v14 -> v15

GitHub Vulnerability Alerts

CVE-2023-52137

Summary

The tj-actions/verify-changed-files action allows for command injection in changed filenames, allowing an attacker to execute arbitrary code and potentially leak secrets.

Details

The verify-changed-files workflow returns the list of files changed within a workflow execution.

This could potentially allow filenames that contain special characters such as ; and ` (backtick) which can be used by an attacker to take over the GitHub Runner if the output value is used in a raw fashion (thus being directly replaced before execution) inside a run block. By running custom commands an attacker may be able to steal secrets such as GITHUB_TOKEN if triggered on other events than pull_request. For example on push.

Proof of Concept

  1. Submit a pull request to the repository with a new file injecting a command. For example $(whoami).txt would be a valid filename.
  2. Upon approval of the workflow (triggered by the pull request), the action will get executed and the malicious pull request filename will flow into the List all changed files tracked and untracked files step.
- name: List all changed files tracked and untracked files
  run: |
    echo "Changed files: $"

Example output:

##[group]Run echo "Changed files: $(whoami).txt"
  echo "Changed files: $(whoami).txt"�[0m
shell: /usr/bin/bash -e {0}

##[endgroup]
Changed files: runner.txt

Impact

This issue may lead to arbitrary command execution in the GitHub Runner.

Resolution

  • A new safe_output input would be enabled by default and return filename paths escaping special characters like ;, ` (backtick), $, (), etc for bash environments.

  • A safe recommendation of using environment variables to store unsafe outputs.

- name: List all changed files tracked and untracked files
  env:
     CHANGED_FILES: $
  run: |
    echo "Changed files: $CHANGED_FILES"

Resources


Release Notes

tj-actions/verify-changed-files (tj-actions/verify-changed-files)

v15

Compare Source

Changes in v15.0.2

What's Changed

Full Changelog: tj-actions/verify-changed-files@v15...v15.0.2


Changes in v15.0.1

What's Changed

Full Changelog: tj-actions/verify-changed-files@v15...v15.0.1


Changes in v15.0.0

🔥 🔥 Breaking Changes 🔥 🔥

  • match-gitignore-files input introduced and enabled by default which would include git ignored files generated during the workflow execution.

What's Changed

New Contributors

Full Changelog: tj-actions/verify-changed-files@v14...v15.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 becomes conflicted, 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 Renovate Bot.

@plural-renovate plural-renovate bot added the dependencies Pull requests that update a dependency file label Jan 5, 2024
@plural-renovate plural-renovate bot force-pushed the renovate/github-tags-tj-actions/verify-changed-files-vulnerability branch from 26f9158 to 6fa02c1 Compare January 5, 2024 01:14
@michaeljguarino michaeljguarino merged commit 211a32a into master Jan 5, 2024
5 of 10 checks passed
@michaeljguarino michaeljguarino deleted the renovate/github-tags-tj-actions/verify-changed-files-vulnerability branch January 5, 2024 01:44
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant