Repository navigation
Highlights & Upgrade Notes
Breaking & Behavior Changes
- Go 1.27 minimum (up from Go 1.25.0).
- ECDSA key scheme derived from curve (#827):
KeyFromPublicKeynow assignsecdsa-sha2-nistp384to 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 theKeyFromPublicKeydocumentation). Signrejects unverifiable signatures and replaces duplicates (#828):Signverifies the signature it produces before storing it. RSA signers using PKCS #1 v1.5 (such as Sigstore's defaultsignature.LoadSigneron RSA keys) are now rejected instead of writing an unusable signature for anrsassa-pss-sha256key; usesignature.LoadRSAPSSSignerinstead. Re-signing with the same key replaces the existing signature in place.- Stricter parse-time metadata validation (#743, #819, #833, #839):
FromBytesandUnmarshalJSONnow reject malformed or non-1.xspec_versionvalues,version < 1,rootmetadata missing any of the four required top-level roles (root,snapshot,timestamp,targets), duplicate delegated role names, delegated roles specifying bothpathsandpath_hash_prefixes, andnullmap entries. Parse and validation errors fromFromBytesare classified asmetadata.ErrDeserialization(a subset ofErrRepositorythat unwraps the underlying error), soUpdaterclients automatically re-fetch valid replacement metadata if a previously cached local file fails these checks. - Hex
path_hash_prefixesand POSIX delegation globs (#783, #753, #820):path_hash_prefixesnow matches hex-encoded SHA-256 digests per the TUF specification instead of base64. Delegation path patterns use OS-independent POSIXpath.Matchand surfacepath.ErrBadPatternwhen no other pattern on the role matches.
Security & Reliability Fixes
- Verify cached delegated targets metadata against each delegating parent role (GHSA-p9vg-j8w2-32cq, #822).
- Match JSON field names case-sensitively so case-variant keys remain in
UnrecognizedFields(GHSA-x8f5-9qx3-7q7m, #821). - Reject wrong-length Ed25519 public keys without panicking (#739), guard against
nullJSON pointer dereferences (#743, #749), boundspec_versionsplitting (#839), and usehmac.Equalfor digest comparisons (#742).
New Features & Client Improvements
- TUF specification v1.0.37 (#826, #831):
SPECIFICATION_VERSIONis bumped to1.0.37; target lookup skips a delegated role only if it is already on the current delegation path, re-visiting and verifying shared roles reached via other paths. - Post-quantum ML-DSA support (TAP 21) (#780): support for
ml-dsakeys (ml-dsa-44/1,ml-dsa-65/1,ml-dsa-87/1). - Client, fetcher, and
multirepoimprovements:Updater.GetTopLevelTargetsreturns an empty map before refresh instead of panicking (#832);MultiRepoClient.Refreshrefreshes all repositories in deterministic order and joins errors (#800);MultiRepoClientvalidatesmap.jsonup front and exposesErrMissingRepoURL,ErrUnknownMappingRepo, andErrMissingTrustedRoot(#750, #760);DefaultFetcher.SetTransportandNewFetcherWithRoundTripperno longer mutatehttp.DefaultClient(#802); deterministic target hash-prefix selection (#772);TargetsType.AddKeyrejects unconfigured delegated roles (#788); external signer and PEM key documentation and examples (#825).
What's Changed
- chore(deps): bump github.com/sigstore/sigstore from 1.10.6 to 1.10.8 by @dependabot[bot] in #735
- Replace copyMapValues with maps.Copy from stdlib by @udf2457 in #740
- Consider upating GitHub Actions dependencies to latest versions by @udf2457 in #751
- Improve performance of VerifyDelegate, regenerate test data by @Hayden-IO in #757
- chore(deps): bump golang.org/x/crypto from 0.50.0 to 0.52.0 by @dependabot[bot] in #754
- fix(metadata): reject ed25519 public keys with invalid length by @kanywst in #739
- Nil dereference on JSON null by @udf2457 in #749
- Idiomatic Go modernization by @udf2457 in #741
- Refactor hash verification to use hmac.Equal by @udf2457 in #742
- Ensure repository URL exists before initialization by @udf2457 in #750
- Update actions dependencies via dependabot by @kommendorkapten in #752
- chore(deps): bump golangci/golangci-lint-action from 7.0.0 to 9.3.0 by @dependabot[bot] in #762
- chore(deps): bump github.com/sigstore/sigstore from 1.10.8 to 1.10.9 by @dependabot[bot] in #761
- chore(deps): bump golang/govulncheck-action from 1.0.2 to 1.1.0 by @dependabot[bot] in #763
- chore(deps): bump actions/checkout from 4.1.1 to 7.0.1 by @dependabot[bot] in #764
- chore(deps): bump actions/setup-go from 5.0.0 to 7.0.0 by @dependabot[bot] in #766
- chore(deps): bump github/codeql-action/init from 3.24.5 to 4.37.6 by @dependabot[bot] in #768
- chore(deps): bump github/codeql-action/autobuild from 3.24.5 to 4.37.6 by @dependabot[bot] in #767
- chore(deps): bump github/codeql-action/analyze from 3.24.5 to 4.37.6 by @dependabot[bot] in #765
- ci: group Dependabot GitHub Actions updates into a single PR by @rdimitrov in #769
- ci: disable golangci-lint config schema verification by @rdimitrov in #770
- Validate the multi-repo map file before initializing any client by @rdimitrov in #760
- chore(deps): bump github.com/stretchr/testify from 1.11.1 to 1.12.0 by @dependabot[bot] in #773
- chore(deps): bump the github-actions group with 3 updates by @dependabot[bot] in #774
- ci: bump golangci-lint to v2.13.1 for Go 1.27 support by @rdimitrov in #775
- chore(deps): bump the github-actions group across 1 directory with 3 updates by @dependabot[bot] in #778
- Surface invalid delegation path patterns and match OS-independently by @arpitjain099 in #753
- chore(deps): bump the github-actions group across 1 directory with 3 updates by @dependabot[bot] in #779
- chore(deps): bump github.com/stretchr/testify from 1.12.0 to 1.12.1 by @dependabot[bot] in #777
- chore(deps): bump github.com/secure-systems-lab/go-securesystemslib from 0.11.0 to 0.11.1 by @dependabot[bot] in #776
- Select the target hash prefix deterministically in DownloadTarget by @rdimitrov in #772
- Add support for ML-DSA (TAP 21) by @jku in #780
- chore(deps): bump the github-actions group with 3 updates by @dependabot[bot] in #782
- metadata: correctly match
path_hash_prefixesdelegations by @cyphar in #783 - Nil-pointer panic: mapping can reference repos not in Repositories by @udf2457 in #743
- test: assert NewConfig rejects repositories without trusted root metadata by @rdimitrov in #784
- Add TUF conformance workflow by @kipz in #789
- Add OSS Scanner audit configuration by @rdimitrov in #791
- chore(deps): bump the github-actions group across 1 directory with 4 updates by @dependabot[bot] in #787
- chore(deps): bump github.com/sigstore/sigstore from 1.10.10 to 1.11.0 by @dependabot[bot] in #786
- test: make network fetcher tests opt-in by @rdimitrov in #793
- docs: fix broken example on examples/cli/tuf-client/README.md by @KAWAHARA-souta in #790
- chore: bump sigstore to v1.11.1 and drop go patch version by @rdimitrov in #797
- chore(deps): bump the github-actions group across 1 directory with 3 updates by @dependabot[bot] in #798
- chore(deps): bump the github-actions group with 3 updates by @dependabot[bot] in #801
- chore(deps): bump github.com/sigstore/sigstore from 1.11.1 to 1.11.2 by @dependabot[bot] in #807
- chore(deps): bump the github-actions group with 3 updates by @dependabot[bot] in #803
- chore(deps): bump the github-actions group with 3 updates by @dependabot[bot] in #817
- chore(deps): bump github.com/sigstore/sigstore from 1.11.2 to 1.11.3 by @dependabot[bot] in #816
- fix(metadata): match field names case-sensitively by @rdimitrov in #821
- metadata: keep matching paths after an invalid pattern by @rdimitrov in #820
- updater: verify a cached role for each delegator by @rdimitrov in #822
- fix(metadata)!: reject delegated roles with both paths and path_hash_prefixes by @rdimitrov in #819
- docs: show signing with external signers and keys from PEM files by @rdimitrov in #825
- fix(metadata)!: derive the ECDSA key scheme from the curve by @rdimitrov in #827
- fix(metadata): keep Sign from writing signatures that cannot be used by @rdimitrov in #828
- ci: restore the specification version check and bump the supported version to 1.0.36 by @rdimitrov in #826
- Finish the testing rework (#695 follow-up) by @rdimitrov in #734
- fetcher: do not set the transport on the shared http.DefaultClient by @arpitjain099 in #802
- metadata: reject AddKey when no delegated role is configured by @Rohilalala in #788
- multirepo: refresh every repository even when one fails by @Anandb71 in #800
- fix(simulator): use URL path separators for cross-platform target routing by @Amankumar-10012004 in #815
- Fix typos in README and updater comment by @Adham-Kiwan in #834
- updater: skip a delegated role only if it is on the current delegation path by @NopeCharon in #831
- updater: return no top-level targets before a refresh instead of panicking by @rdimitrov in #832
- fix(metadata)!: validate spec_version, version, root roles and delegated role names on parse by @rdimitrov in #833
- chore(deps): bump the github-actions group with 4 updates by @dependabot[bot] in #836
- fix(metadata): bound spec_version split and classify parse errors as ErrDeserialization by @rdimitrov in #839
New Contributors
- @kanywst made their first contribution in #739
- @arpitjain099 made their first contribution in #753
- @jku made their first contribution in #780
- @cyphar made their first contribution in #783
- @KAWAHARA-souta made their first contribution in #790
- @Rohilalala made their first contribution in #788
- @Anandb71 made their first contribution in #800
- @Amankumar-10012004 made their first contribution in #815
- @Adham-Kiwan made their first contribution in #834
Full Changelog: v2.4.2...v2.5.0