Security review — OWASP ASVS 4.0 (Level 2) checklist (Phase 14)
Date: 2026-10-13. Scope: API (apps/api), worker, dashboard, SDK endpoints, data layer. Each item is tied to evidence verified in the code (file/test); "partial"/"open" items are tracked before go-live in GO_LIVE_CHECKLIST.md.…
Date: 2026-10-13. Scope: API (apps/api), worker, dashboard, SDK endpoints, data layer. Each item is tied to evidence verified in
the code (file/test); "partial"/"open" items are tracked before go-live in GO_LIVE_CHECKLIST.md. An external pentest
is optional (plan 09 Phase 14) and uses this list as input.
Status: ✅ met · 🟡 partial/operational condition · ⬜ out of scope (v2)
V1 Architecture and design
| # | Control | Status | Evidence |
|---|---|---|---|
| 1.1 | Threat model and security requirements are documented | ✅ | docs/plan/08-guvenlik-ve-operasyon.md, ADR-0008 (key vault), ADR-0016 (SDK proof of ownership), ADR-0020 (quota/suspension) |
| 1.4 | Access control is enforced at a single point | ✅ | AuthGuard → RateLimitGuard → TenantGuard (APP_GUARD order, apps/api/src/app.module.ts); platform admin PlatformAdminGuard |
| 1.5 | Schema validation at input/output boundaries | ✅ | Zod DTOs (nestjs-zod), ZodValidationPipe on all body/query parameters; error envelope AppExceptionFilter |
| 1.9 | No secrets in code | ✅ | npm run ci:local secrets scan (1132+ files), .env.example contains placeholders only |
V2 Authentication
| # | Control | Status | Evidence |
|---|---|---|---|
| 2.1.1 | Password length/policy | ✅ | passwordIssues (packages/auth/src/password.ts): at least PASSWORD_MIN_LENGTH characters, at most 128, at least two character classes; AuthService.assertPasswordPolicy on sign-up/change/reset |
| 2.1.7 | Password hashing: Argon2id | ✅ | packages/auth/src/password.ts (@node-rs/argon2) |
| 2.2.1 | Brute-force protection | ✅ | 5 failures / 15-minute lockout + increasing delay (LOCKOUT_MAX_FAILURES), IP-based @RateLimit(AUTH_RATE) |
| 2.2.3 | New device/location notification | ✅ | new_login email (establishSession) |
| 2.5 | Password reset: single-use, time-limited token; email existence is not leaked | ✅ | email_tokens (sha256, 1 hour), constant response from forgotPassword |
| 2.7–2.8 | MFA (TOTP + recovery codes), enforcement at the org level | ✅ | MfaService, organizations.settings.mfaRequired (TenantGuard), mandatory for platform admins |
| 2.9 | OAuth sign-in: state + PKCE, verified email, return URL only on our own domain | ✅ | OAuthService (state in Redis for 10 min, S256, return_to only /…) |
| 2.10 | Service credentials (provider keys) are encrypted and not logged | ✅ | Envelope encryption (data_keys, MASTER_KEY), secret_enc; audit metadata masked |
V3 Session management
| # | Control | Status | Evidence |
|---|---|---|---|
| 3.2 | Session token is opaque, 256 bits, sha256 on the server side | ✅ | SessionService.create (generateOpaqueToken(32)) |
| 3.3 | Logout and timeout; absolute age policy | ✅ | 14-day sliding, org sessionMaxHours, revokeAll, session list |
| 3.4 | Cookie flags | ✅ | httpOnly, secure (prod), SameSite=Lax (common/cookies.ts) |
| 3.5 | API keys: hashed storage, scopes, IP allowlist, rotation, instant revocation | ✅ | api_keys.key_hash, Redis revoked flag, ip_allowlist, /rotate |
| 3.7 | Re-authentication for privilege changes (password/MFA change) | ✅ | changePassword/mfa.disable require the current password + code |
V4 Access control
| # | Control | Status | Evidence |
|---|---|---|---|
| 4.1.1 | Tenant isolation in every query + RLS | ✅ | TenantGuard org/app resolution (nonexistent → 404), TenantRlsInterceptor (set_config per request), tenant-isolation.int.test.ts + an isolation case in every phase's tests |
| 4.1.3 | Least-privilege roles | ✅ | packages/tenancy/src/roles.ts (owner…viewer, composer), API key scopes, plan role gate |
| 4.2.2 | CSRF | ✅ | double-submit (hs_csrf cookie = x-csrf-token) on /internal mutations (http-hooks.ts), SameSite=Lax |
| 4.3.1 | Separate identity and MFA for the admin interface | ✅ | /admin/v1 + is_platform_admin (SQL/seed only) + MFA; support sessions are read-only and audited |
| 4.3.3 | Access by suspended tenants | ✅ | HS_ORG_SUSPENDED in API/dashboard/SDK (phase13.int.test.ts) |
V5 Validation, sanitization and encoding
| # | Control | Status | Evidence |
|---|---|---|---|
| 5.1 | Positive validation, size limits | ✅ | Zod schemas (length/enum/regex), bodyLimit 1 MB (event batch 5 MB, webhook 256 KB) |
| 5.2.2 | HTML sanitization (email/in-app content) | ✅ | MJML/Liquid rendered on the server, dashboard preview with DOMPurify; in-app is block-based (no raw HTML) |
| 5.2.6 | SSRF | ✅ | packages/webhooks/src/ssrf.ts (private ranges after DNS resolution, redirects disabled), same check for the journey webhook node, WEBHOOK_ALLOW_INSECURE_TARGETS dev only outside the mock provider |
| 5.3.3 | Output encoding (preference center/unsubscribe pages) | ✅ | escapeHtml on all dynamic fields (tracking.service.ts), email templates (mail/templates.ts) |
| 5.3.4 | SQL injection | ✅ | Drizzle parameterized queries; raw sql templates are parameterized only |
| 5.5.2 | Safe JSON parsing | ✅ | Fastify JSON parser + depth/size limit; raw webhook bodies are parsed only after signature verification |
V6–V8 Cryptography, errors/logging, data protection
| # | Control | Status | Evidence |
|---|---|---|---|
| 6.2 | Approved algorithms | ✅ | AES-256-GCM envelope (ADR-0008), HMAC-SHA256 signatures (webhooks, tracking, Stripe/iyzico), Argon2id, VAPID ES256 |
| 6.4 | Key rotation | ✅ | docs/runbooks/key-rotation.md, data_keys versioning |
| 7.1 | No secrets in logs; request_id | ✅ | pino redaction, API request logs contain metadata only (api_request_logs), audit metadata masked (value_masked) |
| 7.4 | Error responses do not leak internal details | ✅ | AppExceptionFilter → standard envelope (HS_INTERNAL generic message, request_id) |
| 8.1 | PII: hashed lookup, masked display, export/log masking | ✅ | token_hash, suppression digests, a***e@pushizo.com; KVKK (Turkish data protection law)/GDPR deletion and export (privacy.int.test.ts) |
| 8.3.4 | Data retention periods | ✅ | retention job (plan limit retention_days), partition dropping |
V9–V10 Communication and malicious code
| # | Control | Status | Evidence |
|---|---|---|---|
| 9.1 | TLS; HSTS | 🟡 | HSTS header in prod (http-hooks.ts); TLS termination in infra/compose nginx/caddy (certificate at go-live) |
| 10.3 | Dependency scanning | ✅ | npm audit --audit-level=high (ci:local audit: high=0, critical=0), lockfile committed; CI ci.yml |
V12–V14 Files, API, configuration
| # | Control | Status | Evidence |
|---|---|---|---|
| 12.1 | File upload limits (CSV import, media) | ✅ | import multipart size limit, MIME/size checks, S3 signed URLs for 24 h |
| 13.1 | API: authorization, rate limiting, idempotency | ✅ | scope/permission guards, token bucket (plan-based api_rps), Idempotency-Key for 24 h |
| 13.2 | Webhook receivers verify signatures | ✅ | SNS/Svix/Twilio/Stripe/iyzico/mock signatures, raw body, time tolerance |
| 14.4 | Security headers | ✅ | API: x-content-type-options, referrer-policy, permissions-policy, x-frame-options, HSTS; dashboard: CSP (next.config.ts), same headers |
| 14.5 | CORS | ✅ | /sdk origin check (allowed_origins), dashboard only APP_URL |
| 14.2 | Production configuration and dependencies | ✅ | NODE_ENV=production startup checks: mock billing is rejected, mock providers only with ALLOW_MOCK_PROVIDERS=true (staging), WEBHOOK_ALLOW_INSECURE_TARGETS cannot be enabled, MASTER_KEY is required, the application DB role cannot be a superuser/BYPASSRLS (assertRlsEnforced); dependencies: Dependabot (npm, Actions, Docker, Gradle, Maven, NuGet, pip, Bundler, Composer, Go, pub), npm audit --audit-level=high (ci:local), gitleaks git history scan (CI) |
Open / out of scope
- External penetration test (optional; this list is the input).
- SSO (SAML/OIDC), JWT identity verification mode — v2 (ADR-0017).
- WAF/bot protection — infrastructure layer (go-live).
White-label: branding, custom domains and reseller accounts
Offer Pushizo under your own brand: your product name, logo and colors in the dashboard and system emails; the dashboard, tracking links, preference center and status page on your own domains; sub-customer…
Self-hosting
Options for running Pushizo on your own infrastructure — single-server Docker Compose and Kubernetes Helm; components, system requirements, environment variables, images, upgrades and a backup overview.