Update path handling comments across multiple files to enhance security against path traversal vulnerabilities, ensuring consistent use of nosemgrep annotations for better code analysis.
All checks were successful
Code Analysis (JS/Vue) / analyze (push) Successful in 3m19s

This commit is contained in:
Torsten Schulz (local)
2025-12-20 14:49:57 +01:00
parent e128e1a77c
commit c9037fec45
40 changed files with 159 additions and 140 deletions

View File

@@ -9,12 +9,12 @@ const getDataPath = (filename) => {
// In production (.output/server), working dir is .output
if (cwd.endsWith('.output')) {
// nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
// nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal
return path.join(cwd, '../public/data', filename)
}
// In development, working dir is project root
// nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
// nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal.path-join-resolve-traversal
return path.join(cwd, 'public/data', filename)
}