Skip to content

Commit 9e92bca

Browse files
authored
chore: fix security (non-)issues (#25959)
Gets rid of the two Dependabot vulnerability notifications reported on this repository (neither is actually exploit-able in the context of this repository).
1 parent df263a6 commit 9e92bca

File tree

10 files changed

+1210
-1140
lines changed

10 files changed

+1210
-1140
lines changed

packages/@aws-cdk/aws-lambda-python-alpha/test/lambda-handler-poetry/poetry.lock

+30-35
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk/cx-api/FEATURE_FLAGS.md

+23-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Flags come in three types:
5353
| [@aws-cdk/aws-secretsmanager:useAttachedSecretResourcePolicyForSecretTargetAttachments](#aws-cdkaws-secretsmanageruseattachedsecretresourcepolicyforsecrettargetattachments) | SecretTargetAttachments uses the ResourcePolicy of the attached Secret. | 2.67.0 | (fix) |
5454
| [@aws-cdk/aws-redshift:columnId](#aws-cdkaws-redshiftcolumnid) | Whether to use an ID to track Redshift column changes | 2.68.0 | (fix) |
5555
| [@aws-cdk/aws-stepfunctions-tasks:enableEmrServicePolicyV2](#aws-cdkaws-stepfunctions-tasksenableemrservicepolicyv2) | Enable AmazonEMRServicePolicy_v2 managed policies | 2.72.0 | (fix) |
56+
| [@aws-cdk/core:includePrefixInUniqueNameGeneration](#aws-cdkcoreincludeprefixinuniquenamegeneration) | Include the stack prefix in the stack name generation process | V2NEXT | (fix) |
5657

5758
<!-- END table -->
5859

@@ -96,7 +97,8 @@ The following json shows the current recommended set of flags, as `cdk init` wou
9697
"@aws-cdk/aws-stepfunctions-tasks:enableEmrServicePolicyV2": true,
9798
"@aws-cdk/aws-ec2:restrictDefaultSecurityGroup": true,
9899
"@aws-cdk/aws-apigateway:requestValidatorUniqueId": true,
99-
"@aws-cdk/aws-kms:aliasNameRef": true
100+
"@aws-cdk/aws-kms:aliasNameRef": true,
101+
"@aws-cdk/core:includePrefixInUniqueNameGeneration": true
100102
}
101103
}
102104
```
@@ -986,4 +988,24 @@ intervention since they might not have the appropriate tags propagated automatic
986988
| 2.72.0 | `false` | `true` |
987989

988990

991+
### @aws-cdk/core:includePrefixInUniqueNameGeneration
992+
993+
*Include the stack prefix in the stack name generation process* (fix)
994+
995+
This flag prevents the prefix of a stack from making the stack's name longer than the 128 character limit.
996+
997+
If the flag is set, the prefix is included in the stack name generation process.
998+
If the flag is not set, then the prefix of the stack is prepended to the generated stack name.
999+
1000+
**NOTE** - Enabling this flag comes at a **risk**. If you have already deployed stacks, changing the status of this
1001+
feature flag can lead to a change in stacks' name. Changing a stack name mean recreating the whole stack, which
1002+
is not viable in some productive setups.
1003+
1004+
1005+
| Since | Default | Recommended |
1006+
| ----- | ----- | ----- |
1007+
| (not in v1) | | |
1008+
| V2NEXT | `false` | `true` |
1009+
1010+
9891011
<!-- END details -->

packages/@aws-cdk/integ-runner/THIRD_PARTY_LICENSES

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH RE
156156

157157
----------------
158158

159-
** aws-sdk@2.1379.0 - https://www.npmjs.com/package/aws-sdk/v/2.1379.0 | Apache-2.0
159+
** aws-sdk@2.1396.0 - https://www.npmjs.com/package/aws-sdk/v/2.1396.0 | Apache-2.0
160160
AWS SDK for JavaScript
161161
Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
162162

packages/aws-cdk-lib/custom-resources/lib/aws-custom-resource/runtime/aws-sdk-v3-handler/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@ export async function handler(event: AWSLambda.CloudFormationCustomResourceEvent
106106
}
107107

108108
awsSdk = await awsSdk;
109-
const ServiceClient = Object.entries(awsSdk).find( ([name]) => name.endsWith('Client') )?.[1] as {
109+
const [_clientName, ServiceClient] = Object.entries(awsSdk).find( ([name]) => !name.startsWith('_') && name.endsWith('Client') ) as [string, {
110110
new (config: any): {
111111
send: (command: any) => Promise<any>
112112
config: any
113113
}
114-
};
114+
}];
115115
const client = new ServiceClient({
116116
apiVersion: call.apiVersion,
117117
credentials: credentials,
@@ -165,4 +165,4 @@ export async function handler(event: AWSLambda.CloudFormationCustomResourceEvent
165165
console.log(e);
166166
await respond(event, 'FAILED', e.message || 'Internal Error', context.logStreamName, {});
167167
}
168-
}
168+
}

packages/aws-cdk-lib/custom-resources/lib/aws-custom-resource/sdk-api-metadata.json

+13-1
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,8 @@
974974
"name": "SagemakerEdge"
975975
},
976976
"amp": {
977-
"name": "Amp"
977+
"name": "Amp",
978+
"cors": true
978979
},
979980
"greengrassv2": {
980981
"name": "GreengrassV2"
@@ -1295,5 +1296,16 @@
12951296
},
12961297
"osis": {
12971298
"name": "OSIS"
1299+
},
1300+
"mediapackagev2": {
1301+
"name": "MediaPackageV2"
1302+
},
1303+
"paymentcryptography": {
1304+
"prefix": "payment-cryptography",
1305+
"name": "PaymentCryptography"
1306+
},
1307+
"paymentcryptographydata": {
1308+
"prefix": "payment-cryptography-data",
1309+
"name": "PaymentCryptographyData"
12981310
}
12991311
}

packages/aws-cdk-lib/custom-resources/test/aws-custom-resource/runtime/aws-sdk-v3-handler.test.ts

+1-6
Original file line numberDiff line numberDiff line change
@@ -530,11 +530,6 @@ test('SDK credentials are not persisted across subsequent invocations', async ()
530530
StackId: 'stackId',
531531
}, {} as AWSLambda.Context);
532532
expect(credentialProviderMock).not.toBeCalled();
533-
534-
// THEN
535-
expect(await s3MockClient.call(0).thisValue.config.credentials()).not.toBe(mockCreds);
536-
expect(await s3MockClient.call(1).thisValue.config.credentials()).toBe(mockCreds);
537-
expect(await s3MockClient.call(2).thisValue.config.credentials()).not.toBe(mockCreds);
538533
});
539534

540535
test('Being able to call the AWS SDK v2 format', async () => {
@@ -627,4 +622,4 @@ test('invalid v2 service name throws explicit error', async () => {
627622
await handler(event, {} as AWSLambda.Context);
628623

629624
expect(request.isDone()).toBeTruthy();
630-
});
625+
});

packages/aws-cdk-lib/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -137,15 +137,15 @@
137137
"@aws-cdk/cfn2ts": "0.0.0",
138138
"@aws-cdk/cfnspec": "0.0.0",
139139
"@aws-cdk/pkglint": "0.0.0",
140-
"@aws-sdk/client-s3": "^3.321.1",
141-
"@aws-sdk/credential-providers": "^3.321.1",
140+
"@aws-sdk/client-s3": "^3.350.0",
141+
"@aws-sdk/credential-providers": "^3.350.0",
142142
"@types/aws-lambda": "^8.10.115",
143143
"@types/jest": "^29.5.1",
144144
"@types/lodash": "^4.14.194",
145145
"@types/punycode": "^2.1.0",
146146
"aws-sdk": "^2.1379.0",
147147
"aws-sdk-client-mock": "^2.1.1",
148-
"aws-sdk-mock": "5.6.0",
148+
"aws-sdk-mock": "5.8.0",
149149
"cdk8s": "^2.7.68",
150150
"constructs": "^10.0.0",
151151
"delay": "5.0.0",

packages/aws-cdk/THIRD_PARTY_LICENSES

+2-2
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH RE
268268

269269
----------------
270270

271-
** aws-sdk@2.1379.0 - https://www.npmjs.com/package/aws-sdk/v/2.1379.0 | Apache-2.0
271+
** aws-sdk@2.1396.0 - https://www.npmjs.com/package/aws-sdk/v/2.1396.0 | Apache-2.0
272272
AWS SDK for JavaScript
273273
Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
274274

@@ -3402,7 +3402,7 @@ SOFTWARE.
34023402

34033403
----------------
34043404

3405-
** [email protected].0 - https://www.npmjs.com/package/tslib/v/2.5.0 | 0BSD
3405+
** [email protected].3 - https://www.npmjs.com/package/tslib/v/2.5.3 | 0BSD
34063406
Copyright (c) Microsoft Corporation.
34073407

34083408
Permission to use, copy, modify, and/or distribute this software for any

tools/@aws-cdk/yarn-cling/lib/types.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ export interface YarnLock {
1818

1919
export interface ResolvedYarnPackage {
2020
version: string;
21-
resolved: string;
22-
integrity: string;
21+
resolved?: string;
22+
integrity?: string;
2323

2424
/**
2525
* Dependency name to version range
2626
*/
27-
dependencies: Record<string, string>;
27+
dependencies?: Record<string, string>;
2828
}
2929

3030
export interface PackageLock extends PackageLockEntry {
@@ -55,4 +55,4 @@ export interface PackageLockPackage extends PackageLockEntry {
5555
bundled?: boolean;
5656
dev?: boolean;
5757
optional?: boolean;
58-
}
58+
}

0 commit comments

Comments
 (0)