mirror of
https://github.com/bitbaum/dotfiles.git
synced 2026-12-05 01:08:55 +01:00
fleetcrown#309 added a static gate that reads route handlers and fails if a
whole users row reaches a response. Its own header states the limit: it cannot
see RSC flight payloads, where a server component handing a row to a client
component serializes it into the HTML identically, with no route handler
involved.
This closes that half by reading what actually crossed the wire. No schema, ORM
or framework knowledge required.
It earned its place on first use. Across the fleet it found
GET /api/admin/patients in vitareba returning every patient's bcrypt digest —
a CROSS-account disclosure the code-level sweep had missed, because the route
uses db.query.users.findMany() with no projection and the grep for `json(user)`
shapes does not match `json({ success, data })`. Fixed in vitareba#41.
Severity reflects what a finding lets an attacker do, not how it is spelled:
CRITICAL for a live bearer credential (OAuth access/refresh token), HIGH for a
digest, MEDIUM for a long value under a secret-ish key that is often legitimate.
The self-test is not decoration: every case is a shape observed in the fleet or
one that must stay silent, including the two that must NOT fire (null hashes,
public share tokens). A scanner nobody has watched fail is a scanner that
reports clean because it matches nothing.
Its fixtures are ASSEMBLED from parts rather than written as literals. This file
is a corpus of fake credentials and tripped the repo's own gitleaks hook; the
alternative was a .gitleaksignore entry that would also have covered a real
secret dropped in here later. Splitting keeps the gate strict.
The README records the two traps that cost real time when getting a session:
.env values may be single-quoted (systemd strips them, `tr -d '"'` does not —
compare against /proc/PID/environ, not the file), and the app-specific jwt
claims must match or the guards reject a perfectly signed token. Limits are
stated rather than implied: key-name matching misses a credential stored under
an unknown name, such as aoz-wohnen's plaintext login `code`.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>