Skip to content

Commit 039b4b6

Browse files
authored
chore: Limit ingress traffic and delete unnecessary permissions (#61)
* chore: limit ingress traffic and delete unnecessary permissions * chore: add egress rules
1 parent b2a3049 commit 039b4b6

File tree

1 file changed

+10
-17
lines changed

1 file changed

+10
-17
lines changed

templates/CloudConnector.yaml

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -149,16 +149,6 @@ Resources:
149149
- "ecs:DescribeTaskDefinition"
150150
Resource:
151151
- "*"
152-
- PolicyName: SecretsReader
153-
PolicyDocument:
154-
Version: "2012-10-17"
155-
Statement:
156-
- Effect: Allow
157-
Action:
158-
- "kms:Decrypt"
159-
- "secretsmanager:GetSecretValue"
160-
Resource:
161-
- "*"
162152
- PolicyName: ECRReader
163153
PolicyDocument:
164154
Version: "2012-10-17"
@@ -326,19 +316,22 @@ Resources:
326316
VpcId: !Ref VPC
327317
GroupName: !Sub "${AWS::StackName}-CloudConnector"
328318
GroupDescription: CloudConnector workload Security Group
329-
SecurityGroupIngress:
330-
- CidrIp: 0.0.0.0/0
331-
IpProtocol: "tcp"
332-
FromPort: 80
333-
ToPort: 80
319+
SecurityGroupEgress:
320+
# Allow outbound HTTPS traffic over TCP
321+
# Used by Cloud Connector to send events to https://secure.sysdig.com
334322
- CidrIp: 0.0.0.0/0
335323
IpProtocol: "tcp"
336324
FromPort: 443
337325
ToPort: 443
326+
# Allow outbound DNS traffic over UDP and TCP
338327
- CidrIp: 0.0.0.0/0
339328
IpProtocol: "tcp"
340-
FromPort: 5000
341-
ToPort: 5000
329+
FromPort: 53
330+
ToPort: 53
331+
- CidrIp: 0.0.0.0/0
332+
IpProtocol: "udp"
333+
FromPort: 53
334+
ToPort: 53
342335
Tags:
343336
- Key: Name
344337
Value: !Sub "${AWS::StackName}-CloudConnector"

0 commit comments

Comments
 (0)