fondo-security-basics
Apply security best practices for Fondo including OAuth token management, financial data protection, SOC 2 compliance, and access control. Trigger: "fondo security", "fondo data protection", "fondo SOC 2", "fondo access control".
What this skill does
# Fondo Security Basics
## Overview
Fondo handles startup tax preparation, bookkeeping, and R&D tax credits containing SSNs, EINs, bank account details, revenue figures, and complete tax returns. A breach exposes founder personal tax data, company financials, and IRS filing details. Protect OAuth connections to banking/payroll systems, exported financial documents, and team access controls with the same rigor as a CPA firm.
## API Key Management
```typescript
function createFondoClient(): { apiKey: string; baseUrl: string } {
const apiKey = process.env.FONDO_API_KEY;
if (!apiKey) {
throw new Error("Missing FONDO_API_KEY — store in secrets manager, never in code");
}
// Fondo keys access tax returns and SSN/EIN data — treat as highest sensitivity
console.log("Fondo client initialized (key suffix:", apiKey.slice(-4), ")");
return { apiKey, baseUrl: "https://api.fondo.com/v1" };
}
```
## Webhook Signature Verification
```typescript
import crypto from "crypto";
import { Request, Response, NextFunction } from "express";
function verifyFondoWebhook(req: Request, res: Response, next: NextFunction): void {
const signature = req.headers["x-fondo-signature"] as string;
const secret = process.env.FONDO_WEBHOOK_SECRET!;
const expected = crypto.createHmac("sha256", secret).update(req.body).digest("hex");
if (!signature || !crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected))) {
res.status(401).send("Invalid signature");
return;
}
next();
}
```
## Input Validation
```typescript
import { z } from "zod";
const TaxFilingSchema = z.object({
entity_id: z.string().uuid(),
tax_year: z.number().int().min(2015).max(2030),
filing_type: z.enum(["1120", "1120S", "1065", "941", "R&D_credit"]),
ein: z.string().regex(/^\d{2}-\d{7}$/),
revenue: z.number().nonnegative(),
status: z.enum(["draft", "review", "filed", "amended"]),
});
function validateTaxFiling(data: unknown) {
return TaxFilingSchema.parse(data);
}
```
## Data Protection
```typescript
const FONDO_PII_FIELDS = ["ssn", "ein", "bank_account", "routing_number", "tax_return_url", "revenue", "salary"];
function redactFondoLog(record: Record<string, unknown>): Record<string, unknown> {
const redacted = { ...record };
for (const field of FONDO_PII_FIELDS) {
if (field in redacted) redacted[field] = "[REDACTED]";
}
return redacted;
}
```
## Security Checklist
- [ ] API keys stored in secrets manager, never in code
- [ ] OAuth connections (Gusto, QuickBooks, Plaid, Stripe) reviewed quarterly
- [ ] Financial exports never committed to git (`.gitignore` enforced)
- [ ] SSN and EIN values never logged in plaintext
- [ ] Team roles follow least-privilege (Owner/Admin/Viewer/CPA)
- [ ] Two-factor authentication enabled on Fondo account
- [ ] Exported tax documents encrypted with GPG before storage
- [ ] Bank connections use Plaid (encrypted, not screen-scraping)
## Error Handling
| Vulnerability | Risk | Mitigation |
|---|---|---|
| Leaked API key | Full access to tax returns and SSN/EIN data | Secrets manager + rotation |
| Unencrypted financial exports | Tax data exposed via CSV on disk | GPG encryption + secure deletion |
| Stale OAuth tokens | Compromised banking/payroll connections | Quarterly OAuth review + revocation |
| Overly broad team access | Viewer sees SSN/salary data | Role-based access control enforcement |
| Tax data in application logs | IRS compliance violation | Field-level PII redaction |
## Resources
- [Fondo Security](https://fondo.com)
- [OWASP API Security Top 10](https://owasp.org/www-project-api-security/)
## Next Steps
See `fondo-prod-checklist`.
Related in Security
mac-ops
IncludedComprehensive macOS workstation operations — diagnose kernel panics, identify failing drives, audit launchd startup items, decode wake reasons, triage TCC permission denials, manage APFS snapshots, recover from no-boot. Use for: Mac is slow, slow bootup, won't boot, kernel panic, kernel_task hot, mds_stores CPU, photoanalysisd, cloudd, login loop, gray screen, sleep wake failure, drive failing, IO errors, APFS snapshots eating space, Time Machine local snapshots, Spotlight indexing, launchd, LaunchAgent, LaunchDaemon, login items, TCC permissions, Full Disk Access, Screen Recording denied, Gatekeeper, quarantine, com.apple.quarantine, app is damaged, helper tool, /Library/PrivilegedHelperTools, pmset, wake reasons, dark wake, sysdiagnose, panic.ips, DiagnosticReports, configuration profile, MDM profile, remote diagnostics over SSH.
a11y-audit
IncludedRun accessibility audits on web projects combining automated scanning (axe-core, Lighthouse) with WCAG 2.1 AA compliance mapping, manual check guidance, and structured reporting. Output is configurable: markdown report only, markdown plus machine-readable JSON, or markdown plus issue tracker integration. Use this skill whenever the user mentions "accessibility audit", "a11y audit", "WCAG audit", "accessibility check", "compliance scan", or asks to check a web project for accessibility issues. Also trigger when the user wants to verify WCAG conformance or map findings to a specific standard (CAN-ASC-6.2, EN 301 549, ADA/AODA).
erpclaw
IncludedAI-native ERP system with self-extending OS. Full accounting, invoicing, inventory, purchasing, tax, billing, HR, payroll, advanced accounting (ASC 606/842, intercompany, consolidation), and financial reporting. 413 actions across 14 domains, 43 expansion modules. Constitutional guardrails, adversarial audit, schema migration. Double-entry GL, immutable audit trail, US GAAP.
assess
IncludedAssesses and rates quality 0-10 across multiple dimensions (correctness, maintainability, security, performance, testability, simplicity) with pros/cons analysis. Compares against project conventions and prior decisions from memory. Produces structured evaluation reports with actionable improvement suggestions. Use when evaluating code, designs, architectures, or comparing alternative approaches.
spring-boot-security-jwt
IncludedProvides JWT authentication and authorization patterns for Spring Boot 3.5.x covering token generation with JJWT, Bearer/cookie authentication, database/OAuth2 integration, and RBAC/permission-based access control using Spring Security 6.x. Use when implementing authentication or authorization in Spring Boot applications.
code-hardcode-audit
IncludedDetect hardcoded values, magic numbers, and leaked secrets. TRIGGERS - hardcode audit, magic numbers, PLR2004, secret scanning.