Skip to content

Conversation

jose-blockchain
Copy link

@jose-blockchain jose-blockchain commented Aug 12, 2025

Vuln Scan Fixes: Closes #3828

All Critical, High and Medium if possible.

@jose-blockchain
Copy link
Author

ALL CRITICAL, HIGH AND MEDIUM SOLVED!
Needs CI Checks that are disabled due to inactive repo.

  Add workaround flag to main build and abigen commands to bypass
  runtime.stopTheWorld restrictions in github.com/fjl/memsize package.
  Run make generate before go vet and staticcheck to ensure
  generated contract bindings exist before static analysis.
The client-vet and client-lint jobs should use committed generated
contract files rather than attempting to regenerate them, which fails
due to missing contract artifacts in CI environment.

Restores pkg/chain/ethereum/threshold/gen/ files that were
accidentally modified during troubleshooting.
The pkg/chain/ethereum/threshold/gen/_address/TokenStaking file was
accidentally deleted in ba7a578, causing CI failures. This empty
placeholder file is required for //go:embed directive and was
intentionally committed in 437c060 to fix the same issue.
Add explanatory comments to gen.go files and .gitignore to document
why empty _address files are committed despite being gitignored.
This prevents future confusion about the CI build requirements.
The abi/TokenStaking.go, cmd/TokenStaking.go, and contract/TokenStaking.go
files were accidentally deleted in ba7a578 when adding the
-checklinkname=0 flag. These generated files are committed to the
repository and should not have been removed.
piotr-roslaniec
piotr-roslaniec previously approved these changes Oct 8, 2025
… module management

Address CodeRabbit finding by removing manual 'go get' commands from Dockerfile
that bypass Go module dependency resolution. This eliminates version inconsistencies
and makes dependency management transparent and reproducible.

Changes:
- Remove RUN go get command from Dockerfile (lines 57-58)
- Add tools.go with build-time dependencies for Ethereum bindings generation
- Update go.mod and go.sum with proper transitive dependencies
- Ensure all ethereum/go-ethereum submodule dependencies are tracked
- Rely on existing 'go mod download' at line 37 for dependency fetching

Dependencies properly managed:
- github.com/ferranbt/fastssz (ethereum/go-ethereum/internal/era)
- github.com/graph-gophers/graphql-go (ethereum/go-ethereum/graphql)
- github.com/influxdata/influxdb-client-go/v2 (ethereum/go-ethereum/metrics)
- github.com/influxdata/influxdb1-client (ethereum/go-ethereum/metrics)
- github.com/peterh/liner (ethereum/go-ethereum/console/prompt)

This ensures module-aware builds work correctly without anti-patterns while
maintaining all required functionality for Ethereum contract generation.

Resolves: CodeRabbit dependency management anti-pattern finding
@piotr-roslaniec
Copy link

@jose-blockchain Please take a look and merge at will

@piotr-roslaniec piotr-roslaniec changed the base branch from main to release/v2.2.0-prep October 9, 2025 10:28
@piotr-roslaniec piotr-roslaniec merged commit b2c82c8 into threshold-network:release/v2.2.0-prep Oct 9, 2025
15 checks passed
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.

bug: Upgrade Dependencies to Resolve Vulnerabilities
2 participants