Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Commit c64517c

Browse files
committed
Updated to version v1.8.3
1 parent 6db2086 commit c64517c

12 files changed

+31
-18
lines changed

CHANGELOG.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,24 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
## [1.8.3] - 2023-04-18
7+
### Changed
8+
- Fixed S3 logging bucket setting
9+
- Fixed missing userName in codecommit event when pushes are made by assumed role credentials
10+
- Upgraded Werkzeug to mitigate CVE-2023-25577
11+
- Upgraded cryptography to mitigate CVE-2023-23931
12+
- upgraded tenacity
13+
- Added timeout to requests call
14+
- Upgraded Athena engine version 3
15+
616
## [1.8.2] - 2023-01-13
717
### Security
818
- Upgrade JSON5 to mitigate CVE-2022-46175
919
- Upgrade certifi to mitigate CVE-2022-23491
1020

1121
## [1.8.1] - 2022-12-05
1222
### Added
13-
- Added Application Regsitry
23+
- Added Application Registry
1424
### Changed
1525
- Upgraded node 14 to 16
1626

source/cdk.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"app": "npx ts-node bin/aws_devops_monitoring_dashboard.ts",
33
"context": {
44
"quicksight_source_template_arn": "arn:aws:quicksight:us-east-1:%%TEMPLATE_ACCOUNT_ID%%:template/%%DIST_QUICKSIGHT_NAMESPACE%%_%%SOLUTION_NAME%%_%%DASHED_VERSION%%",
5-
"constructs:stackRelativeExports": false
5+
"constructs:stackRelativeExports": false,
6+
"@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy": true
67
}
78
}

source/lambda/event_parser/codecommit_events.js

+5
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ let TransformCodeCommitEvents = (data, recordNumber) => {
3737
if (detailData.hasOwnProperty('userIdentity') && detailData['userIdentity'] != null) {
3838
let userIdentity = detailData['userIdentity'];
3939
if (userIdentity['userName'] != null) transformedDetail['authorName'] = userIdentity['userName'];
40+
//Fix missing userName in codecommit event when pushes are made by assumed role credentials
41+
else if (userIdentity['sessionContext']['sessionIssuer']['userName'] != null)
42+
transformedDetail['authorName'] = userIdentity['sessionContext']['sessionIssuer']['userName'];
43+
else if (userIdentity['principalId'] != null)
44+
transformedDetail['authorName'] = userIdentity['principalId'].split(':')[1];
4045
}
4146

4247
//process commits made from aws codecommit console

source/lambda/quicksight-custom-resources/requirements-dev.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ certifi==2022.12.7
1818
cffi==1.15.1
1919
charset-normalizer==2.1.1
2020
coverage==7.0.5
21-
cryptography==39.0.0
21+
cryptography~=39.0.1
2222
exceptiongroup==1.1.0
2323
idna==3.4
2424
iniconfig==2.0.0
@@ -32,5 +32,5 @@ responses==0.22.0
3232
toml==0.10.2
3333
tomli==2.0.1
3434
types-toml==0.10.8.1
35-
Werkzeug==2.2.2
35+
Werkzeug~=2.2.3
3636
xmltodict==0.13.0

source/lambda/quicksight-custom-resources/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
crhelper==2.0.11
22
PyYAML==6.0
33
requests==2.28.1
4-
tenacity==8.1.0
4+
tenacity~=8.2.2
55
## urllib3 should match Lambda runtime
66
urllib3==1.26.9
77
## The following requirements were added by pip freeze:

source/lambda/solution_helper/util/solution_metrics.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def send_metrics(data,
3434
json_data = dumps(metrics_data)
3535
print('metrics data:' + json_data)
3636
headers = {'content-type': 'application/json'}
37-
response = requests.post(url, data=json_data, headers=headers)
37+
response = requests.post(url, data=json_data, headers=headers, timeout=10)
3838
return response
3939
except Exception as error :
4040
logger.exception(f"Error sending usage data: {error}")

source/lib/aws_devops_monitoring_dashboard_stack.ts

+1
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ export class DevOpsDashboardStack extends cdk.Stack {
323323
refMetricsBucket.addPropertyOverride('BucketName', 'aws-devops-metrics-' + uuid);
324324
refMetricsBucket.addPropertyOverride('OwnershipControls.Rules', [{ ObjectOwnership: 'BucketOwnerEnforced' }]);
325325
refLoggingBucket.addPropertyOverride('BucketName', 'aws-devops-metrics-logging-' + uuid);
326+
refLoggingBucket.addPropertyDeletionOverride('AccessControl');
326327

327328
// Add cdk-nag suppression
328329
NagSuppressions.addResourceSuppressions(refLoggingBucket, [

source/lib/database/database_construct.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ export class GlueDatabase extends Construct {
486486
}
487487
},
488488
engineVersion: {
489-
selectedEngineVersion: 'Athena engine version 2'
489+
selectedEngineVersion: 'Athena engine version 3'
490490
}
491491
}
492492
});

source/lib/deployment-helper/canary_alarm/canary_alarm_stack.ts

-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import { Canary, Code, Runtime, Schedule, Test } from '@aws-cdk/aws-synthetics-a
1717
import {
1818
BlockPublicAccess,
1919
Bucket,
20-
BucketAccessControl,
2120
BucketEncryption,
2221
BucketProps,
2322
CfnBucket,
@@ -276,7 +275,6 @@ export class CanaryStack extends Stack {
276275
versioned: false,
277276
blockPublicAccess: BlockPublicAccess.BLOCK_ALL,
278277
removalPolicy: RemovalPolicy.RETAIN,
279-
accessControl: BucketAccessControl.LOG_DELIVERY_WRITE,
280278
bucketName: paramBucketName.valueAsString
281279
};
282280

source/test/__snapshots__/aws_devops_monitoring_dashboard_stack.test.ts.snap

+6-7
Original file line numberDiff line numberDiff line change
@@ -1138,7 +1138,7 @@ exports[`Snapshot test for primary devopsDashboardStack 1`] = `
11381138
"S3Bucket": {
11391139
"Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}",
11401140
},
1141-
"S3Key": "c84340be658fa0b4aba030e932ff0f4ecdb2c3c521780160e5f472bac476bc0f.zip",
1141+
"S3Key": "b636deff91d9ee146f8394bf130e97730cc1bc6ee8169ec7b5a0d232f265a06c.zip",
11421142
},
11431143
"Description": "DevOps Monitoring Dashboard on AWS solution - This function performs lambda transformation within kinesis firehose. It parses CloudWatch metrics for CodeBuild, sends relevant data to S3 for downstream operation",
11441144
"Environment": {
@@ -2214,7 +2214,6 @@ exports[`Snapshot test for primary devopsDashboardStack 1`] = `
22142214
},
22152215
},
22162216
"Properties": {
2217-
"AccessControl": "LogDeliveryWrite",
22182217
"BucketEncryption": {
22192218
"ServerSideEncryptionConfiguration": [
22202219
{
@@ -2532,7 +2531,7 @@ exports[`Snapshot test for primary devopsDashboardStack 1`] = `
25322531
"S3Bucket": {
25332532
"Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}",
25342533
},
2535-
"S3Key": "c84340be658fa0b4aba030e932ff0f4ecdb2c3c521780160e5f472bac476bc0f.zip",
2534+
"S3Key": "b636deff91d9ee146f8394bf130e97730cc1bc6ee8169ec7b5a0d232f265a06c.zip",
25362535
},
25372536
"Description": "DevOps Monitoring Dashboard on AWS solution - This function performs lambda transformation within kinesis firehose. It parses raw cloudwatch events, sends relevant data to S3 for downstream operation",
25382537
"Environment": {
@@ -2705,7 +2704,7 @@ exports[`Snapshot test for primary devopsDashboardStack 1`] = `
27052704
{
27062705
"Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}",
27072706
},
2708-
"/7edf04fa4def4d8c6aca4f8afd40f203a7fcc21a56aa83b2a6d2ef37ceaabdc4.json",
2707+
"/2e01711597dd3bfb5869b8b72f5360ffa93d4c78f5485bd28ae92526454bbcd1.json",
27092708
],
27102709
],
27112710
},
@@ -2744,7 +2743,7 @@ exports[`Snapshot test for primary devopsDashboardStack 1`] = `
27442743
"State": "ENABLED",
27452744
"WorkGroupConfiguration": {
27462745
"EngineVersion": {
2747-
"SelectedEngineVersion": "Athena engine version 2",
2746+
"SelectedEngineVersion": "Athena engine version 3",
27482747
},
27492748
"PublishCloudWatchMetricsEnabled": true,
27502749
"ResultConfiguration": {
@@ -3400,7 +3399,7 @@ exports[`Snapshot test for primary devopsDashboardStack 1`] = `
34003399
{
34013400
"Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}",
34023401
},
3403-
"/0eac479a3e9370cb2e0a65a6f8ee7af51c380a070e8ff3f7eb8d616094cd09d4.json",
3402+
"/1b55fb1fc8297a047ff4cbb303f94613287be55e9e479bef30fdc1cac12ed1c4.json",
34043403
],
34053404
],
34063405
},
@@ -3581,7 +3580,7 @@ exports[`Snapshot test for primary devopsDashboardStack 1`] = `
35813580
"S3Bucket": {
35823581
"Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}",
35833582
},
3584-
"S3Key": "1bc90dd7152882885080ae1f0cc0303766e0b1200571b1f8362c56d832a4c654.zip",
3583+
"S3Key": "884355f006d5aec00da1c459ff68a1dcb1c88175bd41acaa19d3c2ced6b41aef.zip",
35853584
},
35863585
"Description": "DevOps Monitoring Dashboard on AWS solution - This function generates UUID for each deployment.",
35873586
"Environment": {

source/test/__snapshots__/canary_stack.test.ts.snap

-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ exports[`Snapshot test for canary alarm 1`] = `
291291
},
292292
},
293293
"Properties": {
294-
"AccessControl": "LogDeliveryWrite",
295294
"BucketEncryption": {
296295
"ServerSideEncryptionConfiguration": [
297296
{

source/test/__snapshots__/sharing_account_stack.test.ts.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ exports[`Snapshot test for primary SharingAccountStack 1`] = `
298298
"S3Bucket": {
299299
"Fn::Sub": "cdk-hnb659fds-assets-\${AWS::AccountId}-\${AWS::Region}",
300300
},
301-
"S3Key": "c84340be658fa0b4aba030e932ff0f4ecdb2c3c521780160e5f472bac476bc0f.zip",
301+
"S3Key": "b636deff91d9ee146f8394bf130e97730cc1bc6ee8169ec7b5a0d232f265a06c.zip",
302302
},
303303
"Description": "DevOps Monitoring Dashboard on AWS solution - This function performs lambda transformation within kinesis firehose. It parses CloudWatch metrics for CodeBuild, sends relevant data to S3 for downstream operation",
304304
"Environment": {

0 commit comments

Comments
 (0)