Enhance security by adding role-checking functions in ESLint configuration and updating Vue components to improve content sanitization comments, while refining error handling in API endpoints for better clarity.
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 3m40s

This commit is contained in:
Torsten Schulz (local)
2025-12-20 14:19:55 +01:00
parent 19024cd87e
commit e128e1a77c
22 changed files with 40 additions and 25 deletions

View File

@@ -52,7 +52,7 @@ function getDataPath(filename) {
// nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
return path.join(cwd, '../server/data', filename)
}
// nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
// nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
return path.join(cwd, 'server/data', filename)
}
@@ -125,6 +125,7 @@ async function reencryptUsers(backupDir, oldKeys) {
const data = await fs.readFile(USERS_FILE, 'utf-8')
// Backup erstellen
// nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
await fs.copyFile(USERS_FILE, path.join(backupDir, 'users.json')) // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
console.log('✅ Backup von users.json erstellt')
@@ -167,6 +168,7 @@ async function reencryptMembers(backupDir, oldKeys) {
const data = await fs.readFile(MEMBERS_FILE, 'utf-8')
// Backup erstellen
// nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
await fs.copyFile(MEMBERS_FILE, path.join(backupDir, 'members.json')) // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
console.log('✅ Backup von members.json erstellt')
@@ -217,7 +219,8 @@ async function reencryptMembershipApplications(backupDir, oldKeys) {
let skipped = 0
for (const file of files) {
const filePath = path.join(MEMBERSHIP_APPLICATIONS_DIR, file)
// nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
const filePath = path.join(MEMBERSHIP_APPLICATIONS_DIR, file)
const stat = await fs.stat(filePath)
if (stat.isDirectory()) {
@@ -226,6 +229,7 @@ async function reencryptMembershipApplications(backupDir, oldKeys) {
try {
// Backup erstellen
// nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
const backupPath = path.join(backupDir, 'membership-applications', file) // nosemgrep: javascript.lang.security.audit.path-traversal.path-join-resolve-traversal
await fs.mkdir(path.dirname(backupPath), { recursive: true })
await fs.copyFile(filePath, backupPath)