Skip to content

Commit

Permalink
chore: upgrading all apk packages to solve CVE-2024-2511 (#173)
Browse files Browse the repository at this point in the history
* chore: upgrading all apk packages to solve CVE-2024-2511

* fix import
  • Loading branch information
andreas-unleash authored Apr 18, 2024
1 parent 06a70c5 commit 566c9e8
Show file tree
Hide file tree
Showing 4 changed files with 250 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ RUN yarn install --production --frozen-lockfile --ignore-scripts --prefer-offlin

FROM node:18-alpine

# Update OpenSSL to address CVE-2023-6237
# Upgrade (addresses OpenSSL CVE-2023-6237 && CVE-2024-2511)
RUN apk update && \
apk upgrade openssl && \
apk upgrade && \
apk add tini && \
rm -rf /var/cache/apk/*

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,13 @@
"express": "^4.18.2",
"json-schema-to-ts": "^2.3.0",
"openapi-types": "^11.0.0",
"qs": "^6.9.7",
"type-is": "^1.6.18",
"unleash-client": "^5.5.2"
},
"devDependencies": {
"@apidevtools/swagger-parser": "10.1.0",
"@babel/core": "^7.17.10",
"@babel/core": "^7.24.4",
"@types/compression": "^1.7.2",
"@types/cors": "^2.8.12",
"@types/express": "^4.17.13",
Expand Down
4 changes: 2 additions & 2 deletions src/openapi/openapi-types.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import type { FromSchema } from 'json-schema-to-ts';
import type { FromSchema, JSONSchema7 } from 'json-schema-to-ts';

// Recursively remove readonly modifiers from properties.
type DeepMutable<T> = {
-readonly [P in keyof T]: DeepMutable<T[P]>;
};

// Create a type from a const schema object.
export type CreateSchemaType<T> = FromSchema<T>;
export type CreateSchemaType<T extends JSONSchema7> = FromSchema<T>;

// Create an OpenAPIV3.SchemaObject from a const schema object.
export const createSchemaObject = <T>(schema: T): DeepMutable<T> => schema;
Loading

0 comments on commit 566c9e8

Please sign in to comment.