Repository navigation
docs+test: sync README sysctl profile with harden_sysctl and stop the drift - #30
Merged
Merged
Conversation
… drift The README documented a 24-key profile while harden_sysctl emitted 62, and still documented net.ipv4.ip_forward=0, which the script no longer writes (per-interface forwarding replaced it). That is exactly the blind spot a copy-paste hardening profile creates: an operator following the README by hand applied a weaker and partly wrong set than the tool. - README now mirrors the emitted profile in order, including the server-only user.max_user_namespaces=0 and its container-runtime carve-out. - Notes that tcp_fin_timeout/tw_reuse/keepalive/buffers are capacity tuning rather than mitigations, and that forwarding is now per-interface. - Adds an Attack surface reduction section covering the new step: filesystem blacklist (with the squashfs/snap carve-out), SSH crypto hardening, login.defs aging, and core-dump limits. - Adds a bidirectional README<->code consistency test so the two cannot diverge again: every key emitted must be documented, and every documented key must still be emitted. Negative-controlled in both directions.
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.
The README documented a 24-key sysctl profile while \harden_sysctl()\ emits 62, and still documented
et.ipv4.ip_forward=0, which the script no longer writes (per-interface \orwarding\ replaced it).
That is a real blind spot for a copy-paste hardening profile: anyone following the README by hand applied a weaker and partly incorrect set than the tool does.
Negative controls (in-memory, no source mutation): adding an undocumented key to the script flips the 'missing' assertion; re-adding
et.ipv4.ip_forward\ to the README flips the 'stale' assertion. Baseline reports 62 code keys / 63 doc keys (the extra being the server-only key) with zero drift in both directions.