Release notes

BUGFIX

Fix Four Security Vulnerabilities to Prevent Unexpected File Writes and Verification Bypasses

Downloading artifacts, installing skills, or verifying attestations is no longer vulnerable to malicious names, and upgrading to v2.102.0 as soon as possible is recommended. When the destination contains a symlink, gh release download, gh run download, gh repo read-file --output, and gh attestation download previously risked writing to unintended local files. gh attestation verify previously compared --source-ref case-insensitively and only matched the prefix of certificate identities for --signer-workflow, allowing branches differing only by case or another workflow with a matching path prefix in the same repository to pass verification. Interactive gh skill search lacked an option delimiter when passing paths to gh skill install, which allowed search results to inject installation options and alter file locations.

Original changelog

Original changelogFix Four Security Vulnerabilities to Prevent Unexpected File Writes and Verification Bypasses
## Security

Four security vulnerabilities have been identified, and fixed, in this release. Users are advised to update gh to version `v2.102.0` as soon as possible.

`gh release download`, `gh run download`, `gh repo read-file --output`, and `gh attestation download` could write remote content to an unintended local file when the destination contained symbolic links.

See https://github.com/cli/cli/security/advisories/GHSA-39wj-f2f4-978v for more information.

`gh attestation verify` compared the `--source-ref` value case-insensitively, so an attestation built from a branch whose name differs only in case could satisfy a policy that named a different branch.

See https://github.com/cli/cli/security/advisories/GHSA-4mq3-hpgx-9cx8 for more information.

Interactive `gh skill search` passed repository paths from search results to `gh skill install` without an option separator, so a search result could inject installer options and change where skill files were written.

See https://github.com/cli/cli/security/advisories/GHSA-qcwj-mr2r-2cx7 for more information.

`gh attestation verify` matched the `--signer-workflow` value against only the start of the signing certificate's identity, so an attestation signed by a different workflow in the pinned repository could pass verification when its path began with the pinned value.

See https://github.com/cli/cli/security/advisories/GHSA-wjmr-j3rp-mh2g for more information.