Fix/613 default network policy#630
Open
ionfwsrijan wants to merge 2 commits into
Open
Conversation
Previously, an empty SECUSCAN_NETWORK_ALLOWLIST caused _init_default_policies() to automatically add 0.0.0.0/0 and ::/0 as allow-all rules, making the network policy enforcement illusory. Now, an empty allowlist means deny-all egress. Only explicitly listed CIDRs in the allowlist are permitted. The denylist continues to block RFC 1918 private addresses and cloud metadata IPs. Fixes utksh1#613
dfb1167 to
0314185
Compare
0314185 to
8f73371
Compare
Contributor
Author
|
@utksh1 You may review and merge |
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.
Description
settings.network_allowlistdefaults to[](empty list). When the allowlist is empty,_init_default_policies()automatically adds0.0.0.0/0and::/0as "Default allow all" rules. This means every network connection from any scanner to any public internet host is permitted unless the operator explicitly setsSECUSCAN_NETWORK_ALLOWLIST. The deny-by-default security model is illusory.Fix: remove the default allow-all rules. An empty allowlist now means deny-all egress. Operators must explicitly configure
SECUSCAN_NETWORK_ALLOWLISTto permit outbound traffic.Related Issues
Type of Change
How Has This Been Tested?
Verified that
_init_default_policiesno longer adds0.0.0.0/0or::/0whennetwork_allowlistis empty. The denylist (RFC 1918, cloud metadata) continues to be applied as before.Checklist