You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Security practices and policies for the Vision application including input validation, rate limiting, SSRF guard for outbound URLs, and supply chain security (secrets scanning, dependency audit, container scanning, Electron --ignore-scripts)
aliases
security
security docs
input validation
rate limiting
supply chain security
Security Documentation
Security practices and policies for Vision.
Areas
TABLE title, description
FROM "docs/security"
WHERE type = "security"
SORT title ASC
Topics
[[docs/security/input-validation|Input Validation]] - Input sanitization and validation
Admin auth model (token-or-open + CSRF guard) is documented in [[docs/adr/063-admin-auth-csrf-guard|ADR-063]] and [[docs/security/data-protection|Data Protection]]. The superseded RFC1918 fallback is [[docs/adr/037-admin-auth-localhost-fallback|ADR-037]].
Supply Chain Security (2026-05-07)
[[docs/adr/050-ci-supply-chain-security-tooling|ADR-050: CI Supply Chain Security Tooling]] - Historical decision; current CI uses secrets scanning, dependency audits, and Trivy filesystem scanning
[[docs/guides/cicd-pipelines|CI/CD Pipelines Guide]] - Full documentation of security scanning jobs (secrets-scan, deps-audit, trivy-scan) and setup instructions
Admin auth: token-or-open + CSRF guard — [[docs/adr/063-admin-auth-csrf-guard|ADR-063]] replaces the RFC1918 IP-allowlist admin fallback (ADR-037) with two co-operating guards: adminAuth.js is now token-or-open (no IP check; timing-safe Bearer when ADMIN_AUTH_TOKEN is set, open otherwise), and new csrfGuard.js blocks cross-site state-changing browser requests via Sec-Fetch-Site (allow same-origin/none, reject same-site/cross-site) with an Origin allowlist fallback. Mounted before adminAuthMiddleware on /api/admin. See [[docs/security/data-protection#admin-auth-token-or-open--csrf-guard-2026-05-29|Data Protection — Admin Auth]].
SSRF guard for outbound price-provider URLs — New lib/urlSafety.js module (assertPublicHttpUrl, isBlockedIpv4, isBlockedIpv6, BlockedUrlError) blocks private/loopback/link-local/CGNAT/unspecified addresses at both the write boundary (investment create/update → 400) and the fetch boundary (custom provider _fetchJson + redirect hops, 5 MB response cap). See [[docs/security/input-validation#outbound-request-guard-ssrf-2026-05-29|Input Validation — SSRF guard]] and [[docs/integrations/price-providers#custom-provider-url-constraints-2026-05-29|Price Providers — Custom URL constraints]].
Electron release build --ignore-scripts — release.yml packaging resolves the separate Electron lockfile with bun install --frozen-lockfile --ignore-scripts, blocking dependency lifecycle scripts during .dmg signing. See [[docs/security/container-hardening#electron-release-build-supply-chain-hardening-2026-05-29|Container Hardening — Electron supply chain]].
Past Hardening
Phase 7 Hardening (May 2026): See [[docs/adr/049-phase-6-7-bug-hunt-recovery-hardening|ADR-049]] for Electron backup/restore safety enhancements and [[docs/adr/002-database-schema|ADR-002]] for Phase 6.1 corrective migration of updated_at constraints.