Skip to content

Security: JerrettDavis/FlowLedger

Security

SECURITY.md

Security Policy

Supported versions

Version Supported
main Yes
tagged releases Latest release only (once releases are cut; see CHANGELOG.md)

Reporting a vulnerability

Please do not open a public GitHub issue for security vulnerabilities.

Report privately through GitHub's private vulnerability reporting: https://github.com/JerrettDavis/FlowLedger/security/advisories/new. If you cannot use it, open a minimal public issue asking for a private contact channel (without any details of the vulnerability).

Include:

  • Description of the vulnerability.
  • Steps to reproduce.
  • Impact assessment.
  • Suggested fix (optional).

We aim to acknowledge within 48 hours and provide a resolution timeline within 5 business days.

Sensitive data scope

FlowLedger handles: financial institutions, account balances, transactions, income, debt, goals, and provider credentials. Any vulnerability affecting this data is treated as high severity.

Security controls and known gaps

This section states what the code does today. Each control names the file or test that backs it; anything without one is a known gap, not a control.

Implemented:

  • Tenant isolation. Tenant-owned entities are filtered by EF Core global query filters (src/FlowLedger.Infrastructure/Persistence/FlowLedgerDbContext.cs). Isolation is tested per feature (for example tests/FlowLedger.Api.Tests/Security/DataAdminTenantTests.cs, tests/FlowLedger.Api.Tests/Security/ProductionTenantTests.cs, tests/FlowLedger.Infrastructure.Tests/Sync/SimpleFinTenantIsolationTests.cs). There is no systematic route-by-route isolation sweep yet.
  • Multi-user secure defaults (OIDC mode). Sign-up is InviteOnly unless Auth:SignUp:LegacyOpen=true; billable Quiltt provisioning is household-only under open sign-up; Api:RequireSignedTenant defaults to true outside Development (startup fails without Api:TenantSigningKey); the household tenant id may not be the well-known constant without Tenancy:AllowWellKnownLegacyTenantId=true; sessions end Auth:Session:AbsoluteMaxDays (default 30) after sign-in and use a __Host- cookie; unlinking a login ends its session within 5 minutes. Every legacy opt-out logs a startup Warning. Backed by src/FlowLedger.ServiceDefaults/MultiUserSettings.cs, tests/FlowLedger.Web.Tests/Auth/MultiUserSettingsTests.cs, tests/FlowLedger.Web.Tests/Auth/SessionLifetimeTests.cs, tests/FlowLedger.Api.Tests/Security/SignUpPolicyTests.cs, tests/FlowLedger.Api.Tests/Security/RequireSignedTenantTests.cs; upgrade notes in docs/self-hosting/upgrading.md. The tenant signature (v2) is bound to method and path with a single-use nonce (the legacy v1 format is accepted while Api:AcceptLegacyTenantSignature is true), and a new OIDC install generates its household tenant id once and stores it (system_settings). Known gaps: the query string is not signed, the replay cache is per API process, and single-household (non-OIDC) installs still use a configured id.
  • Encrypted secrets stored in the database. Home Assistant webhook URLs and integration credentials/signing secrets are encrypted with AES-256-GCM using HomeAssistant:EncryptionKey / Integrations:EncryptionKey, and are refused (not stored in clear text) when no key is configured (src/FlowLedger.Infrastructure/DataSafety/NpgsqlHomeAssistantStore.cs, src/FlowLedger.Infrastructure/DataSafety/NpgsqlIntegrationStore.cs).
  • Provider credentials are not stored in the database. MX, Quiltt and SimpleFIN credentials (including the SimpleFIN access URL) are supplied through configuration or environment variables only. The provider_connections table stores provider member ids, institution and status, not credentials (src/FlowLedger.Infrastructure/Persistence/Entities/ProviderConnectionRecord.cs).
  • SSRF checks on user-supplied URLs. Integration and Home Assistant webhook URLs reject link-local/metadata/multicast targets, reserve loopback/private targets for the household owner, and require https for internet-reachable targets (src/FlowLedger.Application/Features/Integrations/IntegrationUrl.cs, src/FlowLedger.Application/Features/HomeAssistant/HomeAssistantWebhookUrl.cs).

Not implemented (do not rely on these):

  • No log redaction pipeline. SensitivePropertyMaskingEnricher (src/FlowLedger.Api/Logging/) is an unwired Serilog enricher: the app logs through the default Microsoft logger and OpenTelemetry, neither of which uses it. It is covered only by direct unit tests. Do not assume amounts, account numbers or names are kept out of logs or telemetry. Known examples: SimpleFIN provider error strings can contain institution names, and a malformed MX webhook body is logged as an exception. Treat logs and any OTLP backend as sensitive.
  • No encryption at rest in the application. The PostgreSQL database, backups/exports and the raw provider payload archive hold financial data and PII in plaintext. Raw provider payloads are retained indefinitely by default (ADR 0007; optional retention sweep and per-tenant erasure exist). Protect volumes, backups and the archive directory with disk/volume encryption and access controls.
  • Tenant deletion is operator-driven, not self-service. The household admin can erase a tenant (POST /api/data/tenants/{id}/offboard, src/FlowLedger.Infrastructure/DataSafety/EfTenantErasure.cs, tested in tests/FlowLedger.Infrastructure.Tests/DataSafety/TenantErasureTests.cs). Provider revocation is manual and existing backups are not rewritten. See docs/privacy/data-inventory-and-retention.md and the deletion exception in ADR 0007.

Further reading: threat model, runbooks.

There aren't any published security advisories