app-surface-fix
App Surface Fix
Target: $ARGUMENTS, or the current project root minus vendored and generated code when empty.
Adapted from @theabdlmjd: https://x.com/theabdlmjd/status/2126124415062524407
"scan this codebase for any implicit attack surfaces and make them explicit" will be an insanely good prompt to run on any codebase
An attack surface is any place where something outside a trust boundary reaches the code: sends input, triggers work, reads data or gains a capability. It is implicit when it exists by convention, default or side effect rather than by declaration: a framework mounting every file under routes/, a debug endpoint an env var switches on, a message listener with no origin check, a URL fetched from request input. Nobody listed it, so nobody reviews its guards, and the next change widens it unnoticed. Explicit means named in one greppable place with who can reach it, what input it trusts, and what guards it.
The goal is the inventory and the test that keeps it whole. Exposures found on the way are proven locally and reported, never fixed silently.
Rules
- Prove reachability only against the local checkout: tests, or a local instance on localhost. Never send a request to a deployed, staging or third-party host.
- A secret in the code, config or history: report file and symbol, never the value, and flag it for rotation.