Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.

Commit 8087fe7

Browse files
authored
Dependabot fix for fast-xml-parser and bugfixes (#32)
v2.0.6 updates: - Overriding fast-xml-parser in the services/helper for CVE https://nvd.nist.gov/vuln/detail/CVE-2023-34104 - Overriding fast-xml-parser in the services/complianceGenerator services/policyManager services/preReqManager for CVE https://nvd.nist.gov/vuln/detail/CVE-2023-34104 - Fix issue with deployment in any region other than us-east-1, update @types/node and aws-sdk-client-mock to enable unit tests to complete using ./run-unit-tests.sh
1 parent 7a74da1 commit 8087fe7

File tree

14 files changed

+7306
-3914
lines changed

14 files changed

+7306
-3914
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.0.6] - 2023-06-27
9+
10+
### Fixed
11+
12+
- Fixed dependabot issues for fast-xml-parser, [CVE-2023-34104](https://nvd.nist.gov/vuln/detail/CVE-2023-34104).
13+
- Fixed deployment issue which was limiting the solution to be deployed in only us-east-1.
14+
815
## [2.0.5] - 2023-06-05
916

1017
### Changed

deployment/build-s3-dist.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ echo "cp $staging_dist_dir/*.template.json $template_dist_dir/"
9595
cp $staging_dist_dir/*.template.json $template_dist_dir/
9696
rm *.template.json
9797

98-
# Move policy_manifest to template_dist_dir
99-
cp $resource_dir/lib/policy_manifest.json $template_dist_dir/
98+
# Move policy_manifest to build_dist_dir
99+
cp $resource_dir/lib/policy_manifest.json $build_dist_dir/
100100

101101
# Rename all *.template.json files to *.template
102102
echo "Rename all *.template.json to *.template"

source/resources/lib/policy.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {
1919
CfnParameter,
2020
NestedStackProps,
2121
} from "aws-cdk-lib";
22-
import {Construct} from "constructs";
22+
import { Construct } from "constructs";
2323
import { StringListParameter, StringParameter } from "aws-cdk-lib/aws-ssm";
2424
import { Queue, QueueEncryption, QueuePolicy } from "aws-cdk-lib/aws-sqs";
2525
import { Code, Runtime, Function, CfnFunction } from "aws-cdk-lib/aws-lambda";
@@ -40,8 +40,7 @@ import { AnyPrincipal, Effect, PolicyStatement } from "aws-cdk-lib/aws-iam";
4040
import { IAMConstruct } from "./iam";
4141
import manifest from "./solution_manifest.json";
4242
import { LOG_LEVEL } from "./exports";
43-
import {EventbridgeToLambda} from "@aws-solutions-constructs/aws-eventbridge-lambda";
44-
43+
import { EventbridgeToLambda } from "@aws-solutions-constructs/aws-eventbridge-lambda";
4544

4645
export class PolicyStack extends NestedStack {
4746
/**
@@ -213,7 +212,7 @@ export class PolicyStack extends NestedStack {
213212
encryption: BucketEncryption.S3_MANAGED,
214213
blockPublicAccess: BlockPublicAccess.BLOCK_ALL,
215214
serverAccessLogsBucket: accessLogsBucket,
216-
enforceSSL: true
215+
enforceSSL: true,
217216
});
218217

219218
/**
@@ -238,7 +237,7 @@ export class PolicyStack extends NestedStack {
238237
action: "copyObject",
239238
parameters: {
240239
Bucket: policyBucket.bucketName,
241-
CopySource: `${manifest.solution.policyBucket}/${manifest.solution.name}/${manifest.solution.solutionVersion}/policy_manifest.json`,
240+
CopySource: `${manifest.solution.policyBucket}-${this.region}/${manifest.solution.name}/${manifest.solution.solutionVersion}/policy_manifest.json`,
242241
Key: "policy_manifest.json",
243242
},
244243
physicalResourceId: PhysicalResourceId.of(Date.now().toString()),
@@ -248,7 +247,9 @@ export class PolicyStack extends NestedStack {
248247
effect: Effect.ALLOW,
249248
sid: "S3Get",
250249
actions: ["s3:GetObject"],
251-
resources: [`arn:aws:s3:::${manifest.solution.policyBucket}/*`],
250+
resources: [
251+
`arn:aws:s3:::${manifest.solution.policyBucket}-${this.region}/*`,
252+
],
252253
}),
253254
new PolicyStatement({
254255
effect: Effect.ALLOW,

source/resources/lib/solution_manifest.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"userAgentPrefix": "AwsSolution",
88
"metricsEndpoint": "https://metrics.awssolutionsbuilder.com/generic",
99
"name": "%%SOLUTION_NAME%%",
10-
"policyBucket": "%%TEMPLATE_BUCKET%%",
10+
"policyBucket": "%%BUCKET_NAME%%",
1111
"templateVersion": "2010-09-09",
1212
"sendMetric": "Yes"
1313
},
@@ -16,5 +16,7 @@
1616
"regionalStackSetName": "FMS-EnableConfig-Regional",
1717
"prereqPolicy": "FMS-PreReqManager-Policy"
1818
},
19-
"commonResourceStack": { "helperPolicy": "FMS-Helper-Policy" }
20-
}
19+
"commonResourceStack": {
20+
"helperPolicy": "FMS-Helper-Policy"
21+
}
22+
}

0 commit comments

Comments
 (0)