Skip to content

fix: don't expose entire process.env to define#705

Merged
mikkojamG merged 1 commit into
mainfrom
fix/vite-define-process-env
Nov 5, 2025
Merged

fix: don't expose entire process.env to define#705
mikkojamG merged 1 commit into
mainfrom
fix/vite-define-process-env

Conversation

@mikkojamG

Copy link
Copy Markdown
Contributor

Description

Getting an error when building application:

The `define` option contains an object with "PATH" for "process.env" key. It looks like you may have passed the entire `process.env` object to `define`, which can unintentionally expose all environment variables. This poses a security risk and is discouraged.

Shouldn't expose the entire process.env to Vite define.

Context

jira-id

How Has This Been Tested?

Manual Testing Instructions for Reviewers

Screenshots

@sonarqubecloud

sonarqubecloud Bot commented Nov 3, 2025

Copy link
Copy Markdown

@terovirtanen

Copy link
Copy Markdown
Contributor

KUKKUU-UI branch is deployed to platta: https://kukkuu-ui-pr705.dev.hel.ninja 🚀🚀🚀

@terovirtanen

Copy link
Copy Markdown
Contributor

TestCafe result is success for https://kukkuu-ui-pr705.dev.hel.ninja 😆🎉🎉🎉

@mikkojamG mikkojamG changed the title [DRAFT] fix: don't expose entire process.env to define fix: don't expose entire process.env to define Nov 3, 2025
@mikkojamG mikkojamG marked this pull request as ready for review November 3, 2025 10:22
@mikkojamG mikkojamG requested a review from a team as a code owner November 3, 2025 10:22

@arpargo arpargo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mikkojamG mikkojamG merged commit 43b2a22 into main Nov 5, 2025
21 checks passed
@mikkojamG mikkojamG deleted the fix/vite-define-process-env branch November 5, 2025 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants