The L10 Card That Looked Right — and Was Hiding Everything Reggie Actually Needed
If the people in the meeting make decisions per PO, your dashboard row has to be a PO. Grouping by product looks tidier. It's lying.
Auth, access control and the holes found along the way.
If the people in the meeting make decisions per PO, your dashboard row has to be a PO. Grouping by product looks tidier. It's lying.
The Setup
End-to-end encryption is a great engineering decision. It is not a HIPAA compliance strategy. The legal surface area is the same either way.
password === secret is wrong. timingSafeEqual + a per-IP throttle Map are right. Three lines. Do them every time.
If you export user-supplied data to CSV, you need to sanitize =, +, -, @, TAB, and CR before writing. One regex, 10 lines. The victim isn't your
Real attendee PII was already committed — discovered in a full security audit, not at the gate. Replace it with synthetic data, gitignore the fixtur
=== short-circuits on the first mismatched byte — an attacker can probe your secret byte-by-byte using response timing. timingSafeEqual from Nod
If your code fetches a URL that came out of a third-party response header, validate the hostname against an allowlist before making the request. Eve
I escaped the message body in my AppleScript iMessage bridge. I didn't escape the recipient handle. They're both interpolated into the same string. Same
FIFO lot depletion + cron retries = potential double-depletion. Fixed it with a DB-enforced partial unique index keyed to the snapshot date. Ran the
Fields starting with =, +, -, or @ in a CSV import aren't just strings — they're deferred spreadsheet formulas. Inert in your database, harmless
Alias products that mirror a canonical's inventory were being SUM'd into the canonical's total. SKU-A showed 3N on-hand. Real count: N. The system w
A chart showing weekend zeros wasn't broken — it had two separate problems hiding inside one symptom. Fix the bucketing key first. Then add smoothing.
If a metric varies by both sides of a many-to-many relationship, it cannot live on either entity. It has to live on the join. I learned this building
A one-line migration comment asserted 'no SKU overlap between stores.' It was wrong. Every velocity, forecast, and ledger report in the supply chain
If your daily sales chart shows weekend zeros on warehouse-fulfilled orders, you're almost certainly bucketing by the wrong timestamp — and your timezon
Client-side AES-256-GCM keeps honest people honest. It is NOT a substitute for real access control at the data layer. Know exactly what you bought.
One auth check isn't defense-in-depth. Mirror it at the API handler, the middleware, AND the route layout — and make every gate fail closed when the
If you use supabase-js's .ilike() for lookups, % and in the input are live PostgreSQL wildcards — and PostgREST exposes no ESCAPE clause t
React does NOT block javascript: URLs in <a href>. If you're pulling URLs from a database, you need a scheme check before render. Every time.
what we were building
If you have order history, you already have inventory history. Replay the transactions, build the snapshots.
Build your OAuth callback server so it can be fed the redirect URL by hand over loopback. Tunnels are flaky. Auth codes survive a 502.
The PII leak that almost shipped wasn't from an attacker. It was from me. A console.log I left in while debugging.
When an OAuth provider rotates refresh tokens, you must write the new one back to disk on every single refresh. Read-once-from-.env quietly breaks
If you have an AI chat endpoint and no body size cap, you have a denial-of-wallet hole. Cap it in your app — not your platform. 256 KiB is a reas
supabase-js's .ilike() passes your string directly as a PostgreSQL LIKE pattern. PostgREST exposes no ESCAPE clause. Strip % and from
If an upstream API call fails and you surface that error straight to the client, you're leaking. Log the detail server-side. Return a sanitized gen
A Content Security Policy isn't just a list of trusted domains. It's a matrix of domains × resource types — and one missing intersection means a bla
If your LLM pipeline feeds untrusted external content to a model, you need to (1) fence your instructions away from that content and (2) place your