diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 4d249c34..4a4bbcf6 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -17,6 +17,7 @@ assignees: '' **Please complete the following information about the solution:** + - [ ] Version: [e.g. v1.0.0] - [ ] Region: [e.g. us-east-1] - [ ] Was the solution modified from the version published on this repository? diff --git a/CHANGELOG.md b/CHANGELOG.md index c2d12a74..7eb03de2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.1.2] - 2024-04-29 + +### Fixed + +- Upgrade formidable to resolve CVE +- Upgrade mysql2 to resolve CVE + ## [1.1.1] - 2024-04-18 ### Fixed diff --git a/makefiles/common_config.mk b/makefiles/common_config.mk index 18024643..ce066828 100644 --- a/makefiles/common_config.mk +++ b/makefiles/common_config.mk @@ -15,7 +15,7 @@ export AWS_REGION ?= ${DEFAULTS.AWS_REGION} # ======================================================== export SOLUTION_NAME ?= connected-mobility-solution-on-aws export SOLUTION_DESCRIPTION ?= Accelerate development and deployment of connected vehicle assets with purpose-built, deployment-ready accelerators, and an Automotive Cloud Developer Portal -export SOLUTION_VERSION ?= v1.1.1 +export SOLUTION_VERSION ?= v1.1.2 export SOLUTION_AUTHOR = AWS Industrial Solutions Team export SOLUTION_ID = SO0241 # Path is relative to this file's location, moving this file requires updating this path. diff --git a/source/lib/setup.py b/source/lib/setup.py index 53c5df7e..f4ffcbb1 100644 --- a/source/lib/setup.py +++ b/source/lib/setup.py @@ -49,7 +49,7 @@ def finalize_options(self) -> None: "toml>=0.10.2", ], name="cms_common", - version="1.1.1", + version="1.1.2", description="Common library used in CMS modules", packages=find_packages( exclude=[ diff --git a/source/modules/acdp/backstage/cdk/Makefile b/source/modules/acdp/backstage/cdk/Makefile index 7804aa57..57f29fe7 100644 --- a/source/modules/acdp/backstage/cdk/Makefile +++ b/source/modules/acdp/backstage/cdk/Makefile @@ -17,7 +17,7 @@ export AWS_REGION ?= ${DEFAULTS.AWS_REGION} # ======================================================== export SOLUTION_NAME ?= connected-mobility-solution-on-aws export SOLUTION_DESCRIPTION ?= Accelerate development and deployment of connected vehicle assets with purpose-built, deployment-ready accelerators, and an Automotive Cloud Developer Portal -export SOLUTION_VERSION ?= v1.1.1 +export SOLUTION_VERSION ?= v1.1.2 export SOLUTION_AUTHOR = AWS Industrial Solutions Team export SOLUTION_ID = SO0241 export APPLICATION_TYPE = AWS-Solutions diff --git a/source/modules/acdp/backstage/package.json b/source/modules/acdp/backstage/package.json index 335fe668..c7bab7e8 100644 --- a/source/modules/acdp/backstage/package.json +++ b/source/modules/acdp/backstage/package.json @@ -1,6 +1,6 @@ { "name": "acdp-backstage", - "version": "1.1.1", + "version": "1.1.2", "private": true, "license": "Apache-2.0", "description": "Backstage implementation preconfigured to work with CMS", @@ -44,7 +44,8 @@ "resolutions": { "@types/react": "^18", "@types/react-dom": "^18", - "mysql2": "^3.9.4" + "mysql2": "^3.9.7", + "formidable": "^3.2.4" }, "lint-staged": { "*.{js,jsx,ts,tsx,mjs,cjs}": [ diff --git a/source/modules/acdp/backstage/packages/app/package.json b/source/modules/acdp/backstage/packages/app/package.json index ea56dc82..a7f980e1 100644 --- a/source/modules/acdp/backstage/packages/app/package.json +++ b/source/modules/acdp/backstage/packages/app/package.json @@ -1,6 +1,6 @@ { "name": "app", - "version": "1.1.1", + "version": "1.1.2", "private": true, "bundled": true, "license": "Apache-2.0", diff --git a/source/modules/acdp/backstage/packages/backend/package.json b/source/modules/acdp/backstage/packages/backend/package.json index d63eeef7..38d8f7fe 100644 --- a/source/modules/acdp/backstage/packages/backend/package.json +++ b/source/modules/acdp/backstage/packages/backend/package.json @@ -1,6 +1,6 @@ { "name": "backend", - "version": "1.1.1", + "version": "1.1.2", "main": "dist/index.cjs.js", "types": "src/index.ts", "private": true, diff --git a/source/modules/acdp/backstage/plugins/acdp-backend/package.json b/source/modules/acdp/backstage/plugins/acdp-backend/package.json index fb7ac0d2..51387eeb 100644 --- a/source/modules/acdp/backstage/plugins/acdp-backend/package.json +++ b/source/modules/acdp/backstage/plugins/acdp-backend/package.json @@ -1,7 +1,7 @@ { "name": "backstage-plugin-acdp-backend", "description": "ACDP Backend plugin for Backstage", - "version": "1.1.1", + "version": "1.1.2", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/source/modules/acdp/backstage/plugins/acdp-backend/src/api/acdp-build-api.test.ts b/source/modules/acdp/backstage/plugins/acdp-backend/src/api/acdp-build-api.test.ts index 09e4051a..034abc78 100644 --- a/source/modules/acdp/backstage/plugins/acdp-backend/src/api/acdp-build-api.test.ts +++ b/source/modules/acdp/backstage/plugins/acdp-backend/src/api/acdp-build-api.test.ts @@ -55,7 +55,7 @@ function setupCommonBuildMocks() { { name: "CFN_TEMPLATE_URL", value: - "https://acdp-assets.s3.us-west-2.amazonaws.com/connected-mobility-solution-on-aws/v1.1.1/cms-sample/cms-sample.template", + "https://acdp-assets.s3.us-west-2.amazonaws.com/connected-mobility-solution-on-aws/v1.1.2/cms-sample/cms-sample.template", }, { name: "APP_UNIQUE_ID", value: "cms" }, ]), diff --git a/source/modules/acdp/backstage/plugins/acdp-backend/src/service/acdp-build-service.test.ts b/source/modules/acdp/backstage/plugins/acdp-backend/src/service/acdp-build-service.test.ts index 93e5c8f1..d5a97d68 100644 --- a/source/modules/acdp/backstage/plugins/acdp-backend/src/service/acdp-build-service.test.ts +++ b/source/modules/acdp/backstage/plugins/acdp-backend/src/service/acdp-build-service.test.ts @@ -61,7 +61,7 @@ function setupCommonBuildMocks() { { name: "CFN_TEMPLATE_URL", value: - "https://acdp-assets.s3.us-west-2.amazonaws.com/connected-mobility-solution-on-aws/v1.1.1/cms-sample/cms-sample.template", + "https://acdp-assets.s3.us-west-2.amazonaws.com/connected-mobility-solution-on-aws/v1.1.2/cms-sample/cms-sample.template", }, { name: "APP_UNIQUE_ID", value: "cms" }, ]), diff --git a/source/modules/acdp/backstage/plugins/acdp-backend/src/service/acdp-build-service.ts b/source/modules/acdp/backstage/plugins/acdp-backend/src/service/acdp-build-service.ts index f4b7a06a..250048ee 100644 --- a/source/modules/acdp/backstage/plugins/acdp-backend/src/service/acdp-build-service.ts +++ b/source/modules/acdp/backstage/plugins/acdp-backend/src/service/acdp-build-service.ts @@ -483,6 +483,7 @@ function removeUrlPrefix(input: string): string { function getCodeBuildSourceTypeForUrl(url: string): SourceType { const githubPattern = /^https?:\/\/(www\.)?github\.com\/.+\/.+$/; + //NOSONAR const s3Pattern = /^https?:\/\/s3[\.-](?:[a-z0-9-]+)\.amazonaws\.com\/.+|https?:\/\/[a-z0-9-]+\.s3[\.-](?:[a-z0-9-]+)\.amazonaws\.com\/.+/; diff --git a/source/modules/acdp/backstage/plugins/acdp-backend/src/utils/aws-s3-helper.ts b/source/modules/acdp/backstage/plugins/acdp-backend/src/utils/aws-s3-helper.ts index 60eb438f..c03f2abd 100644 --- a/source/modules/acdp/backstage/plugins/acdp-backend/src/utils/aws-s3-helper.ts +++ b/source/modules/acdp/backstage/plugins/acdp-backend/src/utils/aws-s3-helper.ts @@ -14,7 +14,6 @@ import { Upload } from "@aws-sdk/lib-storage"; import { Logger } from "winston"; import createLimiter from "p-limit"; import recursiveReadDir from "recursive-readdir"; -import platformPath from "path"; import path from "path"; import fs from "fs"; import { Entity, DEFAULT_NAMESPACE } from "@backstage/catalog-model"; @@ -81,8 +80,6 @@ export class AwsS3Helper { localDirectoryPath: string, s3Prefix: string, ) { - const objects: string[] = []; - try { const fileList = await recursiveReadDir(localDirectoryPath).catch( (error: Error) => { @@ -94,7 +91,7 @@ export class AwsS3Helper { await bulkStorageOperation( async (absoluteFilePath: string) => { - const relativeFilePath = platformPath.relative( + const relativeFilePath = path.relative( localDirectoryPath, absoluteFilePath, ); @@ -107,8 +104,6 @@ export class AwsS3Helper { ...(this.sse && { ServerSideEncryption: this.sse }), }; - objects.push(params.Key!); - const upload = new Upload({ client: this.s3Client, params, diff --git a/source/modules/acdp/backstage/plugins/acdp-backend/src/utils/validators.ts b/source/modules/acdp/backstage/plugins/acdp-backend/src/utils/validators.ts index 34ce0362..b3138ba7 100644 --- a/source/modules/acdp/backstage/plugins/acdp-backend/src/utils/validators.ts +++ b/source/modules/acdp/backstage/plugins/acdp-backend/src/utils/validators.ts @@ -4,6 +4,7 @@ import { AcdpBuildAction } from "backstage-plugin-acdp-common"; import { z } from "zod"; +//NOSONAR export const startBuildInputSchema = z.object({ entityRef: z .string() diff --git a/source/modules/acdp/backstage/plugins/acdp-common/package.json b/source/modules/acdp/backstage/plugins/acdp-common/package.json index 06cd640f..67451d84 100644 --- a/source/modules/acdp/backstage/plugins/acdp-common/package.json +++ b/source/modules/acdp/backstage/plugins/acdp-common/package.json @@ -1,7 +1,7 @@ { "name": "backstage-plugin-acdp-common", "description": "Common interfaces for ACDP plugins", - "version": "1.1.1", + "version": "1.1.2", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/source/modules/acdp/backstage/plugins/acdp/package.json b/source/modules/acdp/backstage/plugins/acdp/package.json index 54e15705..8fc34bbd 100644 --- a/source/modules/acdp/backstage/plugins/acdp/package.json +++ b/source/modules/acdp/backstage/plugins/acdp/package.json @@ -1,7 +1,7 @@ { "name": "backstage-plugin-acdp", "description": "ACDP plugin for Backstage", - "version": "1.1.1", + "version": "1.1.2", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", diff --git a/source/modules/acdp/backstage/plugins/acdp/src/components/CodeBuildWidget/TeardownConfirmDialog/TeardownConfirmDialog.tsx b/source/modules/acdp/backstage/plugins/acdp/src/components/CodeBuildWidget/TeardownConfirmDialog/TeardownConfirmDialog.tsx index b64654a0..0a9acf66 100644 --- a/source/modules/acdp/backstage/plugins/acdp/src/components/CodeBuildWidget/TeardownConfirmDialog/TeardownConfirmDialog.tsx +++ b/source/modules/acdp/backstage/plugins/acdp/src/components/CodeBuildWidget/TeardownConfirmDialog/TeardownConfirmDialog.tsx @@ -76,6 +76,7 @@ const Contents = ({ [alertApi, onConfirm, state], ); + //NOSONAR const DialogActionsPanel = () => (