Skip to content

feat: allow-under-default-allow smell — ufw's decorative whitelist (v1.27.0) - #41

Merged
DannyRuizB merged 1 commit into
mainfrom
feat/allow-under-default-allow
Aug 3, 2026
Merged

feat: allow-under-default-allow smell — ufw's decorative whitelist (v1.27.0)#41
DannyRuizB merged 1 commit into
mainfrom
feat/allow-under-default-allow

Conversation

@DannyRuizB

Copy link
Copy Markdown
Owner

What

New linter smell allow-under-default-allow (warning, ufw-only) — the silent-no-op family: ufw's whole UX is ufw allow <port>, but under Default: allow (incoming) every packet is accepted before the rule list matters. The allows are decorative: ufw status reads like a whitelist while restricting nothing — the admin believes unlisted ports are blocked.

Two axes, two findings

missing-input-drop already reports the open door (error, the policy axis). This reports the lie in the list (warning, the rules axis). Both fire together on the new sample — pinned by test. Same split as exposed-admin-port (who reaches it) vs admin-port-no-rate-limit (how fast).

What keeps it honest

  • An ALLOW above a DENY/REJECT is spared: it still does real work — it can punch a hole through that deny (a different problem, not a no-op). Only allows with no deny below them count (pinned: mixed-order test).
  • LIMIT rules never count — the throttle works regardless of the default.
  • One finding per chain, counting the no-ops, anchored on the first (no per-rule spam).
  • ufw-only on purpose: raw iptables/nft pastes can be partial rulesets, and the whitelist illusion is ufw's own UX.

Wiring

  • New sample ufw (default allow — decorative rules): a working DENY up top, three decorative allows, a LIMIT — trips exactly one finding with three no-ops, anchored past the deny.
  • 5 dedicated tests + sample pin; suite 155 → 161, lint clean. README enumeration + roadmap v1.27.0; version + lockfile bumped together (the recurring counter).

🤖 Generated with Claude Code

…1.27.0)

Under 'Default: allow (incoming)' every ufw ALLOW rule with no DENY
below it restricts nothing: the status output reads like a whitelist
while being decorative. Composes with missing-input-drop on the other
axis (policy vs rules). Allows above a deny are spared (they punch
holes — a different problem); LIMIT keeps its throttle either way.
New sample 'ufw (default allow — decorative rules)'. 36 smells,
tests 155 -> 161.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@DannyRuizB
DannyRuizB merged commit 8b47f42 into main Aug 3, 2026
1 check passed
@DannyRuizB
DannyRuizB deleted the feat/allow-under-default-allow branch August 3, 2026 09:35
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.

1 participant