Repository navigation
Fix the repository audit's findings - #198
Merged
Merged
Conversation
The flag exempted root only in filter_out, so root's TCP and DNS still went through Tor while its UDP left in cleartext. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: onyks-os <129986281+onyks-os@users.noreply.github.com>
A start that could not read its table back recorded None, and the watchdog then skipped the #80 comparison for the whole session, so a flushed table passed. Start now rolls back; the watchdog treats a missing fingerprint or an unreadable table as a firewall failure. The chain-name and bypass-rule checks, which the fingerprint covers, are gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: onyks-os <129986281+onyks-os@users.noreply.github.com>
do_stop deleted the lock in a finally even when destroy_rules failed, so status and stop lost a session whose table was still loaded. It now keeps the lock and exits 8. A failed DNS restore exits 1 instead of 0, and a conntrack flush timeout no longer aborts the teardown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: onyks-os <129986281+onyks-os@users.noreply.github.com>
transport_expressions (the guard's JSON) and transport_rules (TTP's nft text) are written apart, and nothing compared them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: onyks-os <129986281+onyks-os@users.noreply.github.com>
Nothing reads them since watchdog status asks the live unit; they only cost a lock rewrite on every watchdog start and stop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: onyks-os <129986281+onyks-os@users.noreply.github.com>
Only a lock without session_id reached it, i.e. one written by 0.4.x and still in /run after an upgrade mid-session. Every 0.5 session was already refused with 'Session Already Present' and ended by 'ttp stop', which also handles an old lock. The docs promising auto-recovery after kill -9 were wrong for 0.5 and are corrected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: onyks-os <129986281+onyks-os@users.noreply.github.com>
Signed-off-by: onyks-os <129986281+onyks-os@users.noreply.github.com> # Conflicts: # docs/architecture.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: onyks-os <129986281+onyks-os@users.noreply.github.com>
state.py re-exported the star-message helpers and PERSISTENT_DIR 'for backward compatibility'; only start, uninstall and one test used them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: onyks-os <129986281+onyks-os@users.noreply.github.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.
Fixes the ten findings of the 2026-11-30 repository audit, one commit each.
Fixed
nftcould not list the table atttp start, the lock recordedNoneand the watchdog skipped the comparison for the whole session. A flushed table keeps its chain names, so it then passed.startnow rolls back; the watchdog treats a missing fingerprint or an unreadable table as a firewall failure. The chain-name and bypass-rule checks, which the fingerprint covers, are gone; a bypass user deleted mid-session no longer cuts off the host.ttp stoplost a session whose table was still loaded. The lock was deleted in afinallyeven whendestroy_rules()failed. The lock now stays andstopexits8(asclose_redirected_or_retainalready does).--allow-rootexempted root infilter_outonly. Root's TCP and DNS still went to Tor while its UDP left in cleartext. Root is now exempt in the NAT chain too, like a--bypass-user; its loopback DNS still goes to Tor. Tor verification already runs asnobody, so it is unaffected.restore_dnsnow returns whether it succeeded;stopexits1and says so.conntrack -Ftimeout aborted the teardown before the rules were removed. It is a warning now, like a failed flush.Tests
Removed
start(only a 0.4.x lock reached it; every 0.5 lock was already refused). The docs promising auto-recovery afterkill -9were wrong for 0.5 and are corrected.watchdog_active/watchdog_pidin the lock: written, never read.state.py's re-exports ofttp.ux.Each new test was checked against a mutation of the fix it covers.
🤖 Generated with Claude Code