Define the audit scope. Identify the systems, applications, and infrastructure components included in the audit. Document the technology stack, deployment architecture, and trust boundaries. Clarify what is in scope and what is explicitly excluded.
Build a threat model. Create a data flow diagram showing how data moves through the system. Identify trust boundaries where data crosses security domains. Apply STRIDE to each trust boundary to systematically enumerate potential threats.
Review authentication mechanisms. Examine the login flow end-to-end: credential submission, validation, session creation, token issuance, and session termination. Check for timing attacks in authentication responses, brute force protections, and secure credential storage (bcrypt, argon2 with appropriate cost factors).
Assess authorization controls. For each API endpoint and protected resource, verify that authorization checks are enforced server-side. Test for horizontal privilege escalation (can user A access user B's data by changing an ID parameter?) and vertical privilege escalation (can a regular user access admin endpoints?).
Audit input validation. Trace every user input from entry point to database query, file operation, or command. Verify that parameterized queries are used for database access, output encoding is applied for rendered content, and file paths are validated against traversal attacks.
Evaluate data protection. Check that sensitive data is encrypted at rest (database-level or field-level encryption), encrypted in transit (TLS 1.2+ with strong cipher suites), and not logged or cached in plaintext. Verify that PII handling complies with applicable regulations.
Review security configuration. Check HTTP security headers (Content-Security-Policy, X-Content-Type-Options, Strict-Transport-Security), CORS policies (are origins restricted appropriately?), cookie attributes (Secure, HttpOnly, SameSite), and rate limiting on authentication and sensitive endpoints.
Analyze dependencies. Run dependency vulnerability scanning. Identify libraries with known CVEs. Assess whether vulnerable code paths are actually reachable in the application. Flag unmaintained dependencies with no security update path.
Compile the audit report. Organize findings by severity. For each finding, document: the vulnerability class, the specific location, a reproducible proof of concept, the potential impact, and a concrete remediation recommendation. Include an overall risk assessment summary.
Conduct remediation review. After the development team applies fixes, verify each remediation. Confirm that the original vulnerability is resolved and that the fix does not introduce new attack vectors. Update the audit report with verification results.