Files
SkyMoney/api/vitest.security.config.ts
Ricearoni1245 15e0c0a88a
Some checks failed
Deploy / deploy (push) Successful in 1m28s
Security Tests / security-non-db (push) Failing after 18s
Security Tests / security-db (push) Failing after 22s
feat: implement forgot password, added security updates
2026-03-01 21:47:15 -06:00

40 lines
1.3 KiB
TypeScript

import { defineConfig } from "vitest/config";
const dbSecurityTestsEnabled = process.env.SECURITY_DB_TESTS === "1";
const baseSecurityTests = [
"tests/security-misconfiguration.test.ts",
"tests/software-supply-chain-failures.test.ts",
"tests/cryptographic-failures.test.ts",
"tests/cryptographic-failures.runtime.test.ts",
"tests/injection-safety.test.ts",
"tests/software-data-integrity-failures.test.ts",
"tests/security-logging-monitoring-failures.test.ts",
"tests/server-side-request-forgery.test.ts",
];
const dbSecurityTests = [
"tests/insecure-design.test.ts",
"tests/identification-auth-failures.test.ts",
"tests/forgot-password.security.test.ts",
];
export default defineConfig({
test: {
environment: "node",
include: dbSecurityTestsEnabled
? [...baseSecurityTests, ...dbSecurityTests]
: baseSecurityTests,
pool: "threads",
poolOptions: { threads: { singleThread: true } },
testTimeout: 30_000,
setupFiles: dbSecurityTestsEnabled ? ["tests/setup.ts"] : [],
env: {
NODE_ENV: "test",
DATABASE_URL: "postgres://app:app@127.0.0.1:5432/skymoney",
AUTH_DISABLED: "1",
SEED_DEFAULT_BUDGET: "1",
JWT_SECRET: "test-jwt-secret-32-chars-min-abcdef",
COOKIE_SECRET: "test-cookie-secret-32-chars-abcdef",
},
},
});