Repository navigation
Conversation
…ed buys The trusted forwarder checked the nonce and then incremented it in two separate statements, so nonce consumption was not a single reusable gate and the consumed value never reached event consumers. Extract the check-and-increment into `consume_nonce`, which rejects replayed and future nonces with NonceAlreadyUsed before any work happens, and carry the consumed nonce in ForwardedBuyEvent so indexers can audit each action against `get_nonce`. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
Member
🚨 Automated Security AlertThis PR has been automatically closed by the PR monitor because it contains code patterns associated with the PolinRider malware campaign. Detected indicators may include:
Please do not reopen this PR or run the code locally. If you believe this is a false positive, contact a maintainer directly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This change adds wallet-scoped nonce tracking to ensure actions can only be executed once per nonce value and that the current nonce state is auditable.
It introduces a nonce getter and a consume path that validates and increments the nonce atomically, preventing replay attacks and preserving proper audit data in action execution events.
Scope
Changes
Acceptance Criteria
Testing
closes Add session nonce contract for replay attack prevention on signed actions #1036