Skip to content

fix(deps): address Semgrep supply chain security findings#3927

Open
piotr-roslaniec wants to merge 3 commits intothreshold-network:mainfrom
tlabs-xyz:fix/semgrep-supply-chain
Open

fix(deps): address Semgrep supply chain security findings#3927
piotr-roslaniec wants to merge 3 commits intothreshold-network:mainfrom
tlabs-xyz:fix/semgrep-supply-chain

Conversation

@piotr-roslaniec
Copy link
Copy Markdown
Collaborator

Summary

Addresses 20 Semgrep supply chain findings in keep-core across Go modules and JavaScript lock files.

Go modules

Dependency Before After CVEs fixed
github.com/ethereum/go-ethereum v1.13.15 v1.17.2 CVE-2026-22862, CVE-2026-22868, CVE-2026-26314

Known limitations (require separate PRs):

  • btcd CVE-2024-38365: Upgrading btcd to v0.24.0+ requires removing the replace workaround that redirects btcd and btcd/v2 to compatible versions for transitive deps using the old btcec API. The existing replace => v0.22.3 predates the v0.23 rewrite where this bug was introduced.
  • tss-lib GHSA-h24c-6p6p-m3vx: Already mitigated — replace directive uses github.com/threshold-network/tss-lib fork instead of the vulnerable bnb-chain/tss-lib.

JavaScript

Package Fix CVEs/MALs
scrypt-shim@0.1.0 (ecdsa, random-beacon) Yarn resolution web3-eth-accounts@1.2.11 removes the dep MAL-2022-5972
get-func-name@2.0.0 npm override >=2.0.2 in ecdsa, solidity-v1, token-stakedrop CVE-2023-43646
http-cache-semantics@4.0.x npm override >=4.1.1 in dashboard, solidity-v1, token-stakedrop CVE-2022-25881
axios@0.21.2 (dashboard) Direct upgrade to ^1.8.2 CVE-2026-25639
terser@4.6.3 (dashboard) npm override >=4.8.1 CVE-2022-25858
decompress@4.2.0 (dashboard) npm override >=4.2.1 CVE-2020-12265
bsock@0.1.9 (token-stakedrop) Override >=0.1.10 for non-bundled; bundled copy inside bcoin fork cannot be overridden CVE-2023-50475

Test plan

  • Go build passes (go build ./...)
  • CI passes
  • Semgrep scan shows reduced findings

## Go modules
- Upgrade github.com/ethereum/go-ethereum v1.13.15 -> v1.17.2
  (fixes CVE-2026-22862, CVE-2026-22868, CVE-2026-26314)
- Note: btcd CVE-2024-38365 requires separate refactoring effort;
  the existing replace directive pins to v0.22.3 which predates the
  v0.23 rewrite where the bug was introduced
- Note: tss-lib is already replaced with threshold-network/tss-lib fork
  via replace directive (GHSA-h24c-6p6p-m3vx)

## JavaScript (yarn resolutions + npm overrides)
- solidity/ecdsa, solidity/random-beacon: add yarn resolution for
  web3-eth-accounts@1.2.11 to remove scrypt-shim (MAL-2022-5972),
  add npm override for get-func-name>=2.0.2 (CVE-2023-43646)
- solidity-v1/dashboard: upgrade axios ^0.21.2 -> ^1.8.2
  (CVE-2026-25639); add overrides for http-cache-semantics>=4.1.1
  (CVE-2022-25881), get-func-name>=2.0.2, terser>=4.8.1
  (CVE-2022-25858), decompress>=4.2.1 (CVE-2020-12265)
- solidity-v1: add overrides for http-cache-semantics>=4.1.1,
  get-func-name>=2.0.2
- token-stakedrop: add overrides for bsock>=0.1.10 (CVE-2023-50475),
  http-cache-semantics>=4.1.1, get-func-name>=2.0.2
  Note: bsock@0.1.9 inside bcoin's bundledDependencies cannot be
  overridden via npm overrides; requires updating the bcoin fork
Upgrading go-ethereum beyond v1.14 introduces c-kzg-4844/v2 which
requires CGO libraries not present in the Alpine Docker build image,
causing the linker to fail during `make generate`. Reverting to
v1.13.15 until the Dockerfile is updated to support the new deps.

CVE-2026-22862, CVE-2026-22868, CVE-2026-26314 (go-ethereum) are
tracked separately.
Replace malicious `scrypt-shim@github:web3-js/scrypt-shim` (MAL-2022-5972)
resolved from codeload.github.com with the npm security placeholder
`0.0.1-security` in solidity/ecdsa and solidity/random-beacon yarn.lock
files.

Restores lock files to main-branch state (valid npm registry references)
to fix the CI SSH auth failure caused by the previous regenerated lock
files containing git+ssh:// references to private repos.

Also removes the `resolutions: web3-eth-accounts` field from both
package.json files — it was not compatible with --frozen-lockfile CI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant