crytic / crytic/slither

Enhancement: Add RCN Mutator (`require(...)` Condition Negation)

Open
#2,997 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
6.4k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

# Add `RCN` Mutator for `require(...)` Condition Negation

## Why
We already have operator-level mutators (`ROR`, `LOR`, etc.), but we don’t have a mutator that flips the full `require` guard condition itself.

That mutation is useful for catching weak negative-path tests around validation and auth checks.

## What
Add mutator `RCN` that negates the first `require` condition argument:

- `require(x > 0 && x < 10)` -> `require(!(x > 0 && x < 10))`
- `require(msg.sender == owner, "not owner")` -> `require(!(msg.sender == owner), "not owner")`

## Follow-up
I already have a fix in progress for `RCN` (`require(...)` condition negation), and I will open that as a separate PR soon, so this scope stays clean.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.