Fix/613 default network policy#630
Conversation
0314185 to
8f73371
Compare
|
@utksh1 You may review and merge |
utksh1
left a comment
There was a problem hiding this comment.
Focused default network policy fix with green checks. Approving for merge.
utksh1
left a comment
There was a problem hiding this comment.
After #629 merged, this branch now conflicts with main because it carries the same CI baseline files. The default-network-policy fix is useful, but this PR is not mergeable now. Please rebase on latest main and keep the branch scoped to config.py/network_policy.py plus directly related tests.
|
@utksh1 You may merge this now |
utksh1
left a comment
There was a problem hiding this comment.
Re-reviewed the latest update. The core default-deny network policy change is useful, but the PR still includes unrelated CI-baseline/frontend test changes. Please rebase on latest main and keep this scoped to backend/secuscan/config.py and backend/secuscan/network_policy.py plus direct network-policy tests only.
Previously an empty SECUSCAN_NETWORK_ALLOWLIST caused _init_default_policies() to add 0.0.0.0/0 and ::/0 as allow-all rules. Empty allowlist now means deny-all egress. Fixes utksh1#613
919e3dd to
0e049f8
Compare
|
@utksh1 I've dropped unrelated CI-baseline and frontend test changes. You may review and merge now |
utksh1
left a comment
There was a problem hiding this comment.
Re-reviewed the latest update. The PR is now focused on default-deny network policy behavior with direct unit coverage and green visible checks. Approving.
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