Episode · DevSec Station
How to Do Secure Code Review (When You’re Not a Security Expert)
26 Aug 2026 · 8 min
Episode notes
Secure code review isn't about finding obscure vulnerabilities or thinking like an elite hacker. It's about verifying that the security controls your application depends on are actually present, in the right place, and correctly implemented. This episode is sponsored by Maze. In this episode of DevSec Station, Tanya Janca explains how developers can perform effective secure code reviews without being security experts. You'll learn what security controls to look for, how trust boundaries help ...
Transcript
Read the transcript · about 1,240 words, follows along as you listen
SPEAKER_00:Most developers already do code review, but almost no one is taught how to do secure code review. So what usually happens is this: we review for style, for correctness, for would I be able to maintain this? Will I know what this does later? And then the security of the code kind of just gets vibes. Today I want to fix this together. Let's take a look at that. Hi, I'm Tanya Jenka, also known as SheHexPurple. Welcome to DevSecStation, a podcast for software developers who want to build more secure software.
SPEAKER_00:In each episode, I'll share a short practical lesson about secure coding, software security, and how to build safer systems without slowing development down. You can jump in at any episode, at any time. No homework required. This episode is sponsored by Maze. One of the biggest problems in security right now is that every vulnerability or cloud scanner says everything is critical. And honestly, no one has time for that. Maze uses AI agents to investigate vulnerabilities in context, so you can focus on the issues that are actually exploitable in your environment and not just theoretically scary.
SPEAKER_00:Their AI agents also generate and prioritize fixes that knock out multiple vulnerabilities at once, which is honestly the kind of scaling that security teams really need right now. Learn more about maze at mazehq.com slash devsec. If you review pull requests, approve changes, or merge code into shared repos, this episode is for you. And for your information, you do not need to be a security expert to do a secure code review. Secure code review is not about finding clever vulnerabilities.
SPEAKER_00:It's about verifying that security controls are present, that they're in the correct spot, and usually doing what they're supposed to do. When I say secure code review, I mean asking some pretty specific questions, such as, are we enforcing authentication where we said that we would? Are authorization checks happening at the right boundary every time? Is untrusted input verified as safe before it's being used? Are secrets, sensitive data, and errors treated the same way that our system expects that they should be?
SPEAKER_00:Security controls are just code, and co-review is where we decide whether that code is correct or not. A secure code review checks that controls exist, they're applied consistently, and that they haven't accidentally been bypassed, weakened, or misplaced. And this is the important part. You don't need to understand every attack to do this well. You just need to understand where trust changes and what is supposed to protect that boundary. That's it.
SPEAKER_00:When you focus on the controls and trust boundaries, secure code review becomes concrete, repeatable, and pretty fast. Let me show you how security usually slips by during code review in real life. A pull request comes in and it adds a new endpoint or a new handler, or there's a small refactor. The reviewer looks at it and they check the code compiles, the tests pass, the naming looks good, there's nothing obvious that's broken, looks good to me.
SPEAKER_00:And then guess what didn't get checked? Right? No one verified whether the endpoint was behind authentication. No one checked whether authorization happened before that action. No one checked that it happened every single time. No one noticed that the input validation was actually happening after that data had already been used in your system. And maybe no one confirmed what happened if a request fails, and so we don't have a plan for that. This isn't because reviewers don't care.
SPEAKER_00:That's not it. It's because the code looked reasonable and the review didn't explicitly ask security questions of the reviewer. The security controls weren't obviously wrong. They were just, they're missing, they're misplaced, or they're assumed. And that's how insecure code gets approved by good developers. It's not through negligence, it's through a mission. What should we be looking for during a secure code review? When you are doing your code review, you don't need to inspect everything for security.
SPEAKER_00:You only need to focus on additions or changes that affect security controls or trust boundaries. And here are the four areas that matter the most that I would like you to start with. I'm telling you this so that you can just start with four things. Eventually you can do more things, but please just start with these four. One, input and entry points. Any new input, parameter, request body, or event is a risk boundary. Ask, where does this data come from?
SPEAKER_00:Is it validated already? What happens if it's malformed or it's malicious? Two, authentication and authorization. Any changes that affect who can do what deserves attention. Ask, who is allowed to trigger this? Is that enforced in code or is it assumed? Do we reuse an existing known safe pattern, or are we just yellowing it and making something new? Three, data handling and secrets. Any changes that touch sensitive data or credentials are high risk.
SPEAKER_00:So ask yourself, where does this data live? Is anything being logged that shouldn't be logged? Are secrets pulled from a secret management tool or are they being hard-coded? 4. Error handling and logging. Errors often leak information or hide problems if we don't handle them well. So ask yourself, what happens if this fails? This is an extremely important question. Do we expose internal or sensitive info? Would we know if this was abused? So these four areas catch the most serious issues, and I really want you to start with those four things.
SPEAKER_00:And now let's go over the bad, better, best, shall we? A bad approach is trying to mentally simulate every possible attack. That is exhausting and unrealistic and quite frankly a waste of time. A slightly better approach is assuming tooling or the security team will find all the issues later. And yes, they'll find some, but it is far from perfect and it's an expensive approach. The best way to do this is focusing security review on what's changed in terms of security controls and trust boundaries, which means new inputs, new permissions, new data flows, new integrations.
SPEAKER_00:When you look for these consistently, secure code review becomes fast and repeatable. If you do just one thing after this episode, please do this. Add a small security checklist to your pull request template. Keep it short, just three to five questions, perhaps the four that I suggested. Let me give you an example actually. Does this change include new inputs? Does it change who can access something? Does it touch sensitive data or secrets? What happens if this fails?
SPEAKER_00:You don't need to answer yes to all of these. You just need to think about them as you're reviewing the code. This turns secure code review from vibes into an actual repeatable habit. So for clarity, secure code review isn't about being paranoid, it's about being intentional. And when developers review for risk regularly, security stops being so scary and it starts being part of just regular engineering. Thanks for listening to DevSecStation. If you enjoyed this episode, please subscribe, share it with a friend, or leave a review.
SPEAKER_00:It helps more people discover the show. If you'd like to learn more, I'm Tanya Jenka, also known as SheHacksPurple. And I teach secure coding training for software developers. You can find me online at shehackspurple.ca. Thank you for being here.
Transcript supplied by the publisher with the episode.
Podcast
DevSec Station
Tanya Janca | SheHacksPurple · Tech & Science · English
DevSec Station is a security focused podcast for software developers who want to create amazing applications. Hosted by Tanya Janca, also known as SheHacksPurple, these short lessons will help you level up.
More from DevSec Station All episodes →
-
S2 · E1 · 8 Oct 2026 · 9 min
Your AI Worked 59 Times. What About the 60th?
What happens when your AI assistant does exactly what you expect 59 times... and then does something completely bananas on the 60th? While teaching a secure coding class, I watched nearly 60 students use the same AI assistant, programming language, and prompts. For 59 of them, everything went as expected. But one student's AI-generated Python code included instructions to suppress linting checks, followed by code that leaked secrets to an external file. The AI hadn't escaped a sandbox. It ...
-
S1 · E12 · 23 Sep 2026 · 7 min
Security Requirements: What They Are and How to Add Them to Your Project
Security problems don't generally happen because developers 'don't care' or lack skill. They happen because no one clearly defined what "secure" meant in the first place. When security expectations are left implicit, developers are forced to guess. And that's where vulnerabilities are born. This episode is sponsored by Maze. In this episode of DevSec Station, Tanya Janca explains what security requirements are, why they're one of the most overlooked secure development practices, and how devel...
-
S1 · E11 · 9 Sep 2026 · 7 min
Threat Modeling for Developers (How To)
Threat modeling has a reputation for being complicated, full of diagrams, and requiring long meetings. In reality, most developers already do it, they just don't realize it. The difference is that doing it intentionally helps you catch security problems before they become security incidents. This episode is sponsored by Maze. In this episode of DevSec Station, Tanya Janca breaks threat modeling down into a simple five-step process that any developer can use while designing a feature. You'll l...
-
S1 · E9 · 12 Aug 2026 · 8 min
The Most Common Secure Coding Mistakes Good Devs Make
Security bugs aren't usually caused by 'bad developers'. More often, they're the result of good developers making rational decisions under deadlines, competing priorities, and imperfect systems. This episode is sponsored by Maze. In this episode of DevSec Station, Tanya Janca explores why common secure coding mistakes are often incentive problems rather than knowledge problems. You'll learn why insecure patterns emerge, why simply telling developers to "be more careful" doesn't work, and how ...
-
S1 · E8 · 29 Jul 2026 · 7 min
Secure Defaults Beat Secure Training
Security training has its place. But if training alone solved security problems, we wouldn't keep seeing the same vulnerabilities appear over and over again. The real problem usually isn't that developers don't know what to do; it's that the easiest path is often an insecure one. This episode is sponsored by Maze. In this episode of DevSec Station, Tanya Janca explains why secure defaults are one of the most effective security controls you can implement, why relying on memory and willpower ra...
-
S1 · E7 · 15 Jul 2026 · 6 min
Why Current Security Tools Fail Developers
Security tools are supposed to help developers build safer software. But sometimes it seems like they create more frustration than security. This episode is sponsored by Maze. In this episode of DevSec Station, Tanya Janca explains why many security tools overwhelm developers with alerts, how alert fatigue erodes trust, and why "more findings" doesn't mean "more security." You'll learn how to tune your classic AppSec tools so they surface meaningful issues instead of creating noise that every...
-
S1 · E6 · 1 Jul 2026 · 8 min
Vibe Coding, Copilots, and Security Drift
AI coding assistants can help developers move incredibly fast. But this new speed comes with a new challenge: security drift. This episode is sponsored by Maze. In this episode of DevSec Station, Tanya Janca explores how tools like GitHub Copilot, ChatGPT, Cursor, and other AI coding assistants can unintentionally change the security assumptions your software was built on. You'll learn what security drift is, why it happens so quietly, and how to keep the benefits of AI-assisted development w...
-
S1 · E5 · 18 Jun 2026 · 7 min
Secrets Management: Stop Playing Whack-a-Mole
If you've ever committed an API key, password, token, certificate, or other secret to a repository, you're not alone. Most secret leaks don't happen because developers don't care about security. They happen because the easiest place to put a secret is inside the code that uses it. This episode is sponsored by Maze. In this episode of DevSec Station, Tanya Janca explains why secrets leak, why "just be careful" isn't an effective security strategy, and how developers can stop playing whack-a-mo...
