Skip to content

feat(lint): add reentrancy-eth lint#14970

Merged
mattsse merged 2 commits into
masterfrom
codex/reentrancy-eth-lint
May 29, 2026
Merged

feat(lint): add reentrancy-eth lint#14970
mattsse merged 2 commits into
masterfrom
codex/reentrancy-eth-lint

Conversation

@figtracer
Copy link
Copy Markdown
Collaborator

@figtracer figtracer commented May 29, 2026

Summary

  • rename the existing reentrancy-unlimited-gas lint surface to reentrancy-eth
  • keep the detector focused on uncapped ETH-transferring low-level calls where state read before the call is written after it
  • ignore zero-value calls backed by literal zero or constant-zero values
  • update lint docs, README entry, and UI fixtures for the new lint ID/help URL

Testing

  • cargo fmt --check
  • cargo test -p forge --test ui ReentrancyEth
  • cargo test -p forge-lint sol::tests::registered_lints_have_docs
  • git diff --check

@figtracer figtracer changed the title feat(lint): add reentrancy-eth lint feat(lint): add reentrancy-eth lint May 29, 2026
@figtracer figtracer force-pushed the codex/reentrancy-eth-lint branch 2 times, most recently from d1513c2 to 8c6038a Compare May 29, 2026 12:44
Copy link
Copy Markdown
Collaborator

@mablr mablr left a comment

Choose a reason for hiding this comment

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

Some clanker findings, reproduced locally

Comment thread crates/lint/src/sol/high/reentrancy.rs Outdated
Comment thread crates/lint/src/sol/high/reentrancy.rs
@figtracer figtracer force-pushed the codex/reentrancy-eth-lint branch from 8c6038a to b6a292f Compare May 29, 2026 13:27
@figtracer figtracer force-pushed the codex/reentrancy-eth-lint branch from b6a292f to 0c38b7e Compare May 29, 2026 13:51
Copy link
Copy Markdown
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

One small cleanup from re-checking the latest head.

Comment thread crates/lint/testdata/ReentrancyEth.stderr
mattsse
mattsse previously approved these changes May 29, 2026
@figtracer figtracer requested review from mablr and mattsse May 29, 2026 14:09
@figtracer figtracer enabled auto-merge (squash) May 29, 2026 14:10
@figtracer figtracer force-pushed the codex/reentrancy-eth-lint branch from 3e460e5 to 2d8d328 Compare May 29, 2026 14:15
@mattsse mattsse disabled auto-merge May 29, 2026 14:35
@mattsse mattsse merged commit f7120eb into master May 29, 2026
19 checks passed
@mattsse mattsse deleted the codex/reentrancy-eth-lint branch May 29, 2026 14:36
@github-project-automation github-project-automation Bot moved this to Done in Foundry May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants