fix(deps): update module github.com/cli/cli/v2 to v2.67.0 [security] #78
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v2.62.0->v2.67.0GitHub 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
gitsubmodules hosted outside of GitHub.com and ghe.com.Details
This vulnerability stems from several
ghcommands used to clone a repository with submodules from a non-GitHub host includinggh repo clone,gh repo fork,gh pr checkout. These GitHub CLI commands invokegitwith instructions to retrieve authentication tokens using thecredential.helperconfiguration 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_TOKENGH_ENTERPRISE_TOKENGITHUB_TOKENwhenCODESPACESenvironment variable is setThe result being
gitsending authentication tokens when cloning submodules.In
2.63.0, these GitHub CLI commands will limit the hosts for whichghacts as a credential helper to source authentication tokens. Additionally,GITHUB_TOKENwill 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
ghto2.63.0CVE-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 usinggh run download. The artifact name and--dirflag 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--dirflag value.In
2.63.1,gh run downloadwill not download artifacts named..and.and instead exit with the following error message:Impact
Successful exploitation heightens the risk of local path traversal attack vectors exactly 1 directory higher than intended.
Remediation and Mitigation
ghto2.63.1.., 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 defaulthttps://slsa.dev/provenance/v1if 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
ghto versionv2.67.0as 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 verifycommand, 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
nilinstead of an error, causing the program to exit with a status code of0, which incorrectly suggests successful verification.PoC
Run
gh attestation verifywith local attestations using the--bundleflag and specify a predicate type with--predicate-typethat 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 verifymay 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.0Compare Source
Security
A bug in
gh attestation verifymay return an incorrect zero exit status when no matching attestations are found for the specified--predicate-type <value>or the defaulthttps://slsa.dev/provenance/v1if 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.0as soon as possible.For more information, see GHSA-fgw4-v983-mgp8
gh pr checkoutnow supports interactively selecting a pull requestSimilar to commands like
gh workflow runwhich prompts for a workflow to run, nowgh pr checkoutwill 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.mdguidelines to give more clarity around oldhelp wantedissues.TLDR:
@cli/code-reviewerswhen an issue you want to work on does not have clear Acceptance CriteriaNote: 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
gh repo renameis used with a new repo name that contains an owner by @timrogers in #10364iterationIdfield in ProjectV2ItemFieldIterationValue by @iamazeem in #10329🐛 Fixes
--slurpflag by @iamazeem in #10332--refflag by @iamazeem in #10328📚 Docs & Chores
help wantedissues and pull requests by @BagToad in #10381gh pr checksin theLongsection by @iamazeem in #10389Full Changelog: cli/cli@v2.66.1...v2.67.0
v2.66.1: GitHub CLI 2.66.1Compare Source
Hotfix:
gh pr viewfails with provided URLThis addresses a regression in
gh pr viewwas reported in #10352. This regression was due to a change inv2.66.0that no longer allowedgh prsubcommands to execute properly outside of a git repo.What's Changed
gh pr viewfails with provided URL by @jtmcg in #10354Full Changelog: cli/cli@v2.66.0...v2.66.1
v2.66.0: GitHub CLI 2.66.0Compare Source
gh pr viewandgh pr statusnow respect common triangular workflow configurationsPreviously,
gh pr viewandgh pr statuswould fail for pull request's (PR) open in triangular workflows. This was due toghbeing unable to identify the PR's corresponding remote and branch refs on GitHub.Now,
gh pr viewandgh pr statusshould successfully identify the PR's refs when the following common git configurations are used:branch.<branchName>.pushremoteis setremote.pushDefaultis setBranch specific configuration, the former, supersedes repo specific configuration, the latter.
Additionally, if the
@{push}revision syntax for git resolves for a branch,gh pr viewandgh pr statusshould work regardless of additional config settings.For more information, see
gh secret list,gh secret set, andgh secret deletenow require repository selection when multiplegitremotes are presentPreviously,
gh secret list,gh secret set, andgh secret deletewould determine which remote to target for interacting with GitHub Actions secrets. Remotes marked as default usinggh repo set-defaultor through otherghcommands had higher priority when figuring out which repository to interact with. This could have unexpected outcomes when usinggh secretcommands with forked repositories as the upstream repository would generally be selected.Now,
gh secretcommands require users to disambiguate which repository should be the target if multiple remotes are present and the-R, --repoflag 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_NOTIFIERenvironment variable.For more information, see #9925
What's Changed
✨ Features
gh attestationattestation bundle fetching logic by @malancas in #10185gh attestation verifytable output by @malancas in #10104@{push}by @Frederick888 in #9208gh attestationbundle fetching logic by @malancas in #10339🐛 Fixes
gh gist viewandgh gist editprompts with no TTY by @mateusmarquezini in #10048ReadBranchConfigandprSelectorForCurrentBranchby @jtmcg in #10197--workflowflag by @iamazeem in #10323📚 Docs & Chores
gh issue createby @andyfeller in #10208gh attestation verifyintegration tests by @malancas in #10102New 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.0Compare Source
What's Changed
gh pr createby @cmbrose in #10177New Contributors
Full Changelog: cli/cli@v2.64.0...v2.65.0
v2.64.0: GitHub CLI 2.64.0Compare Source
What's Changed
gh attestation verifywhen thebundle-from-ociflag is specified by @malancas in #10020gh repo renamehelp text clarifies new repo name should not include owner by @BagToad in #10044gh runandgh codespaceby @uday-rana in #10043gh pr merge --delete-branchexits with error when merge requested via merge queue by @BagToad in #10074gh at inspectimprovements by @phillmv in #9954pr viewfor intra-org forks by @williammartin in #10078gh attestation downloadby @malancas in #10051gh attestation verifypolicy options configuration in thenewEnforcementCriteria()function by @malancas in #10012New Contributors
Full Changelog: cli/cli@v2.63.2...v2.64.0
v2.63.2: GitHub CLI 2.63.2Compare Source
What's Changed
Full Changelog: cli/cli@v2.63.1...v2.63.2
v2.63.1: GitHub CLI 2.63.1Compare Source
What's Changed
git/client_test.gocomments for linter by @BagToad in #9969gh repo fork, log the change by @timrogers in #9983Security
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.0Compare Source
What's Changed
getAttestationsfunctions by @malancas in #9892baseRefOidinpr viewby @daliusd in #9938heredocstrings by @BagToad in #9948release createfails due to missingworkflowOAuth scope by @BagToad in #9791Full 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.
This PR was generated by Mend Renovate. View the repository job log.