We review a lot of codebases when a client brings us in, and the security gaps are remarkably consistent. None of them are exotic. All of them are the kind of thing that turns up in a customer's security questionnaire or, worse, in an incident. Here are the ten we see most, in the order we fix them.
1. Secrets in the repository
API keys in config files, database passwords in a committed .env, a cloud credential in a script. Even after deletion they live in git history. Rotate every secret that has ever been committed, move them to a secrets manager, and add a pre-commit scanner so it does not happen again.
2. Authorisation checks that trust the client
The API checks that you are logged in but not that you own the record you are requesting. Changing an ID in the URL shows someone else's data. Every data access must check ownership or role on the server. This is the single most common serious bug we find.
3. No rate limiting on login and password reset
Without limits, credential stuffing and enumeration are trivial. Add per-IP and per-account limits, generic error messages ("if that email exists, we sent a link"), and lockout with notification.
4. Dependencies nobody updates
A two-year-old lockfile carries known vulnerabilities. Turn on automated dependency updates, run an audit in CI, and set a monthly slot to review the ones that need a human decision.
5. Verbose errors in production
Stack traces and database errors returned to the browser tell an attacker exactly how your system is built. Return a generic message, log the detail server-side, and test the error path, not just the happy path.
6. Files uploaded and served without checks
Validate type and size on the server, store uploads outside the web root or in object storage, serve them through signed URLs, and never execute or render user content on your main domain.
7. Admin tools on the same surface as the product
An admin panel reachable from the public internet with a shared password is a breach waiting to happen. Put it behind single sign-on with two-factor, restrict it by network where possible, and log every admin action.
8. Backups that have never been restored
A backup you have not restored is a hope, not a backup. Automate backups, keep one copy in a different account or region, and restore to a scratch environment quarterly. Time it; that number goes in your incident plan.
9. No audit trail
When a customer asks "who changed this and when", you need an answer. Log authentication events, permission changes, data exports and deletions with who, what and when, and keep the logs somewhere the application cannot modify.
10. Nobody owns it
Security without an owner decays. Name one person, give them a monthly hour, and keep a short checklist: dependencies reviewed, access reviewed, backups tested, incidents logged. That hour is what lets you answer a security questionnaire in a day instead of losing the deal.
Takeaway
None of this requires a security team. Each item is an afternoon, and together they cover most of what a mid-market customer will ask before signing. Do them early, while the codebase is small, and security becomes a checkbox in sales conversations rather than a blocker.
