Information Security Policy
This document defines the information security practices for Pocket Piggy, a personal finance mobile application. It covers all systems, data, and processes involved in the development, deployment, and operation of the application and its supporting infrastructure.
Pocket Piggy is a privacy-first application. Its core security principle is: financial data never leaves the user's device. All transaction data, budget information, and spending history is stored locally in AES-256 encrypted storage. Server-side infrastructure handles authentication, subscription management, and optional AI-powered features only.
| Layer | Technology | Security Measures |
|---|---|---|
| Mobile Client | Flutter (Dart) | AES-256 encrypted local storage (Hive), biometric lock, certificate pinning |
| Authentication | Firebase Auth | Email verification, Google OAuth 2.0, Apple Sign-In, session management |
| Backend Functions | Firebase Cloud Functions (Node.js 20) | HTTPS-only, authenticated endpoints, environment variable secrets |
| Database | Cloud Firestore | Security rules, encrypted at rest (Google-managed), non-financial data only |
| Bank Sync | Plaid API v26 | Server-side token exchange only, access tokens never stored on device |
| Payments | RevenueCat | No direct payment processing; delegated to App Store / Play Store |
| AI Services | OpenAI GPT-4o (via Cloud Functions) | Server-side only, no PII sent, vendor/category data only |
| Hosting | Google Cloud Platform (Firebase) | SOC 2, ISO 27001 certified infrastructure |
| Classification | Data Types | Storage Location | Encryption |
|---|---|---|---|
| HIGH Financial | Transactions, budgets, account balances, spending history | Device only (Hive) | AES-256-CBC |
| HIGH Credentials | Plaid access tokens, API keys | Server only (Firebase env) | Google KMS |
| Medium — Profile | Name, email, preferences, gamification progress | Cloud Firestore | At rest (Google-managed) |
| Low — Analytics | Feature usage events (no PII) | Firebase Analytics | At rest (Google-managed) |
public_token to the devicepublic_token to Firebase Cloud Function over HTTPSaccess_token via Plaid API (server-to-server)access_token stored server-side in Firestore (encrypted at rest) — never sent to device| Context | Method | Key Management |
|---|---|---|
| Local financial data | AES-256-CBC (Hive encrypted boxes) | Per-user key generated at first launch, stored in platform secure storage (Android Keystore / iOS Keychain) |
| Data in transit | TLS 1.2+ (HTTPS) | Firebase-managed certificates |
| Firestore at rest | AES-256 | Google Cloud KMS (automatic) |
| Cloud Function secrets | Environment variables | Firebase project-level access control |
| System | Access Control | Who Has Access |
|---|---|---|
| Firebase Console | Google account with 2FA | Owner only |
| Plaid Dashboard | Account with 2FA | Owner only |
| RevenueCat Dashboard | Account with 2FA | Owner only |
| GitHub Repository | Private repo, SSH keys | Owner only |
| Google Play Console | Google account with 2FA | Owner only |
| Apple Developer Account | Apple ID with 2FA | Owner only |
request.auth.uid == resource.data.userId)| Provider | Purpose | Data Shared | Compliance |
|---|---|---|---|
| Plaid | Bank account linking & transaction fetch | Access tokens (server-side only) | SOC 2 Type II, ISO 27001 |
| Firebase / GCP | Auth, database, cloud functions, analytics | User profiles, non-financial data | SOC 2, ISO 27001, FedRAMP |
| RevenueCat | Subscription management | Anonymous user ID, purchase receipts | SOC 2 Type II |
| OpenAI | AI categorization & tips | Vendor names only (no PII, no amounts) | SOC 2 Type II |
| exchangerate.host | Currency exchange rates | None (public API, no auth) | N/A |
flutter pub outdated and npm auditflutter analyze run before each release to catch code quality and security issues| Severity | Example | Response Time | Action |
|---|---|---|---|
| Critical | Plaid token compromise, data breach | Immediate | Revoke tokens, notify Plaid, notify affected users, rotate secrets |
| High | Firebase rules misconfiguration, API key exposure | < 4 hours | Fix configuration, rotate keys, audit access logs |
| Medium | Dependency vulnerability (CVE) | < 48 hours | Update dependency, test, deploy patch |
| Low | Non-critical bug, UI issue | Next release cycle | Fix and deploy in next update |
Pocket Piggy has no on-premise infrastructure. All server-side components run on Google Cloud Platform (Firebase), which maintains physical security controls including:
Development is conducted on encrypted devices with full-disk encryption and biometric/password lock.
This policy is reviewed and updated at minimum annually, or whenever significant changes are made to the application architecture, third-party integrations, or data handling practices.