Skip to content

build(deps): Bump github.com/stretchr/testify from 1.11.1 to 1.12.1 - #1422

Closed
dependabot[bot] wants to merge 2 commits into
v1.7-devfrom
dependabot/go_modules/github.com/stretchr/testify-1.12.1
Closed

dependabot[bot] wants to merge 2 commits into
v1.7-devfrom
dependabot/go_modules/github.com/stretchr/testify-1.12.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Bumps github.com/stretchr/testify from 1.11.1 to 1.12.1.

Release notes

Sourced from github.com/stretchr/testify's releases.

v1.12.1

This is the first release which has the minimum dependencies practical in testify v1. The last remaining dependencies are github.com/stretchr/objx which itself has no dependencies, and go.yaml.in/yaml/v3. Removing objx would require v2, it cannot be vendored. Removing YAML would require vendoring the yaml library, which would do more harm than good. It's better to become aware of vulnerabilities in the official yaml package than to attempt to maintain our own.

What's Changed

New Contributors

Full Changelog: stretchr/testify@v1.12.0...v1.12.1

What's Changed

New Contributors

Full Changelog: stretchr/testify@v1.12.0...v1.12.1

v1.12.0

What's Changed

Functional Changes

Fixes

Documentation, Build & CI

... (truncated)

Commits
  • 959dbda Merge pull request #1935 from harryzcy/yaml-update
  • 9bb7176 Update go.yaml.in/yaml/v3 to v3.0.5
  • 001eb79 Merge pull request #1905 from Kentzo/patch-1
  • ad40f38 Merge pull request #1906 from stretchr/dependabot/github_actions/actions/chec...
  • 3bae017 build(deps): bump actions/checkout from 6.0.2 to 6.0.3
  • f8c01f3 mock: Mock.Return does not exist anymore
  • 12f8b56 Merge pull request #1563 from stretchr/make-AssertionFunc-types-aliases
  • a11649e assert: make *AssertionFunc type just aliases
  • dc20f41 Merge pull request #1890 from stretchr/dolmen/codegen-modernize
  • 098f8d7 _codegen: use strings.Builder
  • 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/stretchr/testify](https://github.com/stretchr/testify) from 1.11.1 to 1.12.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](stretchr/testify@v1.11.1...v1.12.1)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-version: 1.12.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot Bot added the dependencies Pull requests that update a dependency file label Aug 25, 2026
@dependabot dependabot Bot added the dependencies Pull requests that update a dependency file label Aug 25, 2026
@Claudius-Maginificent

Copy link
Copy Markdown
Collaborator

Dependency Security Audit — github.com/stretchr/testify 1.11.1 → 1.12.1

Verified upstream source directly, not merely scanner output. Nothing here was taken on trust.

Change Summary

Module From To Nature
github.com/stretchr/testify 1.11.1 1.12.1 Bug fixes + dependency elimination
github.com/stretchr/objx (indirect) 0.5.2 0.5.3 Tests/CI/docs only
go.yaml.in/yaml/v3 (indirect) 3.0.4 3.0.5 Comment reformat + retract directive
github.com/pmezard/go-difflib direct req. dropped Vendored into testify internal/difflib

Upstream diff: 58 files, +7813/-350 — of which ~7100 lines are the vendored copies of go-spew and go-difflib moved in-tree. Repo diff here is go.mod (7 lines) and go.sum (11 lines) — nothing else, confirmed against origin/v1.7-dev.

Diff Integrity

  • Checksums independently verified against the Go transparency log (sum.golang.org): the h1: and /go.mod hashes recorded in go.sum for testify 1.12.1, objx 0.5.3 and yaml v3.0.5 match the log entries byte-for-byte.
  • Vendored internal/spew byte-compared against github.com/davecgh/go-spew: common.go, format.go, spew.go identical; bypass.go/bypasssafe.go differ only by the addition of modern //go:build lines matching the pre-existing +build constraints — the unsafe reflection bypass is unchanged and remains disabled under safe/js/appengine tags; config.go/dump.go/doc.go differ only in doc-comment bullet formatting.
  • Vendored internal/difflib compared against pmezard/go-difflib@5d4384e (the exact revision previously pinned in go.mod): identical apart from doc reformatting and the removal of dead code (calculateRatio, NewMatcherWithJunk, context-diff support). Nothing added.
  • No lifecycle/install hooks introduced. The only new script, .ci.ghactions.sh, is a CI-only verifier that checks pinned GitHub Action SHAs against their tags. Release workflow moved from floating tags to pinned commit SHAs — a supply-chain improvement.
  • No new outbound network calls or credential access in library code. os/exec appears only in _codegen/ and _readme-gofmt/, which the Go toolchain excludes from the module build by the _ prefix; os.Getenv("GOPATH") likewise sits in _codegen.
  • Caveat, stated plainly: testify's release tags are lightweight (unannotated, unsigned) commit tags. Tag→commit binding therefore rests on the Go checksum database, not on maintainer signatures. That is upstream's posture, not a regression in this bump.

objx 0.5.3 contains zero production-code changes — it replaces testify assertions in its own tests with hand-rolled helpers and empties its go.sum. go.yaml.in/yaml/v3 3.0.5 has an empty non-comment diff in parserc.go/yamlh.go (a revert of an incorrect gofmt pass); the only functional change is a retract [v3.0.0, v3.0.1] directive. No YAML parser logic changed — relevant, since that is the one component here with untrusted-input exposure.

Known Vulnerabilities

Source testify objx go.yaml.in/yaml/v3
OSV.dev (all versions, not just current) none none none
GitHub Advisory DB (/advisories?ecosystem=go) [] [] []
govulncheck (this PR's CI job) SUCCESS — —

No CVEs, no advisories, no withdrawn releases. Both removed dependencies (go-spew 1.1.1, go-difflib 1.0.0) were likewise advisory-free, so dropping them is a surface reduction rather than a fix.

Behavioural Changes That Can Move Tests (not security)

  1. ComparisonAssertionFunc/ValueAssertionFunc/BoolAssertionFunc/ErrorAssertionFunc became type aliases — source-compatible, but explicit conversions now interconvert.
  2. suite.Run now fails suite methods with invalid signatures instead of silently skipping them.
  3. mock.AssertExpectationsForObjects now calls t.Errorf on a wrong-typed object instead of logging a deprecation notice.
  4. Failure-message truncation budget halved (bufio.MaxScanTokenSize/2 - 100); several messages switched %q→%#v or gained type information.
  5. suite stats now start before SetupTest (fixes a panic when SetupTest skips).

None of these alter comparison semantics: assert/assertion_compare.go — which implements Greater and friends — is byte-identical between v1.11.1 and v1.12.1.

CI Failure Assessment — tests (01)

Not caused by this bump. Evidence:

  • The failing assertion, internal/consensus/load_progress_test.go:116, compares two runtime-measured floats: charged work (137) against budgetAllowance(rate, elapsed) where elapsed is wall-clock time (floodHarnessArgs{wallClock: true}). The test's own doc comment concedes it measures "against whatever machine it runs on".
  • testify's comparison code did not change (see above), so Greater cannot have moved the threshold.
  • Two sibling dependabot PRs branched from the same base commit failed the same CI day on different members of the same load-test family: golang.org/x/net (run 33633800680) on TestLoadRouterSharedQueueOccupancyAndDrops, golang.org/x/crypto (run 33633798919) on TestAllowVoteChannelMessage_ChargesVerificationCost. Neither dependency touches consensus.
  • This same PR's earlier run (32872790235) failed on an unrelated test, TestReactorValidatorSetChanges, since fixed by fix(consensus): bound catch-up block-part resends and restore round timeouts in reactor test #1418. A dependency-induced regression does not wander between tests.

Conclusion: contended CI runners tripping wall-clock thresholds. Separately worth addressing — the Load* budget suite is a standing flake generator that will keep reddening unrelated dependency PRs.

Finding — SEC-001 (MEDIUM, pre-existing, non-blocking)

types/test_util.go:7-9 imports testing and github.com/stretchr/testify/require from the production package github.com/dashpay/tenderdash/types, with no build tag. Consequence: go list -deps ./cmd/tenderdash resolves testify/assert, testify/require, testify/internal/spew and testify/internal/difflib into the node binary's build graph — including spew's unsafe-based reflection bypass. internal/test/factory and internal/p2p/p2ptest do the same.

This predates the PR and does not block it, but it means a test-assertion library sits inside the trusted computing base of a validator binary rather than inside the test build. (Whether individual symbols survive linker dead-code elimination was not verifiable here — the CGO dashbls toolchain is unavailable in this environment — but the compile-time dependency is certain.)

Remediation for a follow-up: move MustVoteExtensionsFromProto and peers into an export_test.go/types_test package, or gate the file behind a build tag.

likelihood: 0.2, impact: 0.7, relevance: 0.1 → MEDIUM, merge_class: out_of_scope_follow_up.

Verdict

Safe. Diff integrity clean and independently checksum-verified, no advisories against any module involved, no new attack surface — the update removes two external dependencies and pins its own CI actions by SHA. The tests (01) red is environmental, not caused by this bump.

Recommendation: merge once CI is green. Requesting a rebase to give the load suite a less contended runner.

🤖 Co-authored by Claudius the Magnificent AI Agent

@Claudius-Maginificent

Copy link
Copy Markdown
Collaborator

@dependabot rebase

@dependabot @github

dependabot Bot commented on behalf of github Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Sorry, only users with push access can use that command.

@lklimek

lklimek commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

@dependabot recreate

@dependabot @github

dependabot Bot commented on behalf of github Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Looks like github.com/stretchr/testify is up-to-date now, so this is no longer needed.

@dependabot dependabot Bot closed this Sep 3, 2026
@dependabot
dependabot Bot deleted the dependabot/go_modules/github.com/stretchr/testify-1.12.1 branch September 3, 2026 07:05
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants