Cross-references corrected 2026-09-14 at 61b3a878. Three issues this body
pointed at have since closed (#234, #237, #238), and one of them changed the
premise rather than the detail: Debian is eligible now, so the first paragraph
below was written in the conditional and should not have stayed there. The
defect itself is unchanged and still reproduces:
$ git rev-parse --short=8 HEAD
61b3a878
$ grep -c Ufw crates/sysknife-types/src/lib.rs
8
$ grep -ci nft crates/sysknife-types/src/lib.rs
0
Scope 1 is taken. PR #413 by @QinXi-ai is open against the read-only half
(GetNftablesRuleset and a backend reporter). Scope 2 is untouched.
The catalogue has eight ufw actions and no nftables ones. On Ubuntu that is the right call, because ufw is the family's canonical frontend. On Debian it is not: Debian's own handbook names nftables as "the default firewall framework in Debian Buster and later", and stock Debian installs no ufw.
Debian eligibility landed on 10 September. #238 is closed and is_supported now accepts Debian 12 and later, so SysKnife already runs on hosts where its only firewall vocabulary is absent.
The two failure shapes
ufw absent. UfwStatus and the seven mutating ufw actions fail at exec with a command-not-found, which surfaces as execution_failure with no explanation of why.
ufw installed but idle. Worse, and this repo has already been burned by this exact shape. The NON_CANONICAL_ON_DEBIAN doc comment (crates/sysknife-core/src/action_family.rs:98) records it:
an Ubuntu host running firewalld lost firewall management entirely, and UfwStatus answered Status: inactive — a confident wrong answer instead of a refusal.
Substitute nftables for firewalld and Debian for Ubuntu and it is the same bug. An operator asking "is the firewall on" gets "inactive" from ufw while nftables is filtering traffic.
Scope
Two independent pieces; either is a reasonable PR.
1. Read-only truth first. A GetNftablesRuleset action over sudo nft list ruleset, and a state read that reports which backend is in force rather than which frontend was queried. This is the piece that stops the confident wrong answer, and it is Low risk with no approval receipt, so it is the smaller start.
2. Mutating parity, if wanted. nftables equivalents of allow, deny, limit and delete. This is a design question rather than a transcription: ufw's rule model is a thin abstraction and nft's is tables, chains and handles, so UfwDeleteRule's index has no direct analogue. Worth discussing here before code. #234 closed on 10 September and query_ufw_rules now produces the number UfwDeleteRule needs, so the missing-index problem is a ufw one no longer; nft handles are a separate design question.
Either piece needs its packaging/sysknife-sudoers grant, and nft argv is token-matched there like every other tool.
Tests first
Assert the argv, then assert the backend-detection logic against fixtures for three states: nftables active with rules, ufw active, and neither. The third case is the one that must not answer confidently.
Worth deciding alongside
If a host runs nftables, should the ufw actions be refused there rather than offered? That is the NON_CANONICAL_ON_DEBIAN question again, one layer down. #237 closed on 9 September and the family fence now means what it says, so this is a fresh decision rather than part of that surgery.
Difficulty
medium for the read-only action and backend detection. hard for mutating parity, because the rule model differs rather than the syntax.
Getting started
CONTRIBUTING.md has the build and test commands. No CLA and no copyright waiver. The project is MIT.
The catalogue has eight
ufwactions and no nftables ones. On Ubuntu that is the right call, because ufw is the family's canonical frontend. On Debian it is not: Debian's own handbook names nftables as "the default firewall framework in Debian Buster and later", and stock Debian installs no ufw.Debian eligibility landed on 10 September. #238 is closed and
is_supportednow accepts Debian 12 and later, so SysKnife already runs on hosts where its only firewall vocabulary is absent.The two failure shapes
ufw absent.
UfwStatusand the seven mutating ufw actions fail at exec with a command-not-found, which surfaces asexecution_failurewith no explanation of why.ufw installed but idle. Worse, and this repo has already been burned by this exact shape. The
NON_CANONICAL_ON_DEBIANdoc comment (crates/sysknife-core/src/action_family.rs:98) records it:Substitute nftables for firewalld and Debian for Ubuntu and it is the same bug. An operator asking "is the firewall on" gets "inactive" from ufw while nftables is filtering traffic.
Scope
Two independent pieces; either is a reasonable PR.
1. Read-only truth first. A
GetNftablesRulesetaction oversudo nft list ruleset, and a state read that reports which backend is in force rather than which frontend was queried. This is the piece that stops the confident wrong answer, and it is Low risk with no approval receipt, so it is the smaller start.2. Mutating parity, if wanted. nftables equivalents of allow, deny, limit and delete. This is a design question rather than a transcription: ufw's rule model is a thin abstraction and nft's is tables, chains and handles, so
UfwDeleteRule's index has no direct analogue. Worth discussing here before code. #234 closed on 10 September andquery_ufw_rulesnow produces the numberUfwDeleteRuleneeds, so the missing-index problem is a ufw one no longer; nft handles are a separate design question.Either piece needs its
packaging/sysknife-sudoersgrant, andnftargv is token-matched there like every other tool.Tests first
Assert the argv, then assert the backend-detection logic against fixtures for three states: nftables active with rules, ufw active, and neither. The third case is the one that must not answer confidently.
Worth deciding alongside
If a host runs nftables, should the ufw actions be refused there rather than offered? That is the
NON_CANONICAL_ON_DEBIANquestion again, one layer down. #237 closed on 9 September and the family fence now means what it says, so this is a fresh decision rather than part of that surgery.Difficulty
mediumfor the read-only action and backend detection.hardfor mutating parity, because the rule model differs rather than the syntax.Getting started
CONTRIBUTING.md has the build and test commands. No CLA and no copyright waiver. The project is MIT.