Two days before release, someone on the team pokes at the new invoices page and changes the number at the end of the URL from 1042 to 1043. Up comes another customer's invoice. The feature passed QA, the demo is recorded, and half the team is already thinking about next sprint. The fix is three lines: check that the invoice belongs to the logged-in account. The conversation afterwards takes a lot longer. Why are we only finding this now?
That bug has a name. OWASP calls it broken access control, and it holds the #1 spot in the OWASP Top 10:2025. In the data behind that list, 100% of the applications tested had some form of it (A01:2025 Broken Access Control). So if it happens on your team, you're in very large company. It's also exactly the kind of bug that's cheap to stop early and painful to find late.
What shifting left actually means
Lay your delivery flow out as a line: idea, design, code, review, test, release, production. Shifting left means moving security thinking toward the left end, closer to design and code, so it stops being a single inspection right before release. NIST's Secure Software Development Framework is blunt about why: few development lifecycles cover security in depth, so secure practices "usually need to be added to each SDLC model" (NIST SP 800-218). The aims it lists include helping teams "reduce the number of vulnerabilities in released software" and "address the root causes of vulnerabilities to prevent future recurrences."
The phrase gets misread in a few ways, so a quick clarification. Shift-left doesn't turn every developer into a full-time security specialist. It isn't ten scanners shouting on every pull request until everyone mutes them. And it doesn't swap expert review for optimism. The useful version gives engineers practical guardrails early and saves expert attention for the decisions where judgment really matters.
Start with four questions
Threat modeling sounds like a two-day workshop with a whiteboard full of boxes. It can take ten minutes. Adam Shostack, author of Threat Modeling: Designing for Security, boils the practice down to four questions (Shostack's Four Question Frame):
- What are we working on?
- What can go wrong?
- What are we going to do about it?
- Did we do a good job?
Ask them at design time and the second question usually does most of the work. For a typical web feature, "what can go wrong" breaks down into questions anyone on the team can ask:
- What data comes into this feature, and who's allowed to see it?
- What happens if a user changes this ID, this role or this price in the request?
- Can this action be undone? If not, who should be allowed to trigger it?
- Are we logging anything sensitive, like tokens, passwords or personal data?
- What dependency are we adding, and who maintains it?
- Where do the secrets for this live?
- What would a bored, curious user try first?
None of these are dramatic. They're small enough to ask before the code gets big, and the invoice bug from the opening dies at question two.
Make the safe path the easy path
Questions help, but people forget things under deadline pressure. The stronger move is to build defaults so the secure choice happens without anyone remembering a rule. Google's Safe Coding work is a well-documented example. As Christoph Kern describes it, the core principle is to "shift responsibility for safety from individual developers to the programming language, software libraries, and frameworks," and at Google that approach has "nearly eliminated vulnerabilities such as Cross-Site Scripting (XSS) and SQL injection" (Christoph Kern, Google Research).
You don't need Google's scale to borrow the idea. In a normal product team it looks like this:
- An authorization helper every endpoint uses, so "does this record belong to this user?" is one line instead of something each developer reinvents.
- Deny by default. OWASP's first prevention point for broken access control is "Except for public resources, deny by default."
- Input validation and query builders that make the injection-prone way awkward to write.
- A logging wrapper that redacts tokens and personal data on its own.
- Secret scanning before code leaves the laptop. GitHub's push protection, for example, "blocks pushes that contain secrets before they reach your repository" (About push protection).
- Project templates that ship with all of the above already wired in.
At BonBon, where I'm a part-time co-founder, we made a call like this for our Mini App inside the VETC app: sessions live only in memory, and no tokens go into browser storage. That's one less rule anyone has to remember on a busy day.
Add a security lens to code review
Pull requests are a natural checkpoint. Formatting belongs to the linter. A reviewer's time is better spent on trust boundaries:
- Does the server check ownership, or does it trust whatever ID the client sends?
- Does the API return more fields than the UI needs?
- Do error messages leak stack traces, SQL or internal hostnames?
- Is there a test that a user without permission gets a 403 (or a 404)?
- Do we really need this new dependency?
OWASP's list of common broken-access-control flaws reads like a review checklist. Two entries are "permitting viewing or editing someone else's account by providing its unique identifier" and "an accessible API with missing access controls for POST, PUT, and DELETE." If a PR touches an endpoint, each of those deserves thirty seconds. When you do find one, mark it as blocking and explain the fix, the way kind code review suggests.
Tools people actually read
Static analysis, dependency alerts, container scans and secret scanners all help, as long as someone reads and tunes what they produce. If every scan dumps a noisy list nobody owns, people learn to scroll past it, and the real finding drowns with the rest.
Give every finding a short path to a decision:
| Decision | When | What to write down |
|---|---|---|
| Fix now | Real risk, reachable in our code | Link to the fix PR |
| Accept for now | Real but low impact, or no fix available yet | Reason, owner and a date to look again |
| Suppress | False positive | Why it's false, so the next person doesn't re-check it |
| Escalate | Bigger than one PR (a design flaw, a shared library) | Who owns the follow-up |
Start with a small rule set and turn on more once the team trusts the signal. A scanner with five findings people fix beats one with five hundred they ignore.
Keep the experts close to the risky parts
Shifting left changes when security people show up. It doesn't send them away. If developers only meet security as late criticism, they'll treat it as an obstacle. If security folks help build the reusable patterns, explain risks in plain words and prioritize by real impact, the relationship changes, and security starts to feel like part of quality.
Some changes still deserve a dedicated expert pass: authentication, payments, anything holding personal data, anything a partner trusts you with. At BonBon, our Mini App went through VETC's OWASP security review, an independent pentest and their change approval. Guardrails catch the common mistakes. Experts look at what guardrails can't see.
Try this week
- At your next design chat, spend ten minutes on the four questions.
- Pick one endpoint and call it with someone else's ID.
- Turn on secret scanning or push protection for one repo.
- Write down the triage path for scanner findings: fix, accept, suppress or escalate.
- Add "does the server check ownership?" to your PR template.