feat: rate-limit-accept-inverted smell — the fourth quadrant admits only the excess (v1.26.0) - #39
Merged
Merged
Conversation
…nly the excess (v1.26.0) Under-limit ACCEPT = correct throttle; under-limit DROP = drop-inverted; over-limit DROP = correct drop-the-excess; over-limit ACCEPT was the one quadrant still unjudged: hashlimit-above/limit-rate-over on an ACCEPT admits only traffic ABOVE the rate — calm traffic falls through to the default deny, the service is dead on a quiet day and answers only under flood. Any protocol; per-source keying does not save it (a meter just inverts per client). Mutually exclusive with not-per-source by construction: that detector now waves over-limit ACCEPTs through instead of prescribing srcip for a rule whose real problem is the verdict. The sloppy router gains an SMTP guard pasted backwards (per-source, even). 34 -> 35 smells, tests 150 -> 155. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What
New linter smell
rate-limit-accept-inverted(warning) — the fourth quadrant of the rate-limit matrix, the only one still unjudged:rate-limit-drop-inverted-m hashlimit --hashlimit-above … -j ACCEPT/ nftlimit rate over … acceptadmits only the traffic above the rate: calm, legitimate traffic never matches, falls through to the default deny — the service is dead on a quiet day and springs to life only under flood. Typically a half-fix: someone flips the tutorial recipe's matcher tooverbut forgets to flip the verdict.Design decisions (mirroring the DROP sibling)
{ ip saddr limit rate over 3/minute } acceptjust inverts per client (pinned by test, iptables and nft spellings both).rate-limit-not-per-sourceby construction: that detector now waves over-limit ACCEPTs through — prescribingsrcipkeying would "fix" a rule whose real problem is the verdict (pinned: shared-bucket TCP over-ACCEPT lands in this smell alone).limitverb compiles to a correct recipe).Wiring
🤖 Generated with Claude Code