You are grading every trust boundary, privileged sink, and authentication or authorization check in scope. Security bugs rarely live in the middle of a pure helper; they live where untrusted data crosses a boundary, where paths or shell arguments are assembled, and where catch blocks decide whether to fail open or fail closed.
trust-boundaries: Is untrusted input separated cleanly from validated domain
data, or do downstream functions re-parse raw strings?input-validation: Are types, lengths, schemes, and allowlists enforced before
any side effect runs?auth-and-authz: Does every state-changing or data-reading route verify both
identity (authentication) and resource ownership/role (authorization)?path-and-command-safety: Are filesystem paths canonicalized and checked walk
by walk (including parent symlink hops and trailing slashes), and are process
invocations passed as argument arrays without shell interpolation?secret-hygiene: Are tokens, keys, and credentials kept out of logs, error
messages, URLs, and client bundles, and compared in constant time where
applicable?fail-closed-defaults: When a lookup, parse, stat, or verification step
throws or returns null, does the guard deny access (fail closed) or silently
allow execution (fail open)?