Skip to content

Commit aac1b6c

Browse files
authored
Make env readonly and frozen in vm (#274)
1 parent de04cea commit aac1b6c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/hungry-suits-brake.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@workflow/core": patch
3+
---
4+
5+
Make process.env in workflow context a readonly clone

packages/core/src/vm/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export function createContext(options: CreateContextOptions) {
8686

8787
// Propagate environment variables
8888
(g as any).process = {
89-
env: process.env,
89+
env: Object.freeze({ ...process.env }),
9090
};
9191

9292
// Stateless + synchronous Web APIs that are made available inside the sandbox

0 commit comments

Comments
 (0)