Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Nov 28, 2024

This PR contains the following updates:

Package Change Age Confidence
github.com/cli/cli/v2 v2.62.0 -> v2.67.0 age confidence

GitHub Vulnerability Alerts

CVE-2024-53858

Summary

A security vulnerability has been identified in the GitHub CLI that could leak authentication tokens when cloning repositories containing git submodules hosted outside of GitHub.com and ghe.com.

Details

This vulnerability stems from several gh commands used to clone a repository with submodules from a non-GitHub host including gh repo clone, gh repo fork, gh pr checkout. These GitHub CLI commands invoke git with instructions to retrieve authentication tokens using the credential.helper configuration variable for any host encountered.

Prior to 2.63.0, hosts other than GitHub.com and ghe.com are treated as GitHub Enterprise Server hosts and have tokens sourced from the following environment variables before falling back to host-specific tokens stored within system-specific secured storage:

  • GITHUB_ENTERPRISE_TOKEN
  • GH_ENTERPRISE_TOKEN
  • GITHUB_TOKEN when CODESPACES environment variable is set

The result being git sending authentication tokens when cloning submodules.

In 2.63.0, these GitHub CLI commands will limit the hosts for which gh acts as a credential helper to source authentication tokens. Additionally, GITHUB_TOKEN will only be used for GitHub.com and ghe.com.

Impact

Successful exploitation could lead to a third-party using leaked authentication tokens to access privileged resources.

Remediation and mitigation

  1. Upgrade gh to 2.63.0
  2. Revoke authentication tokens used with the GitHub CLI:
  3. Review your personal security log and any relevant audit logs for actions associated with your account or enterprise

CVE-2024-54132

Summary

A security vulnerability has been identified in GitHub CLI that could create or overwrite files in unintended directories when users download a malicious GitHub Actions workflow artifact through gh run download.

Details

This vulnerability stems from a GitHub Actions workflow artifact named .. when downloaded using gh run download. The artifact name and --dir flag are used to determine the artifact’s download path. When the artifact is named .., the resulting files within the artifact are extracted exactly 1 directory higher than the specified --dir flag value.

In 2.63.1, gh run download will not download artifacts named .. and . and instead exit with the following error message:

error downloading ..: would result in path traversal

Impact

Successful exploitation heightens the risk of local path traversal attack vectors exactly 1 directory higher than intended.

Remediation and Mitigation

  1. Upgrade gh to 2.63.1
  2. Implement additional validation to ensure artifact filenames do not contain potentially dangerous patterns, such as .., to prevent path traversal risks.

CVE-2025-25204

Summary

A bug in GitHub's Artifact Attestation CLI tool, gh attestation verify, may return an incorrect zero exit status when no matching attestations are found for the specified --predicate-type <value> or the default https://slsa.dev/provenance/v1 if not specified. This issue only arises if an artifact has an attestation with a predicate type different from the one provided in the command. As a result, users relying solely on these exit codes may mistakenly believe the attestation has been verified, despite the absence of an attestation with the specified predicate type and the tool printing a verification failure.

Users are advised to update gh to version v2.67.0 as soon as possible.

Initial report: https://github.com/cli/cli/issues/10418
Fix: https://github.com/cli/cli/pull/10421

Details

The gh attestation verify command fetches, loads, and attempts to verify attestations associated with a given artifact for a specified predicate type. If an attestation is found, but the predicate type does not match the one specified in the gh attestation verify command, the verification fails, but the program exits early.

Due to a re-used uninitialized error variable, when no matching attestations are found, the relevant function returns nil instead of an error, causing the program to exit with a status code of 0, which incorrectly suggests successful verification.

PoC

Run gh attestation verify with local attestations using the --bundle flag and specify a predicate type with --predicate-type that you know will not match any of the attestations the command will attempt to verify. Confirm that the command exits with a zero status code.

Impact

Users who rely exclusively on the exit status code of gh attestation verify may incorrectly verify an attestation when the attestation's predicate type does not match the specified predicate type in the command.


Release Notes

cli/cli (github.com/cli/cli/v2)

v2.67.0: GitHub CLI 2.67.0

Compare Source

Security

A bug in gh attestation verify may return an incorrect zero exit status when no matching attestations are found for the specified --predicate-type <value> or the default https://slsa.dev/provenance/v1 if not specified. This issue only arises if an artifact has an attestation with a predicate type different from the one provided in the command. As a result, users relying solely on these exit codes may mistakenly believe the attestation has been verified, despite the absence of an attestation with the specified predicate type and the tool printing a verification failure.

Users are advised to update gh to version v2.67.0 as soon as possible.

For more information, see GHSA-fgw4-v983-mgp8

gh pr checkout now supports interactively selecting a pull request

Similar to commands like gh workflow run which prompts for a workflow to run, now gh pr checkout will prompt for a pull request to checkout. The list is currently limited to the most recent 10 pull requests in the repository.

393797385-499b5dfb-3103-42b8-876a-3a2d4d7173c8.mov

Big thank you to @​nilvng for implementing this 🙌

Contributing guidelines updated

We've updated our CONTRIBUTING.md guidelines to give more clarity around old help wanted issues.

TLDR:

  • Please directly mention @cli/code-reviewers when an issue you want to work on does not have clear Acceptance Criteria
  • Please only open pull requests for issues with both the help wanted label and clear Acceptance Criteria
  • Please avoid expanding pull request scope to include changes that are not described in the connected issue's Acceptance Criteria

Note: Acceptance Criteria is posted as an issue comment by a core maintainer.

See #​10381 and #​10395 for more information.

❓ Have feedback on anything? We'd love to hear from you in a discussion post ❤️

What's Changed

✨ Features
🐛 Fixes
📚 Docs & Chores
:dependabot: Dependencies

Full Changelog: cli/cli@v2.66.1...v2.67.0

v2.66.1: GitHub CLI 2.66.1

Compare Source

Hotfix: gh pr view fails with provided URL

This addresses a regression in gh pr view was reported in #​10352. This regression was due to a change in v2.66.0 that no longer allowed gh pr subcommands to execute properly outside of a git repo.

What's Changed

Full Changelog: cli/cli@v2.66.0...v2.66.1

v2.66.0: GitHub CLI 2.66.0

Compare Source

gh pr view and gh pr status now respect common triangular workflow configurations

Previously, gh pr view and gh pr status would fail for pull request's (PR) open in triangular workflows. This was due to gh being unable to identify the PR's corresponding remote and branch refs on GitHub.

Now, gh pr view and gh pr status should successfully identify the PR's refs when the following common git configurations are used:

Branch specific configuration, the former, supersedes repo specific configuration, the latter.

Additionally, if the @{push} revision syntax for git resolves for a branch, gh pr view and gh pr status should work regardless of additional config settings.

For more information, see

gh secret list, gh secret set, and gh secret delete now require repository selection when multiple git remotes are present

Previously, gh secret list, gh secret set, and gh secret delete would determine which remote to target for interacting with GitHub Actions secrets. Remotes marked as default using gh repo set-default or through other gh commands had higher priority when figuring out which repository to interact with. This could have unexpected outcomes when using gh secret commands with forked repositories as the upstream repository would generally be selected.

Now, gh secret commands require users to disambiguate which repository should be the target if multiple remotes are present and the -R, --repo flag is not provided.

For more information, see #​4688

Extension update notices now notify once every 24 hours per extension and can be disabled

Previously, the GitHub CLI would notify users about newer versions every time an extension was executed. This did not match GitHub CLI notices, which only notified users once every 24 hours and could be disabled through an environment variable.

Now, extension update notices will behave similar to GitHub CLI notices. To disable extension update notices, set the GH_NO_EXTENSION_UPDATE_NOTIFIER environment variable.

For more information, see #​9925

What's Changed

✨ Features
🐛 Fixes
📚 Docs & Chores
:dependabot: Dependencies

New Contributors

Big thank you to our many new and longtime contributors making this release happen!! ❤️ ✨

Full Changelog: cli/cli@v2.65.0...v2.66.0

v2.65.0: GitHub CLI 2.65.0

Compare Source

What's Changed

New Contributors

Full Changelog: cli/cli@v2.64.0...v2.65.0

v2.64.0: GitHub CLI 2.64.0

Compare Source

What's Changed

New Contributors

Full Changelog: cli/cli@v2.63.2...v2.64.0

v2.63.2: GitHub CLI 2.63.2

Compare Source

What's Changed

Full Changelog: cli/cli@v2.63.1...v2.63.2

v2.63.1: GitHub CLI 2.63.1

Compare Source

What's Changed

Security

  • A security vulnerability has been identified in GitHub CLI that could create or overwrite files in unintended directories when users download a malicious GitHub Actions workflow artifact through gh run download.

    For more information, see GHSA-2m9h-r57g-45pj

Full Changelog: cli/cli@v2.63.0...v2.63.1

v2.63.0: GitHub CLI 2.63.0

Compare Source

What's Changed

Full Changelog: cli/cli@v2.62.0...v2.63.0

Security

  • A security vulnerability has been identified in the GitHub CLI that could leak authentication tokens when cloning repositories containing git submodules hosted outside of GitHub.com and ghe.com.

    For more information, see GHSA-jwcm-9g39-pmcw

New Contributors


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 was generated by Mend Renovate. View the repository job log.

@renovate
Copy link
Contributor Author

renovate bot commented Nov 28, 2024

ℹ Artifact update notice

File name: go.mod

In order to perform the update(s) described in the table above, Renovate ran the go get command, which resulted in the following additional change(s):

  • 6 additional dependencies were updated
  • The go directive was updated for compatibility reasons

Details:

Package Change
go 1.22.5 -> 1.23.0
github.com/cli/go-gh/v2 v2.11.0 -> v2.11.2
github.com/mattn/go-colorable v0.1.13 -> v0.1.14
github.com/muesli/termenv v0.15.2 -> v0.15.3-0.20240618155329-98d742f6907a
golang.org/x/net v0.30.0 -> v0.34.0
golang.org/x/sys v0.26.0 -> v0.29.0
golang.org/x/term v0.25.0 -> v0.28.0

@renovate renovate bot changed the title fix(deps): update module github.com/cli/cli/v2 to v2.63.0 [security] fix(deps): update module github.com/cli/cli/v2 to v2.63.1 [security] Dec 4, 2024
@renovate renovate bot force-pushed the renovate/go-github.com-cli-cli-v2-vulnerability branch from d7006eb to 872c155 Compare December 4, 2024 16:09
@renovate renovate bot force-pushed the renovate/go-github.com-cli-cli-v2-vulnerability branch from 872c155 to b4b9d65 Compare January 18, 2025 00:31
@renovate renovate bot changed the title fix(deps): update module github.com/cli/cli/v2 to v2.63.1 [security] fix(deps): update module github.com/cli/cli/v2 to v2.67.0 [security] Feb 14, 2025
@renovate renovate bot force-pushed the renovate/go-github.com-cli-cli-v2-vulnerability branch from b4b9d65 to 32e4507 Compare February 14, 2025 18:12
@renovate renovate bot force-pushed the renovate/go-github.com-cli-cli-v2-vulnerability branch from 32e4507 to 5dcbdb7 Compare August 10, 2025 12:45
@renovate
Copy link
Contributor Author

renovate bot commented Dec 15, 2025

ℹ️ Artifact update notice

File name: go.mod

In order to perform the update(s) described in the table above, Renovate ran the go get command, which resulted in the following additional change(s):

  • 1 additional dependency was updated

Details:

Package Change
github.com/mattn/go-colorable v0.1.13 -> v0.1.14

@renovate renovate bot force-pushed the renovate/go-github.com-cli-cli-v2-vulnerability branch 2 times, most recently from fd364c6 to 72ec717 Compare December 18, 2025 11:03
@renovate renovate bot force-pushed the renovate/go-github.com-cli-cli-v2-vulnerability branch from 72ec717 to 996920c Compare December 18, 2025 11:04
@swfz swfz merged commit ca90ae3 into main Dec 19, 2025
2 checks passed
@swfz swfz deleted the renovate/go-github.com-cli-cli-v2-vulnerability branch December 19, 2025 09:59
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.

2 participants