You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: python-checks/src/test/resources/checks/cdk/unrestrictedOutboundCommunicationsCheck.py
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -21,8 +21,15 @@ def __init__(self, vpc):
21
21
"sg-1234",
22
22
allow_all_outbound=True# NonCompliant{{Make sure that allowing unrestricted outbound communications is safe here.}}
23
23
)
24
+
25
+
ec2.SecurityGroup.from_security_group_id(
26
+
self,
27
+
"SensitiveExplicit",
28
+
"sg-1234",
29
+
allow_all_outbound=False
30
+
)
24
31
25
-
ec2.SecurityGroup.from_security_group_id( # NonCompliant{{Omitting "allow_all_outbound" enables unrestricted outbound communications. Make sure it is safe here.}}
32
+
ec2.SecurityGroup.from_security_group_id( # Compliant ref: SONARPY-1159 and SONARPY-1419
0 commit comments