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 v14 [security] #1286

Conversation

plural-renovate[bot]
Copy link
Contributor

This PR contains the following updates:

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

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)

v14

Compare Source

Changes in v14.0.2

What's Changed

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


Changes in v14.0.1

What's Changed

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


Changes in v14.0.0

🔥 🔥 BREAKING CHANGE 🔥 🔥

  • Removed the autocrlf input.

What's Changed

Full Changelog: tj-actions/verify-changed-files@v13...v14.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 2, 2024
Copy link

stoat-app bot commented Jan 2, 2024

Easy and customizable dashboards for your build system. Learn more about Stoat ↗︎

Static Hosting

Name Link Commit Status
api-coverage Visit 26f9158
rtc-coverage Visit 26f9158
core-coverage Visit 26f9158
cron-coverage Visit 26f9158
email-coverage Visit 26f9158
worker-coverage Visit 26f9158
api-test-results Visit 26f9158
graphql-coverage Visit 26f9158
rtc-test-results Visit 26f9158
core-test-results Visit 26f9158
cron-test-results Visit 26f9158
email-test-results Visit 26f9158
worker-test-results Visit 26f9158
graphql-test-results Visit 26f9158

Job Runtime

job runtime chart

debug

@michaeljguarino michaeljguarino merged commit 35c7587 into master Jan 5, 2024
11 checks passed
@michaeljguarino michaeljguarino deleted the renovate/github-tags-tj-actions/verify-changed-files-vulnerability branch January 5, 2024 00:39
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.

1 participant