Skip to content

chore(deps): Bump github.com/theupdateframework/go-tuf/v2 from 2.4.2 to 2.6.0 - #15205

Merged
BagToad merged 1 commit into
trunkfrom
dependabot/go_modules/github.com/theupdateframework/go-tuf/v2-2.6.0
Dec 1, 2026
Merged

BagToad merged 1 commit into
trunkfrom
dependabot/go_modules/github.com/theupdateframework/go-tuf/v2-2.6.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Dec 1, 2026

Copy link
Copy Markdown
Contributor

Bumps github.com/theupdateframework/go-tuf/v2 from 2.4.2 to 2.6.0.

Release notes

Sourced from github.com/theupdateframework/go-tuf/v2's releases.

v2.6.0

Highlights & Upgrade Notes

Security & Reliability Fixes

  • Reject empty and reserved top-level delegated role names (GHSA-h95j-g597-frvp, theupdateframework/go-tuf@04f3122): DelegatedRole.UnmarshalJSON, Metadata.VerifyDelegate, TargetsType.AddKey, TrustedMetadata.UpdateDelegatedTargets, and Updater now reject empty delegated role names and names matching any top-level role (root, snapshot, timestamp, targets), including case-folded variants, preventing delegated metadata from overwriting cached top-level files and bypassing rollback checks or breaking subsequent root.json loads. Metadata.VerifyDelegate also enforces SuccinctRoles.IsDelegatedRole (with canonical lowercase hex bin suffixes) when succinct_roles is configured, and metadata.ValidateDelegatedRoleName is exported for callers constructing delegations in memory.
  • Read cached delegated metadata from the escaped cache path (theupdateframework/go-tuf#810): Updater now reads cached delegated metadata through the same url.PathEscape(roleName) + ".json" path written by persistMetadata, keeping delegated role reads confined to LocalMetadataDir and aligned with persisted filenames.
  • Reject duplicate signature keyids in VerifyDelegate (theupdateframework/go-tuf#748): Metadata.VerifyDelegate now rejects delegated metadata with duplicate signature keyids (matching FromBytes), guards against typed-nil metadata pointers, and stops scanning Signatures on the first keyid match.
  • OS-independent target URL and multirepo path handling (theupdateframework/go-tuf#795, theupdateframework/go-tuf#841): MultiRepoClient matches map.json path patterns with POSIX path.Match rather than filepath.Match, and Updater.DownloadTargetContext splits hash-prefixed target URLs on "/" rather than filepath.Base so \ and : behave identically on Windows and POSIX.
  • Preserve retry options in custom DefaultFetcher constructors (theupdateframework/go-tuf#842): NewFetcherWithHTTPClient and NewFetcherWithRoundTripper now clone the receiver's configured retry options and User-Agent (or default to backoff.WithMaxTries(1)), avoiding unintended 15-minute exponential backoff loops on expected HTTP 404s during root rotation.

New Features & Client Improvements

  • Context cancellation across fetcher and updater (theupdateframework/go-tuf#837, theupdateframework/go-tuf#804): added fetcher.ContextFetcher (DefaultFetcher.DownloadFileContext) alongside updater.NewContext, Updater.RefreshContext, Updater.GetTargetInfoContext, and Updater.DownloadTargetContext so callers can enforce deadlines and cancel hanging mirror requests cleanly.
  • Pluggable metadata persistence (config.MetadataStore) (theupdateframework/go-tuf#804): UpdaterConfig.MetadataStore (Load(ctx, role) / Persist(ctx, role, data)) allows applications to replace the default filesystem metadata cache with encrypted, database, or transactional storage while preserving root rotations across restarts and failing closed on storage read/write errors.
  • Whole-second UTC expires normalization in constructors (theupdateframework/go-tuf#736): metadata.Root, Snapshot, Timestamp, and Targets normalize initial Expires timestamps to whole-second UTC (YYYY-MM-DDTHH:MM:SSZ) per TUF §4.2.1 for interoperability with strict clients such as python-tuf, while keeping FromBytes and MarshalJSON byte-preserving so existing metadata signed with fractional seconds continues to verify unchanged.

What's Changed

New Contributors

Full Changelog: theupdateframework/go-tuf@v2.5.0...v2.6.0

v2.5.0

Highlights & Upgrade Notes

Breaking & Behavior Changes

  • Go 1.27 minimum (up from Go 1.25.0).
  • ECDSA key scheme derived from curve (theupdateframework/go-tuf#827): KeyFromPublicKey now assigns ecdsa-sha2-nistp384 to P-384 keys (changing their canonical key ID and requiring SHA-384 signatures) and rejects curves other than P-256 and P-384. Existing metadata signed under the legacy scheme still verifies; repositories rotating a P-384 root key must include a SHA-256 signature under the old key ID alongside the new signature so clients on the previous root can verify the transition (see the KeyFromPublicKey documentation).
  • Sign rejects unverifiable signatures and replaces duplicates (theupdateframework/go-tuf#828): Sign verifies the signature it produces before storing it. RSA signers using PKCS #1 v1.5 (such as Sigstore's default signature.LoadSigner on RSA keys) are now rejected instead of writing an unusable signature for an rsassa-pss-sha256 key; use signature.LoadRSAPSSSigner instead. Re-signing with the same key replaces the existing signature in place.
  • Stricter parse-time metadata validation (theupdateframework/go-tuf#743, theupdateframework/go-tuf#819, theupdateframework/go-tuf#833, theupdateframework/go-tuf#839): FromBytes and UnmarshalJSON now reject malformed or non-1.x spec_version values, version < 1, root metadata missing any of the four required top-level roles (root, snapshot, timestamp, targets), duplicate delegated role names, delegated roles specifying both paths and path_hash_prefixes, and null map entries. Parse and validation errors from FromBytes are classified as metadata.ErrDeserialization (a subset of ErrRepository that unwraps the underlying error), so Updater clients automatically re-fetch valid replacement metadata if a previously cached local file fails these checks.
  • Hex path_hash_prefixes and POSIX delegation globs (theupdateframework/go-tuf#783, theupdateframework/go-tuf#753, theupdateframework/go-tuf#820): path_hash_prefixes now matches hex-encoded SHA-256 digests per the TUF specification instead of base64. Delegation path patterns use OS-independent POSIX path.Match and surface path.ErrBadPattern when no other pattern on the role matches.

... (truncated)

Commits
  • 04f3122 Merge commit from fork
  • ad764cc fetcher: inherit or default retry options in custom-client constructors (#842)
  • d85413e Allow caller-provided metadata persistence (#804)
  • 74f563a fix(metadata): reject duplicate signature key IDs in VerifyDelegate (#748)
  • 923b475 Format expires with second precision per TUF spec (#736)
  • b6df315 fix(updater): split hash-prefixed target URLs on '/' instead of filepath.Base...
  • 5ad2b62 metadata: match multirepo map.json path patterns OS-independently (#795)
  • be5fc82 test: cover refresh server errors, rejected metadata and the old root thresho...
  • eef475d fix(updater): read delegated metadata from the escaped cache path (#810)
  • 6ea6d2a fetcher, updater: honour a caller's context so a hanging mirror can be cancel...
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [github.com/theupdateframework/go-tuf/v2](https://github.com/theupdateframework/go-tuf) from 2.4.2 to 2.6.0.
- [Release notes](https://github.com/theupdateframework/go-tuf/releases)
- [Commits](theupdateframework/go-tuf@v2.4.2...v2.6.0)

---
updated-dependencies:
- dependency-name: github.com/theupdateframework/go-tuf/v2
  dependency-version: 2.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot requested a review from a team as a code owner December 1, 2026 14:31
@dependabot
dependabot Bot requested a review from tidy-dev December 1, 2026 14:31
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Dec 1, 2026
Copilot AI balanced review requested due to automatic review settings December 1, 2026 14:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Changes to TUF validation and persistence require maintainer or CI validation of compatibility with sigstore-go v1.4.1 and cached trust metadata because upstream source and dependencies are unavailable here.

No open issues 🎉

What changed in this PR

Updates GitHub CLI’s go-tuf/v2 dependency from 2.4.2 to 2.6.0, incorporating upstream security, reliability, and metadata-validation improvements.

Changes:

  • Bumps the direct dependency to v2.6.0.
  • Replaces module checksums to match the new version.
File Description
go.sum Updates the dependency’s module and go.mod checksums.
go.mod Requires go-tuf/v2 v2.6.0 instead of v2.4.2.

Review effort: Balanced

@cli-triage

cli-triage Bot commented Dec 1, 2026

Copy link
Copy Markdown

Recommendation: Review before merging, Confidence: Medium

The upstream changes in the first release tighten metadata parsing and fix cached delegated-role verification in 53c7cf4, while the follow-up release adds further delegated-role and cache-path protections; these are consistent with a feature-bearing update rather than a narrow patch. The fixes for GHSA-p9vg-j8w2-32cq, GHSA-x8f5-9qx3-7q7m, and GHSA-h95j-g597-frvp are plausibly reachable because the affected metadata, fetcher, trusted-metadata, and updater packages are compiled into gh and used by attestation verification. The PR diff was unavailable through the read path, so I could not verify its exact repository edits or generated-file coherence; that missing required evidence caps confidence and warrants a maintainer diff check before merging.

Assessed at head commit 0a8c297bfdca9f971f05decb0fbb67bacb08c559.

Generated by Dependabot PR Triage (skills-driven) · copilot · gpt56 · ~47 AIC · ⌖ ~5 AIC · ⊞ 18.5K · ◷

@BagToad
BagToad merged commit 88e8d7a into trunk Dec 1, 2026
31 checks passed
@BagToad
BagToad deleted the dependabot/go_modules/github.com/theupdateframework/go-tuf/v2-2.6.0 branch December 1, 2026 19:36
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 go Pull requests that update Go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants