Effectively-duplicate rule suppression
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.6k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
We already have suppression of literally duplicate wordlist rules (although there may be bugs with it, see #5011), however we do not yet suppress rules that look different but are effectively duplicate (redundant).
https://github.com/mhasbini/duprule is one external project that does this, so we could consider their approach (vs. or as well as other ideas):
How does it works ?
TL;DR: Each rule change is mapped, and a unique id is generated for each rule with functions count.
The mechanism is like this:
A blank map is created with N ( from 1 to 36 ) slots.
Each rule change will be applied to the map. Example rule: 'u', will change all characters cases from '?' ( unknown ) to 'u' ( upper case ). 'sab', will add {'a' -> 'b'} to the map. And same logic apply for the other rules.
An id is generated from the map.
The ids are compared to detect duplicate rules.
The rule with the least functions count will be selected.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing duplicate-rule suppression and the linked duprule project to understand how rule changes and function counts are represented. Define which differently written rules count as equivalent and how the least costly rule is selected. Done should include agreed behavior and tests covering effectively duplicate rules, but the issue does not name relevant files or test entry points.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100