Skip to content

enumerate LibFlow.flow reentrancy surface in NatSpec#440

Open
thedavidmeister wants to merge 1 commit intomainfrom
2026-05-04-issue-309-libflow-reentrancy-natspec
Open

enumerate LibFlow.flow reentrancy surface in NatSpec#440
thedavidmeister wants to merge 1 commit intomainfrom
2026-05-04-issue-309-libflow-reentrancy-natspec

Conversation

@thedavidmeister
Copy link
Copy Markdown
Contributor

Summary

LibFlow.flow NatSpec already says "DOES NOT prevent reentrancy attacks. This is the responsibility of the caller" — correct, but a future caller had to re-derive the actual reentrancy surface from scratch.

Now enumerated:

  1. interpreterStore.set — external call to an arbitrary store contract chosen by the flow deployer.
  2. ERC721 safeTransferFrom — invokes onERC721Received on a contract recipient.
  3. ERC1155 safeTransferFrom — invokes onERC1155Received on a contract recipient.
  4. ERC20 safeTransfer / safeTransferFrom — non-reentrant for compliant ERC20s, but ERC777 (presents an ERC20 interface) invokes tokensToSend / tokensReceived via the ERC1820 registry.

Closes #309.

Test plan

  • full suite via rainix-sol-test
  • static via rainix-sol-static
  • forge build

🤖 Generated with Claude Code

The existing "responsibility of the caller" line is correct but a future
caller had to re-derive the surface from scratch. NatSpec now lists the
four entry points: interpreterStore.set, ERC721 onERC721Received, ERC1155
onERC1155Received, and ERC777-style ERC20 callbacks via ERC1820.

Closes #309.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 4, 2026

Warning

Rate limit exceeded

@thedavidmeister has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 42 minutes and 18 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 02272cf7-4ccd-49fe-9a87-8763b315e18f

📥 Commits

Reviewing files that changed from the base of the PR and between ceaea3c and f09f718.

📒 Files selected for processing (1)
  • src/lib/LibFlow.sol
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 2026-05-04-issue-309-libflow-reentrancy-natspec

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 42 minutes and 18 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

[A23-6] [LOW] LibFlow.flow: reentrancy surface not enumerated in NatSpec

1 participant