Repository navigation
feat(network): support independent bind-tcp restrictions with outbound access - #66
Open
AdamMagued wants to merge 1 commit into
Open
AdamMagued wants to merge 1 commit into
AdamMagued wants to merge 1 commit into
Conversation
Owner
|
Thanks @AdamMagued , happy to merge when conflicts are resolved. |
AdamMagued
force-pushed
the
feat-issue-59-separate-bind-connect-restrictions
branch
from
October 18, 2026 11:54
fc3296c to
7f54342
Compare
Author
|
Rebased onto |
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.
Closes #59
Summary
Decouple
LANDLOCK_ACCESS_NET_BIND_TCPfromLANDLOCK_ACCESS_NET_CONNECT_TCPwhen--unrestricted-networkis combined with TCP bind restrictions.Changes
AccessNetBindTCPonly whenUnrestrictedNetworkis enabled alongsideBindTCPPortsorRestrictBindTCP, leavingAccessNetConnectTCPunhandled so outbound connections remain permitted.--restrict-bind-tcpflag to deny all TCP bind attempts when--unrestricted-networkis active without specific allowed ports.--unrestricted-egressas an alias for--unrestricted-network.BuildLandlockConfigininternal/sandboxandparseSandboxConfigincmd/landrunfor unit testing.Verification
cmd/landrun/main_test.goandinternal/sandbox/sandbox_test.gocovering decoupled bind restrictions, explicit bind denials, unrestricted egress, and port range validation.test.shverifying allowed binds, denied binds, and permitted outbound connections under--unrestricted-network.go test ./... -vandgo vet ./...in Linux container sandbox.