← Guide overview

Defensive review checklist

An independent guide to defensive code review for PHP/Laravel and Java/Spring developers.

Access control

Check permission and resource ownership on the server for every operation. Deny access by default when permission is absent or cannot be established.

Inputs and outputs

Validate request types, lengths and ranges on the server. Use parameterized database operations and encode output for the context where it is rendered.

Credentials and secrets

Store passwords using a dedicated password-hashing function supported by the framework. Keep secrets out of source code and logs, and grant only the permissions needed.

Operations and review

Restrict access to production administration surfaces and log failure reasons without recording personal data. Add regression tests for rejected access and invalid inputs.

Back-end security code review workflow →