Skip to content

Commit 1408526

Browse files
fix(fe): Security mitigation for CVE-2024-45811
1 parent fd9342b commit 1408526

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

frontend/vite.config.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,15 @@ export default defineConfig(({ command, mode }) => {
9999
"**/reports*/**", // Ignore reports directory
100100
],
101101
},
102+
fs: {
103+
// Security mitigation for CVE-2024-45811: server.fs.deny bypass on Windows alternate paths
104+
deny: ['.env', '.env.*', '*.pem', '.key', '.git', 'node_modules', '/'],
105+
allow: [
106+
fileURLToPath(new URL('./src', import.meta.url)),
107+
fileURLToPath(new URL('./public', import.meta.url)),
108+
fileURLToPath(new URL('./index.html', import.meta.url)),
109+
],
110+
},
102111
},
103112
};
104113
});

0 commit comments

Comments
 (0)