fix(security): resolve all critical, high, and medium security vulnerabilities
Deploy Canina / deploy (push) Waiting to run
E2E Playwright Tests / Run Full E2E & Security Suites (push) Failing after 11s

This commit is contained in:
parsa committed 2026-09-23 22:05:12 +03:30
1 parent da26dd1c8d
commit dc88677169
33 files changed
+438 -85

No files matched your search

+13
View File
@@ -52,5 +52,18 @@ export function validateEnv(config: Record<string, unknown>) {
throw new Error(`Environment Validation Error: ${messages}`);
}
if (validatedConfig.NODE_ENV === 'production') {
if (!validatedConfig.JWT_ACCESS_SECRET) {
throw new Error(
'Environment Validation Error: JWT_ACCESS_SECRET is strictly required in production!',
);
}
if (!validatedConfig.JWT_REFRESH_SECRET) {
throw new Error(
'Environment Validation Error: JWT_REFRESH_SECRET is strictly required in production!',
);
}
}
return validatedConfig;
}