Skip to content

Commit a93e606

Browse files
authored
Merge pull request #170 from SumoLogic/sec-review
Security review | CVE fix
2 parents bc529bb + 28b5dd1 commit a93e606

File tree

8 files changed

+48
-26
lines changed

8 files changed

+48
-26
lines changed

awsautoenableS3Logging/packaged.yaml

+29-7
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ Metadata:
2424
- s3logging
2525
- flowlogs
2626
Name: sumologic-s3-logging-auto-enable
27-
SemanticVersion: 1.0.4
27+
SemanticVersion: 1.0.5
2828
SourceCodeUrl: https://github.com/SumoLogic/sumologic-aws-lambda/tree/master/awsautoenableS3Logging
29-
LicenseUrl: s3://appdevstore/AutoEnableS3Logs/v1.0.3/978602b5b9ec16f8bab0e38fd6b3998f
30-
ReadmeUrl: s3://appdevstore/AutoEnableS3Logs/v1.0.3/d05d411471e0bb4db3389f2523f515f0
29+
LicenseUrl: s3://appdevstore/AutoEnableS3Logs/v1.0.5/978602b5b9ec16f8bab0e38fd6b3998f
30+
ReadmeUrl: s3://appdevstore/AutoEnableS3Logs/v1.0.5/d05d411471e0bb4db3389f2523f515f0
3131
SpdxLicenseId: Apache-2.0
3232
Mappings:
3333
Region2ELBAccountId:
@@ -193,8 +193,6 @@ Resources:
193193
Action:
194194
- elasticloadbalancing:DescribeLoadBalancerAttributes
195195
- elasticloadbalancing:DescribeLoadBalancers
196-
- elasticloadbalancing:AddTags
197-
- elasticloadbalancing:RemoveTags
198196
- elasticloadbalancing:ModifyLoadBalancerAttributes
199197
- logs:CreateLogGroup
200198
- logs:CreateLogStream
@@ -217,11 +215,13 @@ Resources:
217215
- s3:GetBucketLogging
218216
- s3:PutBucketLogging
219217
Resource: '*'
218+
Metadata:
219+
SamResourceId: SumoLambdaRole
220220
EnableNewAWSResourcesLambda:
221221
Type: AWS::Serverless::Function
222222
Condition: auto_enable_new
223223
Properties:
224-
CodeUri: s3://appdevstore/sumo_app_utils/v2.0.8/sumo_app_utils.zip
224+
CodeUri: s3://appdevstore/sumo_app_utils/v2.0.10/sumo_app_utils.zip
225225
Handler: awsresource.enable_s3_logs
226226
Runtime: python3.7
227227
Role:
@@ -246,6 +246,8 @@ Resources:
246246
- Region2ELBAccountId
247247
- Ref: AWS::Region
248248
- AccountId
249+
Metadata:
250+
SamResourceId: EnableNewAWSResourcesLambda
249251
AutoEnableS3LogEventsInvokePermission:
250252
Type: AWS::Lambda::Permission
251253
Condition: enable_s3_buckets_logging
@@ -258,6 +260,8 @@ Resources:
258260
Fn::GetAtt:
259261
- AutoEnableS3LogEventsRuleTrigger
260262
- Arn
263+
Metadata:
264+
SamResourceId: AutoEnableS3LogEventsInvokePermission
261265
AutoEnableS3LogEventsRuleTrigger:
262266
Type: AWS::Events::Rule
263267
Condition: enable_s3_buckets_logging
@@ -293,6 +297,8 @@ Resources:
293297
- EnableNewAWSResourcesLambda
294298
- Arn
295299
Id: Main
300+
Metadata:
301+
SamResourceId: AutoEnableS3LogEventsRuleTrigger
296302
AutoEnableVPCEventsInvokePermission:
297303
Type: AWS::Lambda::Permission
298304
Condition: enable_vpc_flow_logs_logging
@@ -305,6 +311,8 @@ Resources:
305311
Fn::GetAtt:
306312
- AutoEnableVPCEventsRuleTrigger
307313
- Arn
314+
Metadata:
315+
SamResourceId: AutoEnableVPCEventsInvokePermission
308316
AutoEnableVPCEventsRuleTrigger:
309317
Type: AWS::Events::Rule
310318
Condition: enable_vpc_flow_logs_logging
@@ -340,6 +348,8 @@ Resources:
340348
- EnableNewAWSResourcesLambda
341349
- Arn
342350
Id: Main
351+
Metadata:
352+
SamResourceId: AutoEnableVPCEventsRuleTrigger
343353
AutoEnableAlbLogEventsInvokePermission:
344354
Type: AWS::Lambda::Permission
345355
Condition: enable_alb_logging
@@ -352,6 +362,8 @@ Resources:
352362
Fn::GetAtt:
353363
- AutoEnableAlbLogEventsRuleTrigger
354364
- Arn
365+
Metadata:
366+
SamResourceId: AutoEnableAlbLogEventsInvokePermission
355367
AutoEnableAlbLogEventsRuleTrigger:
356368
Type: AWS::Events::Rule
357369
Condition: enable_alb_logging
@@ -387,6 +399,8 @@ Resources:
387399
- EnableNewAWSResourcesLambda
388400
- Arn
389401
Id: Main
402+
Metadata:
403+
SamResourceId: AutoEnableAlbLogEventsRuleTrigger
390404
AutoEnableElbLogEventsInvokePermission:
391405
Type: AWS::Lambda::Permission
392406
Condition: enable_elb_logging
@@ -399,6 +413,8 @@ Resources:
399413
Fn::GetAtt:
400414
- AutoEnableElbLogEventsRuleTrigger
401415
- Arn
416+
Metadata:
417+
SamResourceId: AutoEnableElbLogEventsInvokePermission
402418
AutoEnableElbLogEventsRuleTrigger:
403419
Type: AWS::Events::Rule
404420
Condition: enable_elb_logging
@@ -435,19 +451,23 @@ Resources:
435451
- EnableNewAWSResourcesLambda
436452
- Arn
437453
Id: Main
454+
Metadata:
455+
SamResourceId: AutoEnableElbLogEventsRuleTrigger
438456
EnableExisitngAWSResourcesLambda:
439457
Type: AWS::Serverless::Function
440458
Condition: auto_enable_existing
441459
Properties:
442460
Handler: main.handler
443461
Runtime: python3.7
444-
CodeUri: s3://appdevstore/sumo_app_utils/v2.0.8/sumo_app_utils.zip
462+
CodeUri: s3://appdevstore/sumo_app_utils/v2.0.10/sumo_app_utils.zip
445463
MemorySize: 128
446464
Timeout: 900
447465
Role:
448466
Fn::GetAtt:
449467
- SumoLambdaRole
450468
- Arn
469+
Metadata:
470+
SamResourceId: EnableExisitngAWSResourcesLambda
451471
ExistingAWSResources:
452472
Type: Custom::EnableS3LogsResources
453473
Condition: auto_enable_existing
@@ -482,6 +502,8 @@ Resources:
482502
- AccountId
483503
RemoveOnDeleteStack:
484504
Ref: RemoveOnDeleteStack
505+
Metadata:
506+
SamResourceId: ExistingAWSResources
485507
Outputs:
486508
EnableNewAWSResourcesLambda:
487509
Description: Lambda Function ARN for New AWS Resources

awsautoenableS3Logging/sumologic-s3-logging-auto-enable.yaml

+3-5
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Metadata:
2424
- s3logging
2525
- flowlogs
2626
Name: sumologic-s3-logging-auto-enable
27-
SemanticVersion: 1.0.4
27+
SemanticVersion: 1.0.5
2828
SourceCodeUrl: https://github.com/SumoLogic/sumologic-aws-lambda/tree/master/awsautoenableS3Logging
2929
LicenseUrl: ./LICENSE
3030
ReadmeUrl: ./README.md
@@ -177,8 +177,6 @@ Resources:
177177
Action:
178178
- elasticloadbalancing:DescribeLoadBalancerAttributes
179179
- elasticloadbalancing:DescribeLoadBalancers
180-
- elasticloadbalancing:AddTags
181-
- elasticloadbalancing:RemoveTags
182180
- elasticloadbalancing:ModifyLoadBalancerAttributes
183181
- logs:CreateLogGroup
184182
- logs:CreateLogStream
@@ -206,7 +204,7 @@ Resources:
206204
Type: 'AWS::Serverless::Function'
207205
Condition: auto_enable_new
208206
Properties:
209-
CodeUri: s3://appdevstore/sumo_app_utils/v2.0.8/sumo_app_utils.zip
207+
CodeUri: s3://appdevstore/sumo_app_utils/v2.0.10/sumo_app_utils.zip
210208
Handler: "awsresource.enable_s3_logs"
211209
Runtime: python3.7
212210
Role: !GetAtt SumoLambdaRole.Arn
@@ -383,7 +381,7 @@ Resources:
383381
Properties:
384382
Handler: main.handler
385383
Runtime: python3.7
386-
CodeUri: s3://appdevstore/sumo_app_utils/v2.0.8/sumo_app_utils.zip
384+
CodeUri: s3://appdevstore/sumo_app_utils/v2.0.10/sumo_app_utils.zip
387385
MemorySize: 128
388386
Timeout: 900
389387
Role:

loggroup-lambda-connector/sam/packaged.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ Metadata:
2121
- serverless
2222
- loggroups
2323
- cloudwatch
24-
LicenseUrl: s3://appdevstore/LoggroupConnector/v1.0.6/6092dd6c323e33634657102f570628e0
24+
LicenseUrl: s3://appdevstore/LoggroupConnector/v1.0.7/6092dd6c323e33634657102f570628e0
2525
Name: sumologic-loggroup-connector
26-
ReadmeUrl: s3://appdevstore/LoggroupConnector/v1.0.6/5a9a6e956be7449cbd5f8653e4475071
27-
SemanticVersion: 1.0.6
26+
ReadmeUrl: s3://appdevstore/LoggroupConnector/v1.0.7/5a9a6e956be7449cbd5f8653e4475071
27+
SemanticVersion: 1.0.7
2828
SourceCodeUrl: https://github.com/SumoLogic/sumologic-aws-lambda/loggroup-lambda-connector
2929
SpdxLicenseId: Apache-2.0
3030
Parameters:
@@ -107,7 +107,7 @@ Resources:
107107
SumoLogGroupLambdaConnector:
108108
Type: AWS::Serverless::Function
109109
Properties:
110-
CodeUri: s3://appdevstore/LoggroupConnector/v1.0.6/d8e8545bf4f818fdb41a52d27024bbcd
110+
CodeUri: s3://appdevstore/LoggroupConnector/v1.0.7/d8e8545bf4f818fdb41a52d27024bbcd
111111
Handler: loggroup-lambda-connector.handler
112112
Runtime: nodejs16.x
113113
Environment:
@@ -137,7 +137,7 @@ Resources:
137137
Action:
138138
- lambda:InvokeFunction
139139
Resource:
140-
- Fn::Sub: arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:*
140+
- Fn::Sub: arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:*SumoLogGroupLambdaConnector*
141141
Events:
142142
LambdaTrigger:
143143
Type: CloudWatchEvent

loggroup-lambda-connector/sam/sam_package.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ else
99
AWS_REGION="us-east-2"
1010
fi
1111

12-
version="1.0.6"
12+
version="1.0.7"
1313

14-
sam package --template-file template.yaml --s3-bucket $SAM_S3_BUCKET --output-template-file packaged.yaml --s3-prefix "LoggroupConnector/v$version"
14+
sam package --template-file template.yaml --s3-bucket $SAM_S3_BUCKET --output-template-file packaged.yaml --s3-prefix "LoggroupConnector/v$version" --region $AWS_REGION
1515

1616
# sam deploy --template-file packaged.yaml --stack-name testingloggrpconnector --capabilities CAPABILITY_IAM --region $AWS_REGION --parameter-overrides LambdaARN="arn:aws:lambda:us-east-1:956882708938:function:SumoCWLogsLambda" LogGroupTags="env=prod,name=apiassembly" LogGroupPattern="test"
1717

loggroup-lambda-connector/sam/template.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Metadata:
2424
LicenseUrl: ../LICENSE
2525
Name: sumologic-loggroup-connector
2626
ReadmeUrl: ../Readme.md
27-
SemanticVersion: 1.0.6
27+
SemanticVersion: 1.0.7
2828
SourceCodeUrl: https://github.com/SumoLogic/sumologic-aws-lambda/loggroup-lambda-connector
2929
SpdxLicenseId: Apache-2.0
3030

@@ -121,7 +121,7 @@ Resources:
121121
Action:
122122
- lambda:InvokeFunction
123123
Resource:
124-
- !Sub 'arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:*'
124+
- !Sub 'arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:*SumoLogGroupLambdaConnector*'
125125
Events:
126126
LambdaTrigger:
127127
Type: CloudWatchEvent

sumologic-app-utils/packaged_sumo_app_utils.yaml

+5-3
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ Metadata:
2020
- sumologic
2121
- serverless
2222
Name: sumologic-app-utils
23-
SemanticVersion: 2.0.9
23+
SemanticVersion: 2.0.10
2424
SourceCodeUrl: https://github.com/SumoLogic/sumologic-aws-lambda/tree/master/sumologic-app-utils
2525
SpdxLicenseId: Apache-2.0
26-
ReadmeUrl: s3://appdevstore/sumo_app_utils/v2.0.9/4d5a92c06a7fa9d956a900e51a1f6be4
26+
ReadmeUrl: s3://appdevstore/sumo_app_utils/v2.0.10/4d5a92c06a7fa9d956a900e51a1f6be4
2727
Resources:
2828
SumoAppUtilsFunction:
2929
Type: AWS::Serverless::Function
3030
Properties:
3131
Handler: main.handler
3232
Runtime: python3.7
33-
CodeUri: s3://appdevstore/sumo_app_utils/v2.0.9/sumo_app_utils.zip
33+
CodeUri: s3://appdevstore/sumo_app_utils/v2.0.10/sumo_app_utils.zip
3434
MemorySize: 128
3535
Timeout: 300
3636
Policies:
@@ -43,6 +43,8 @@ Resources:
4343
Effect: Allow
4444
Resource: arn:aws:cloudtrail:*:*:*
4545
Sid: CreateCloudTrailPolicy
46+
Metadata:
47+
SamResourceId: SumoAppUtilsFunction
4648
Outputs:
4749
SumoAppUtilsFunction:
4850
Description: SumoAppUtils Function ARN

sumologic-app-utils/sumo_app_utils.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Metadata:
1717
- sumologic
1818
- serverless
1919
Name: sumologic-app-utils
20-
SemanticVersion: 2.0.9
20+
SemanticVersion: 2.0.10
2121
SourceCodeUrl: https://github.com/SumoLogic/sumologic-aws-lambda/tree/master/sumologic-app-utils
2222
SpdxLicenseId: Apache-2.0
2323
ReadmeUrl: ./README.md
@@ -29,7 +29,7 @@ Resources:
2929
Properties:
3030
Handler: main.handler
3131
Runtime: python3.7
32-
CodeUri: s3://appdevstore/sumo_app_utils/v2.0.9/sumo_app_utils.zip
32+
CodeUri: s3://appdevstore/sumo_app_utils/v2.0.10/sumo_app_utils.zip
3333
MemorySize: 128
3434
Timeout: 300
3535
Policies:
7.77 KB
Binary file not shown.

0 commit comments

Comments
 (0)