Enhance security by adding DOMPurify comments in Vue components and updating path handling comments in server utilities to mitigate path traversal risks.
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 46s

This commit is contained in:
Torsten Schulz (local)
2025-12-20 11:15:31 +01:00
parent 968c749fe3
commit 19024cd87e
45 changed files with 129 additions and 46 deletions

View File

@@ -41,6 +41,7 @@ export default defineEventHandler(async (event) => {
const semicolonCount = (firstLine.match(/;/g) || []).length
const delimiter = tabCount > semicolonCount ? '\t' : ';'
// nosemgrep: javascript.lang.security.audit.unsafe-formatstring.unsafe-formatstring
console.log(`Verwendetes Trennzeichen: ${delimiter === '\t' ? 'Tab' : 'Semikolon'}`)
const headers = firstLine.split(delimiter)
@@ -212,6 +213,7 @@ export default defineEventHandler(async (event) => {
// Debug: Zeige Halle-Daten für erste paar Zeilen
if (index < 3) {
// nosemgrep: javascript.lang.security.audit.unsafe-formatstring.unsafe-formatstring
console.log(`Zeile ${index}: HalleName="${halleName}", HalleStrasse="${halleStrasse}", HallePLZ="${hallePLZ}", HalleOrt="${halleOrt}", HeimMannschaft="${heimMannschaft}"`)
}
@@ -359,9 +361,7 @@ ${hallenListe.map(halle => {
// Verzeichnis existiert bereits
}
// nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
// team is validated against allowlist, Date.now() is safe, path traversal prevented
const tempTexFile = path.join(tempDir, `spielplan_${team}_${Date.now()}.tex`)
const tempTexFile = path.join(tempDir, `spielplan_${team}_${Date.now()}.tex`) // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
await fs.writeFile(tempTexFile, latexContent, 'utf-8')
// Kompiliere LaTeX zu PDF