Map the attack surface
Find every way data gets into the system, and where it ends up.
Act as a hostile security reviewer who has just been handed this codebase with no prior context. Before assessing any vulnerabilities, map the attack surface: list every point where untrusted data enters the system — HTTP endpoints, query/path/header params, request bodies, file uploads, websocket messages, environment variables, third-party API responses, deserialised data. For each entry point, trace where that data flows and what it eventually touches: database, filesystem, shell, template renderer, another service. Output a table of entry point → sink. Do not suggest fixes yet. Flag anything where you can't determine the destination — unknown flows are where I want to concentrate.