Skip to content

Commit 2b567ac

Browse files
Merge pull request #4217 from bcgov/fix/next-runtime-env-vulnerability
fix: remove next-runtime-env to resolve vulnerability
2 parents 98badc6 + d5859b7 commit 2b567ac

4 files changed

Lines changed: 2 additions & 200 deletions

File tree

bciers/libs/components/src/layout/RootLayout.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import "@bciers/styles/globals.css";
22
import type { Metadata, Viewport } from "next";
33
import type { Session } from "next-auth";
4-
import { PublicEnvScript } from "next-runtime-env";
54
import ThemeProvider from "@mui/material/styles/ThemeProvider";
65
import CssBaseline from "@mui/material/CssBaseline";
76
import SessionProvider from "@bciers/components/auth/SessionProvider";
@@ -68,9 +67,7 @@ export default async function RootLayout({
6867
{
6968
//👇️ Used to mark the root element where Next.js will mount the client-side React application
7069
}
71-
<head>
72-
<PublicEnvScript />
73-
</head>
70+
<head></head>
7471
<body id="__next">
7572
<SessionProvider
7673
// 👇 Notice that the basePath to the auth management site

bciers/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@
8282
"mui-tel-input": "^6.0.1",
8383
"next": "16.1.5",
8484
"next-auth": "^5.0.0-beta.30",
85-
"next-runtime-env": "^3.3.0",
8685
"pg": "^8.11.3",
8786
"postcss": "8.4.38",
8887
"react": "^19.2.3",

bciers/yarn.lock

Lines changed: 1 addition & 194 deletions
Original file line numberDiff line numberDiff line change
@@ -1551,7 +1551,6 @@ __metadata:
15511551
mui-tel-input: "npm:^6.0.1"
15521552
next: "npm:16.1.5"
15531553
next-auth: "npm:^5.0.0-beta.30"
1554-
next-runtime-env: "npm:^3.3.0"
15551554
nx: "npm:22.3.1"
15561555
pg: "npm:^8.11.3"
15571556
playwright-core: "npm:1.57.0"
@@ -3138,13 +3137,6 @@ __metadata:
31383137
languageName: node
31393138
linkType: hard
31403139

3141-
"@next/env@npm:14.2.35":
3142-
version: 14.2.35
3143-
resolution: "@next/env@npm:14.2.35"
3144-
checksum: 10c0/e042f1771f91d4f69b296aa7f633df216464df5844e5e1ea46105b76b2e519093dff4b25df9a24576916811b65a7e896202b2540649af5aa54bd7f8b19d7b6ab
3145-
languageName: node
3146-
linkType: hard
3147-
31483140
"@next/env@npm:16.1.5":
31493141
version: 16.1.5
31503142
resolution: "@next/env@npm:16.1.5"
@@ -3161,118 +3153,55 @@ __metadata:
31613153
languageName: node
31623154
linkType: hard
31633155

3164-
"@next/swc-darwin-arm64@npm:14.2.33":
3165-
version: 14.2.33
3166-
resolution: "@next/swc-darwin-arm64@npm:14.2.33"
3167-
conditions: os=darwin & cpu=arm64
3168-
languageName: node
3169-
linkType: hard
3170-
31713156
"@next/swc-darwin-arm64@npm:16.1.5":
31723157
version: 16.1.5
31733158
resolution: "@next/swc-darwin-arm64@npm:16.1.5"
31743159
conditions: os=darwin & cpu=arm64
31753160
languageName: node
31763161
linkType: hard
31773162

3178-
"@next/swc-darwin-x64@npm:14.2.33":
3179-
version: 14.2.33
3180-
resolution: "@next/swc-darwin-x64@npm:14.2.33"
3181-
conditions: os=darwin & cpu=x64
3182-
languageName: node
3183-
linkType: hard
3184-
31853163
"@next/swc-darwin-x64@npm:16.1.5":
31863164
version: 16.1.5
31873165
resolution: "@next/swc-darwin-x64@npm:16.1.5"
31883166
conditions: os=darwin & cpu=x64
31893167
languageName: node
31903168
linkType: hard
31913169

3192-
"@next/swc-linux-arm64-gnu@npm:14.2.33":
3193-
version: 14.2.33
3194-
resolution: "@next/swc-linux-arm64-gnu@npm:14.2.33"
3195-
conditions: os=linux & cpu=arm64 & libc=glibc
3196-
languageName: node
3197-
linkType: hard
3198-
31993170
"@next/swc-linux-arm64-gnu@npm:16.1.5":
32003171
version: 16.1.5
32013172
resolution: "@next/swc-linux-arm64-gnu@npm:16.1.5"
32023173
conditions: os=linux & cpu=arm64 & libc=glibc
32033174
languageName: node
32043175
linkType: hard
32053176

3206-
"@next/swc-linux-arm64-musl@npm:14.2.33":
3207-
version: 14.2.33
3208-
resolution: "@next/swc-linux-arm64-musl@npm:14.2.33"
3209-
conditions: os=linux & cpu=arm64 & libc=musl
3210-
languageName: node
3211-
linkType: hard
3212-
32133177
"@next/swc-linux-arm64-musl@npm:16.1.5":
32143178
version: 16.1.5
32153179
resolution: "@next/swc-linux-arm64-musl@npm:16.1.5"
32163180
conditions: os=linux & cpu=arm64 & libc=musl
32173181
languageName: node
32183182
linkType: hard
32193183

3220-
"@next/swc-linux-x64-gnu@npm:14.2.33":
3221-
version: 14.2.33
3222-
resolution: "@next/swc-linux-x64-gnu@npm:14.2.33"
3223-
conditions: os=linux & cpu=x64 & libc=glibc
3224-
languageName: node
3225-
linkType: hard
3226-
32273184
"@next/swc-linux-x64-gnu@npm:16.1.5":
32283185
version: 16.1.5
32293186
resolution: "@next/swc-linux-x64-gnu@npm:16.1.5"
32303187
conditions: os=linux & cpu=x64 & libc=glibc
32313188
languageName: node
32323189
linkType: hard
32333190

3234-
"@next/swc-linux-x64-musl@npm:14.2.33":
3235-
version: 14.2.33
3236-
resolution: "@next/swc-linux-x64-musl@npm:14.2.33"
3237-
conditions: os=linux & cpu=x64 & libc=musl
3238-
languageName: node
3239-
linkType: hard
3240-
32413191
"@next/swc-linux-x64-musl@npm:16.1.5":
32423192
version: 16.1.5
32433193
resolution: "@next/swc-linux-x64-musl@npm:16.1.5"
32443194
conditions: os=linux & cpu=x64 & libc=musl
32453195
languageName: node
32463196
linkType: hard
32473197

3248-
"@next/swc-win32-arm64-msvc@npm:14.2.33":
3249-
version: 14.2.33
3250-
resolution: "@next/swc-win32-arm64-msvc@npm:14.2.33"
3251-
conditions: os=win32 & cpu=arm64
3252-
languageName: node
3253-
linkType: hard
3254-
32553198
"@next/swc-win32-arm64-msvc@npm:16.1.5":
32563199
version: 16.1.5
32573200
resolution: "@next/swc-win32-arm64-msvc@npm:16.1.5"
32583201
conditions: os=win32 & cpu=arm64
32593202
languageName: node
32603203
linkType: hard
32613204

3262-
"@next/swc-win32-ia32-msvc@npm:14.2.33":
3263-
version: 14.2.33
3264-
resolution: "@next/swc-win32-ia32-msvc@npm:14.2.33"
3265-
conditions: os=win32 & cpu=ia32
3266-
languageName: node
3267-
linkType: hard
3268-
3269-
"@next/swc-win32-x64-msvc@npm:14.2.33":
3270-
version: 14.2.33
3271-
resolution: "@next/swc-win32-x64-msvc@npm:14.2.33"
3272-
conditions: os=win32 & cpu=x64
3273-
languageName: node
3274-
linkType: hard
3275-
32763205
"@next/swc-win32-x64-msvc@npm:16.1.5":
32773206
version: 16.1.5
32783207
resolution: "@next/swc-win32-x64-msvc@npm:16.1.5"
@@ -5804,16 +5733,6 @@ __metadata:
58045733
languageName: node
58055734
linkType: hard
58065735

5807-
"@swc/helpers@npm:0.5.5":
5808-
version: 0.5.5
5809-
resolution: "@swc/helpers@npm:0.5.5"
5810-
dependencies:
5811-
"@swc/counter": "npm:^0.1.3"
5812-
tslib: "npm:^2.4.0"
5813-
checksum: 10c0/21a9b9cfe7e00865f9c9f3eb4c1cc5b397143464f7abee76a2c5366e591e06b0155b5aac93fe8269ef8d548df253f6fd931e9ddfc0fd12efd405f90f45506e7d
5814-
languageName: node
5815-
linkType: hard
5816-
58175736
"@swc/helpers@npm:~0.5.11":
58185737
version: 0.5.17
58195738
resolution: "@swc/helpers@npm:0.5.17"
@@ -7881,15 +7800,6 @@ __metadata:
78817800
languageName: node
78827801
linkType: hard
78837802

7884-
"busboy@npm:1.6.0":
7885-
version: 1.6.0
7886-
resolution: "busboy@npm:1.6.0"
7887-
dependencies:
7888-
streamsearch: "npm:^1.1.0"
7889-
checksum: 10c0/fa7e836a2b82699b6e074393428b91ae579d4f9e21f5ac468e1b459a244341d722d2d22d10920cdd849743dbece6dca11d72de939fb75a7448825cf2babfba1f
7890-
languageName: node
7891-
linkType: hard
7892-
78937803
"bytes@npm:3.0.0":
78947804
version: 3.0.0
78957805
resolution: "bytes@npm:3.0.0"
@@ -12656,7 +12566,7 @@ __metadata:
1265612566
languageName: node
1265712567
linkType: hard
1265812568

12659-
"loose-envify@npm:^1.1.0, loose-envify@npm:^1.4.0":
12569+
"loose-envify@npm:^1.4.0":
1266012570
version: 1.4.0
1266112571
resolution: "loose-envify@npm:1.4.0"
1266212572
dependencies:
@@ -13275,19 +13185,6 @@ __metadata:
1327513185
languageName: node
1327613186
linkType: hard
1327713187

13278-
"next-runtime-env@npm:^3.3.0":
13279-
version: 3.3.0
13280-
resolution: "next-runtime-env@npm:3.3.0"
13281-
dependencies:
13282-
next: "npm:^14"
13283-
react: "npm:^18"
13284-
peerDependencies:
13285-
next: ^14
13286-
react: ^18
13287-
checksum: 10c0/7e59dfd138badc7925cd3f42ff826d7121f8e53399957f61906d1e10957a855b1f21f750984431cb448c9371f400170898e5e3125beef58ac7e9d1b74e073a87
13288-
languageName: node
13289-
linkType: hard
13290-
1329113188
"next@npm:16.1.5":
1329213189
version: 16.1.5
1329313190
resolution: "next@npm:16.1.5"
@@ -13348,64 +13245,6 @@ __metadata:
1334813245
languageName: node
1334913246
linkType: hard
1335013247

13351-
"next@npm:^14":
13352-
version: 14.2.35
13353-
resolution: "next@npm:14.2.35"
13354-
dependencies:
13355-
"@next/env": "npm:14.2.35"
13356-
"@next/swc-darwin-arm64": "npm:14.2.33"
13357-
"@next/swc-darwin-x64": "npm:14.2.33"
13358-
"@next/swc-linux-arm64-gnu": "npm:14.2.33"
13359-
"@next/swc-linux-arm64-musl": "npm:14.2.33"
13360-
"@next/swc-linux-x64-gnu": "npm:14.2.33"
13361-
"@next/swc-linux-x64-musl": "npm:14.2.33"
13362-
"@next/swc-win32-arm64-msvc": "npm:14.2.33"
13363-
"@next/swc-win32-ia32-msvc": "npm:14.2.33"
13364-
"@next/swc-win32-x64-msvc": "npm:14.2.33"
13365-
"@swc/helpers": "npm:0.5.5"
13366-
busboy: "npm:1.6.0"
13367-
caniuse-lite: "npm:^1.0.30001579"
13368-
graceful-fs: "npm:^4.2.11"
13369-
postcss: "npm:8.4.31"
13370-
styled-jsx: "npm:5.1.1"
13371-
peerDependencies:
13372-
"@opentelemetry/api": ^1.1.0
13373-
"@playwright/test": ^1.41.2
13374-
react: ^18.2.0
13375-
react-dom: ^18.2.0
13376-
sass: ^1.3.0
13377-
dependenciesMeta:
13378-
"@next/swc-darwin-arm64":
13379-
optional: true
13380-
"@next/swc-darwin-x64":
13381-
optional: true
13382-
"@next/swc-linux-arm64-gnu":
13383-
optional: true
13384-
"@next/swc-linux-arm64-musl":
13385-
optional: true
13386-
"@next/swc-linux-x64-gnu":
13387-
optional: true
13388-
"@next/swc-linux-x64-musl":
13389-
optional: true
13390-
"@next/swc-win32-arm64-msvc":
13391-
optional: true
13392-
"@next/swc-win32-ia32-msvc":
13393-
optional: true
13394-
"@next/swc-win32-x64-msvc":
13395-
optional: true
13396-
peerDependenciesMeta:
13397-
"@opentelemetry/api":
13398-
optional: true
13399-
"@playwright/test":
13400-
optional: true
13401-
sass:
13402-
optional: true
13403-
bin:
13404-
next: dist/bin/next
13405-
checksum: 10c0/5b1eadd554cd2cb1f030335d71a9363d16d86453f60a2331333887804c8b4b04a16fcb1ddb58229b792b6c365dbd0fafd9ccacd727c85134101a124bd6b4c06a
13406-
languageName: node
13407-
linkType: hard
13408-
1340913248
"no-case@npm:^3.0.4":
1341013249
version: 3.0.4
1341113250
resolution: "no-case@npm:3.0.4"
@@ -15532,15 +15371,6 @@ __metadata:
1553215371
languageName: node
1553315372
linkType: hard
1553415373

15535-
"react@npm:^18":
15536-
version: 18.3.1
15537-
resolution: "react@npm:18.3.1"
15538-
dependencies:
15539-
loose-envify: "npm:^1.1.0"
15540-
checksum: 10c0/283e8c5efcf37802c9d1ce767f302dd569dd97a70d9bb8c7be79a789b9902451e0d16334b05d73299b20f048cbc3c7d288bbbde10b701fa194e2089c237dbea3
15541-
languageName: node
15542-
linkType: hard
15543-
1554415374
"react@npm:^19.2.3":
1554515375
version: 19.2.3
1554615376
resolution: "react@npm:19.2.3"
@@ -17060,13 +16890,6 @@ __metadata:
1706016890
languageName: node
1706116891
linkType: hard
1706216892

17063-
"streamsearch@npm:^1.1.0":
17064-
version: 1.1.0
17065-
resolution: "streamsearch@npm:1.1.0"
17066-
checksum: 10c0/fbd9aecc2621364384d157f7e59426f4bfd385e8b424b5aaa79c83a6f5a1c8fd2e4e3289e95de1eb3511cb96bb333d6281a9919fafce760e4edb35b2cd2facab
17067-
languageName: node
17068-
linkType: hard
17069-
1707016893
"string-hash@npm:^1.1.1":
1707116894
version: 1.1.3
1707216895
resolution: "string-hash@npm:1.1.3"
@@ -17251,22 +17074,6 @@ __metadata:
1725117074
languageName: node
1725217075
linkType: hard
1725317076

17254-
"styled-jsx@npm:5.1.1":
17255-
version: 5.1.1
17256-
resolution: "styled-jsx@npm:5.1.1"
17257-
dependencies:
17258-
client-only: "npm:0.0.1"
17259-
peerDependencies:
17260-
react: ">= 16.8.0 || 17.x.x || ^18.0.0-0"
17261-
peerDependenciesMeta:
17262-
"@babel/core":
17263-
optional: true
17264-
babel-plugin-macros:
17265-
optional: true
17266-
checksum: 10c0/42655cdadfa5388f8a48bb282d6b450df7d7b8cf066ac37038bd0499d3c9f084815ebd9ff9dfa12a218fd4441338851db79603498d7557207009c1cf4d609835
17267-
languageName: node
17268-
linkType: hard
17269-
1727017077
"styled-jsx@npm:5.1.6":
1727117078
version: 5.1.6
1727217079
resolution: "styled-jsx@npm:5.1.6"

docs/frontend/growthbook.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import {
3232
GrowthBookProvider
3333
} from "@growthbook/growthbook-react";
3434
import { useMemo, useEffect, useState } from "react";
35-
import { env } from 'next-runtime-env';
3635

3736
const CLIENT_KEY = env('NEXT_PUBLIC_GROWTHBOOK_CLIENT_KEY')
3837
const growthbook_clientPage = new GrowthBook({

0 commit comments

Comments
 (0)