Skip to content

Commit c6f8c77

Browse files
authored
Update to version 6.2.6 (#554)
1 parent 9375a0a commit c6f8c77

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1259
-396
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
# dependencies
1212
**/node_modules
13+
**/modules
1314

1415
# test assets
1516
**/coverage

CHANGELOG.md

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,44 @@ 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-
## [6.2.5] - 2024-01-12
8+
## [6.2.6] - 2024-06-27
9+
10+
### Added
11+
- StackId tag to CloudFrontLoggingBucket and its bucket name as a CfnOutput [#529](https://github.com/aws-solutions/serverless-image-handler/issues/529)
12+
- Test case to verify UTF-8 support in object key [#320](https://github.com/aws-solutions/serverless-image-handler/pull/320)
13+
- Test cases to verify crop functionality [#459](https://github.com/aws-solutions/serverless-image-handler/pull/459)
14+
- VERSION.txt and build script change to auto-update local package versions
15+
- S3:bucket-name tag for defining which source bucket to use in thumbor style requests [#521](https://github.com/aws-solutions/serverless-image-handler/pull/521)
16+
- Ability to override whether an image should be animated [#456](https://github.com/aws-solutions/serverless-image-handler/issues/456)
17+
- Support for 8-bit depth AVIF image type inference [#360](https://github.com/aws-solutions/serverless-image-handler/issues/360)
18+
19+
### Changed
20+
- Decreased permissions allotted to CustomResource Lambda and ImageHandler Lambda
21+
- cdk update to 2.124.0
22+
- aws-solutions-constructs update to 2.51.0
23+
- SourceBucketsParameter to require explicit bucket names
24+
- Demo-ui dependency update
25+
- Demo-ui to be a package and manage script/stylesheet dependencies through NPM
26+
- Modified JPEG SOI marker parsing to only check first 2 bytes [#429]
27+
28+
### Security
29+
- Upgraded follow-redirects to v1.15.6 for vulnerability CVE-2024-28849
30+
- Upgraded braces to v3.0.3 for vulnerability CVE-2024-4068
31+
32+
### Removed
33+
- Unused CopyS3Assets custom resource
34+
35+
### Fixed
36+
- Some error messages indicating incorrect file types
37+
- Solution version and id not being passed to Backend Lambda
38+
- Thumbor-style URL matching being overly permissive
39+
40+
41+
## [6.2.5] - 2024-01-03
942

1043
### Fixed
1144

1245
- Ensure accurate image metadata when generating Amazon Rekognition compatible images [#374](https://github.com/aws-solutions/serverless-image-handler/issues/374)
13-
- Upgraded axios to v1.6.5 for vulnerability CVE-2023-26159
1446
- Exclude demo-ui-config from being deleted upon BucketDeployment update sync when updating to a new version
1547

1648
### Changed
@@ -20,6 +52,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2052
- typescript update to 5.3.3
2153
- GIF files without multiple pages are now treated as non-animated, allowing all filters to be used on them [#460](https://github.com/aws-solutions/serverless-image-handler/issues/460)
2254

55+
### Security
56+
57+
- Upgraded axios to v1.6.5 for vulnerability CVE-2023-26159
58+
2359
## [6.2.4] - 2023-12-06
2460

2561
### Changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ This solution collects anonymous operational metrics to help AWS improve the qua
105105
- [@Fjool](https://github.com/Fjool) for [#489](https://github.com/aws-solutions/serverless-image-handler/pull/489)
106106
- [@fvsnippets](https://github.com/fvsnippets) for [#373](https://github.com/aws-solutions/serverless-image-handler/pull/373), [#380](https://github.com/aws-solutions/serverless-image-handler/pull/380)
107107
- [@ccchapman](https://github.com/ccchapman) for [#490](https://github.com/aws-solutions/serverless-image-handler/pull/490)
108+
- [@bennet-esyoil][https://github.com/bennet-esyoil] for [#521](https://github.com/aws-solutions/serverless-image-handler/pull/521)
109+
- [@vaniyokk][https://github.com/vaniyokk] for [#511](https://github.com/aws-solutions/serverless-image-handler/pull/511)
108110

109111
# License
110112

VERSION.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
6.2.6

deployment/build-s3-dist.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ mkdir -p "$template_dist_dir"
3232
rm -rf "$build_dist_dir"
3333
mkdir -p "$build_dist_dir"
3434

35+
headline "[Init] Ensure package versions are updated"
36+
npm --prefix "$source_dir" run bump-version
37+
3538
headline "[Build] Synthesize cdk template and assets"
3639
cd "$cdk_source_dir"
3740
npm run clean:install

deployment/cdk-solution-helper/package-lock.json

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deployment/cdk-solution-helper/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
"dependencies": {
2424
"adm-zip": "^0.5.10",
25-
"aws-cdk-lib": "^2.118.0"
25+
"aws-cdk-lib": "^2.124.0"
2626
},
2727
"overrides": {
2828
"semver": "7.5.4"

source/constructs/bin/constructs.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@ if (DIST_OUTPUT_BUCKET && SOLUTION_NAME && VERSION)
2020

2121
const app = new App();
2222
const solutionDisplayName = "Serverless Image Handler";
23-
const description = `(${app.node.tryGetContext("solutionId")}) - ${solutionDisplayName}. Version ${VERSION ?? app.node.tryGetContext("solutionVersion")}`;
23+
const solutionVersion = VERSION ?? app.node.tryGetContext("solutionVersion");
24+
const description = `(${app.node.tryGetContext("solutionId")}) - ${solutionDisplayName}. Version ${solutionVersion}`;
2425
// eslint-disable-next-line no-new
2526
new ServerlessImageHandlerStack(app, "ServerlessImageHandlerStack", {
26-
synthesizer: synthesizer,
27-
description: description,
27+
synthesizer,
28+
description,
2829
solutionId: app.node.tryGetContext("solutionId"),
29-
solutionVersion: app.node.tryGetContext("solutionVersion"),
30+
solutionVersion,
3031
solutionName: app.node.tryGetContext("solutionName"),
3132
});

source/constructs/cdk.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"app": "npx ts-node --prefer-ts-exts bin/constructs.ts",
33
"context": {
44
"solutionId": "SO0023",
5-
"solutionVersion": "custom-v6.2.5",
5+
"solutionVersion": "custom-v6.2.6",
66
"solutionName": "serverless-image-handler"
77
}
88
}

source/constructs/lib/back-end/back-end-construct.ts

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@ import * as api from "aws-cdk-lib/aws-apigateway";
3131

3232
export interface BackEndProps extends SolutionConstructProps {
3333
readonly solutionVersion: string;
34+
readonly solutionId: string;
3435
readonly solutionName: string;
3536
readonly secretsManagerPolicy: Policy;
3637
readonly logsBucket: IBucket;
3738
readonly uuid: string;
3839
readonly cloudFrontPriceClass: string;
40+
readonly createSourceBucketsResource: (key?: string) => string[];
3941
}
4042

4143
export class BackEnd extends Construct {
@@ -64,15 +66,16 @@ export class BackEnd extends Construct {
6466
],
6567
}),
6668
new PolicyStatement({
67-
actions: ["s3:GetObject", "s3:PutObject", "s3:ListBucket"],
68-
resources: [
69-
Stack.of(this).formatArn({
70-
service: "s3",
71-
resource: "*",
72-
region: "",
73-
account: "",
74-
}),
75-
],
69+
actions: ["s3:GetObject"],
70+
resources: props.createSourceBucketsResource("/*"),
71+
}),
72+
new PolicyStatement({
73+
actions: ["s3:ListBucket"],
74+
resources: props.createSourceBucketsResource(),
75+
}),
76+
new PolicyStatement({
77+
actions: ["s3:GetObject"],
78+
resources: [`arn:aws:s3:::${props.fallbackImageS3Bucket}/${props.fallbackImageS3KeyBucket}`],
7679
}),
7780
new PolicyStatement({
7881
actions: ["rekognition:DetectFaces", "rekognition:DetectModerationLabels"],
@@ -106,6 +109,8 @@ export class BackEnd extends Construct {
106109
ENABLE_DEFAULT_FALLBACK_IMAGE: props.enableDefaultFallbackImage,
107110
DEFAULT_FALLBACK_IMAGE_BUCKET: props.fallbackImageS3Bucket,
108111
DEFAULT_FALLBACK_IMAGE_KEY: props.fallbackImageS3KeyBucket,
112+
SOLUTION_VERSION: props.solutionVersion,
113+
SOLUTION_ID: props.solutionId,
109114
},
110115
bundling: {
111116
externalModules: ["sharp"],

0 commit comments

Comments
 (0)