The OWASP Top 10 just got a fresh update, and there are some big changes.
Supply chain attacks, exceptional condition handling, and more.
Tanya Janca is back on Talk Python to walk us through every single one of them.
And we're not just talking theory here.
We're going to turn Claude Code loose on a particularly crappy web project and see what it finds.
Let's do this.
It's Talk Python To Me, episode 545, recorded April 8th, 2026.
Talk Python To Me.
Yeah, we ready to roll.
Upgrading the code.
No fear of getting old.
Async in the air.
New frameworks in sight.
Geeky rap on deck.
Quarth Crew, it's time to unite.
We started in Pyramid.
Cruising old school lanes.
Had that stable base, yeah, sir.
Welcome to Talk Python To Me, the number one Python podcast for developers and data scientists.
This is your host, Michael Kennedy.
I'm a PSF fellow who's been coding for over 25 years.
Let's connect on social media.
You'll find me and Talk Python on Mastodon, Bluesky, and X.
The social links are all in your show notes.
You can find over 10 years of past episodes at talkpython.fm.
And if you want to be part of the show, you can join our recording live streams.
That's right.
We live stream the raw uncut version of each episode on YouTube.
Just visit talkpython.fm/youtube to see the schedule of upcoming events.
Be sure to subscribe there and press the bell so you'll get notified anytime we're recording.
This episode is brought to you by Temporal, durable workflows for Python.
Write your workflows as normal Python code and Temporal ensures they run reliably, even across crashes and restarts.
Get started at talkpython.fm/Temporal.
Hello, Tanya Janca.
Welcome back to Talk Python To Me.
Awesome to have you here.
Oh my gosh, Michael.
It's so nice to see you.
Yeah, it's really great to see you as well.
I remember last time I was nervous you were on the show because you're going to make me feel concerned about all my software running on the internet that now all has all these issues I just realized.
We're back for the 2025 edition.
And I know the year is 2026.
Please don't email me.
I mean, email me, but not for that reason.
But this is the 2025 OWASP top 10, which is pretty new, right?
Yeah, so we released it December 31st, 2025 so that it could stay 2025 on it.
Do you know how much branding has to change if we don't get it out this year?
Let's just go.
That's incredible.
I didn't realize it was that close to the wire.
We had released the release candidate.
So every time it's released, we release a release candidate to say, this is what we're thinking.
And then we ask the community for feedback.
And I don't know if you remember in previous versions before I joined, there was some drama where sometimes the community is like, absolutely not.
You are incorrect.
Or there's vendor influence or whatever.
And then they've had to rework it.
But this time it was the smoothest it's literally ever been since the first time where all the links were or all the GitHub issues were great.
Like, hey, you know, here's a great example of that attack.
Do you want to use it?
And we're like, yes.
Or, you know, the grammar is wrong here or the, you know, the links are wrong.
We had a couple of, well, this one should be number one because that's what my product solves.
We're like, well, we'll hear that feedback.
Exactly.
You failed to mention our product.
I'm like, oh, I do see how that happened.
Yeah.
But other than like the feedback was overall just overwhelmingly, yes, we agree, which was very validating.
Yeah.
I'm sure there was a lot of, boy, if I could get the OWAS top 10 to reference my solution.
That's some good marketing right there.
Incredible.
So before we dive into that with a bit of a Python focus, let's just hear a little bit about you, who you are.
You've started a podcast since you've been on the show.
Tell us about you.
So I'm Tanya and I was a software developer that switched into application security.
I went to the dark side, Michael.
I started speaking at conferences so I could get in free and writing and then ended up writing two books.
And now I teach secure coding and like how to use AI securely and all of those things to large companies.
And then speak at conferences.
Serve as like a habit.
I can't stop.
You don't get paid to do that usually.
And so recently I started a podcast called DevSec Station.
And it's five to 10 minute lessons on secure coding and it's free.
I used to have a podcast called We Hack Purple Podcast and I, like my company got bought and absorbed, et cetera.
And eventually the podcast was retired.
I've missed having a podcast, Michael.
I'm sure as a podcast host, you can relate.
It's really nice to be able to create a piece of art and release it.
It's a very interesting medium and you get to just reach out to people or explore ideas that are just interesting to you.
And long as there's a through thread, you can kind of do whatever you want to.
It's great.
Yeah, I love it.
I wanted to teach some lessons and I wanted them to be just really short.
And the first season I'm exploring the idea that the supply chain is changing.
The supply chain security used to be just dependencies that people worried about.
But now I'm like, what if that tech surface is actually very different than we realize?
And so I'm talking about how developers can protect themselves, protect the organizations, protect their build pipelines, et cetera.
And so, yeah, I'm excited to see what people think of it.
Yeah, I encourage people to subscribe.
That's really cool.
Five to 10 minutes.
Is it daily or weekly?
So I released one two weeks ago and I was kind of thinking of releasing one tomorrow, but I need to just get the edits.
It's, I hired some students and they're learning video editing and it's been very exciting.
Yeah, that's the back end of all this type of work that people don't realize is it's an hour or 10 minutes or whatever, but then there's the whole production distribution, et cetera.
I'm just a control freak.
That's the problem, Michael.
I just want to do it myself.
Yes, exactly.
There's a bit of a wind noise thing.
Can we do that again?
No, it is tough.
It is really, really tough to kind of find that balance.
But yeah, people check that out.
That's awesome.
Yeah.
And is SheHacksPurple still your domain?
Yeah.
So if people go to SheHacksPurple.ca, you will find my website and my services and my blog.
So lately I'm blogging a lot about how we can combine behavioral economic interventions, which is like the science of why people make decisions to the software development ecosystem
so that we basically set up secure defaults and other things that just nudge developers to do the secure thing and make the secure thing always the easiest path.
And so not how do we manipulate them and pressure them and make them feel bad, but more how can we remove cognitive load that's not necessary?
How can we make it more obvious what we hope that they'll do?
How can we make it so like it requires effort to do the bad thing?
There's a phrase that I got, I think from Scott Guthrie was the one who spoke about it at Microsoft, but it doesn't really matter.
The help people, help developers and security folks fall into the pit of success.
Like you've got to climb out of the thing you're supposed to do and actively do it wrong.
You know what I mean?
Exactly.
So I'm writing a series on that based on a talk I did.
So sometimes I'll do a talk and then I'm really excited about it.
And I'm like, well, now I can nerd out as much as I want on my blog.
I want to talk about what is the OWASP top 10?
What is OWASP?
What is the OWASP top 10 and all of that?
But before we kind of get into that, I do want to set the stage just a little bit, because when people think about Python security or you pick your language, there's like every language and framework has a little security gotchas.
Like in Python, there's a, I think it's a YAML parser, but it's too, it can run arbitrary code.
So you got to do like the safe YAML parsing.
And then there's, there's pickles, which is a serialization format that can run arbitrary code.
So people say, these are the things to look out for.
I actually think those are fairly useless.
I think the real problem is things that developers do to write code and they either omit or add actions or steps that they should or shouldn't have done depending on the situation.
And really that's what OWASP focuses on, right?
Technically it is in a nonprofit organization, but in what I feel it is, is an international community of thousands and thousands and thousands of people who want there to be more secure software.
And so we have chapters where people meet each month.
There's over 300 worldwide, Michael.
It's amazing.
Wow.
Yeah.
Almost every big city in all of Canada has one.
And like, we can't agree on a lot of things in Canada, but apparently we love OWASP.
And like in India, oh my gosh, they have so many.
And in the United States, like people love, oh, I love OWASP.
And then we have over 100 active open source projects.
So we have free books, free documents, free tools, free software, like everything you can think of.
We're like, oh, I'll build one for you.
And then, you know, there's a Slack channel with thousands of us on there being nerds together.
And then twice a year, we have one in Europe and one in North America where we have a conference and we gather and there's talks and teachings and all the things, right?
And I've been a part of OWASP since 2015 was the first thing I attended.
And then 2016, I was a chapter leader because I don't know how to do small things.
I only know how to do really big things because I was like, oh, I'm in.
And I've just been, so I'm now a lifetime distinguished member because I've volunteered for over 10 years and I'm their biggest fan.
I'm totally president of the non-existent fan club.
And the thing, so the weird thing, Michael, so OWASP does so many amazing things.
There's so many amazing people.
But the thing that we're absolutely most famous for is called the OWASP top 10.
And I volunteered in Norway at the OWASP booth at a conference because I gave a talk and then I had nothing else to do.
And I don't mean to sound rude, but unless it's a security talk, I'm not going.
And it was a developer talk.
And so I went to the other two security talks and then I was like, what am I going to do?
So I volunteered at the OWASP booth.
And every person that walked by went top 10.
That's awesome.
And any of them that knew us, they only knew the top 10.
They didn't know we had chapters.
They didn't know we had any other things to help them.
But literally person after person, top 10.
That's pretty funny.
Like a few weeks later, the top 10 team invited me to join.
And I was like, me?
And I was like, okay.
I knew about the whole project because of the top 10 as well, honestly.
Well, I mean, then we're doing a great job.
And so we finally wrote a new one.
And the team's like, okay, Tanya, you like talking the most.
So you go tell them.
You go tell them it's ready.
Actually, if you go to the OWASP top 10, there's a GitHub link at the top.
And you can see that there's, if you go there, you can actually see historically the 2003, 4, 7, 10, 2017, 2021, and the 2025.
And you go and there's all the markdown files and presentations and et cetera.
So you can kind of get the historical evolution as well.
People file issues.
And then I have to, me or, you know, we're twisting or that's what we do.
We respond.
Sometimes we respond and we're like, no.
This is the third time you've asked.
No.
We talked about it twice.
Yeah.
We try really hard to always be open because the community, sometimes we don't have the data that supports the thing.
But let me tell everyone what it is.
So if you've been hiding under a rock, the OWASP top 10 is an awareness document of the top 10 things, according to the data we gathered and multiple community surveys of risks to web applications.
Most of them relate to all software, but technically this one is about web applications.
And you might not realize, but underneath the next steps, there's three more secret items because we couldn't decide, Michael.
And Vibe coding needed to be on there.
And then there was sort of a tie for the number 10.
So we want to include the one that was the tie.
And then we felt memory safety is still so unbelievably critical.
We had to comment on that as well.
So we had to talk about those as well.
So that was good.
So it's the top 10, but these are three other things for your consideration that are very important.
I did not realize those.
How interesting.
I do think in whenever you release your next version in two, three, four years, whatever, there's going to be a strong AI bent and we're going to get into the AI angle of security in this conversation, which is going to be really fun.
But yeah, I think we're just beginning this.
Like you called it out with Vibe coding, but there's more to that even.
Making the top 10 is complicated because we have to do it based on data.
And the data I would like would be the postmortem from security incidents and would be, you know, the AppSec team telling us the things that are happening, not what we actually
get, which is a bunch of SaaS vendors and DAS vendors telling us what their automated tools are capable of finding.
And then a bunch of boutique pen tester companies who are so generous to give us their reports and to try to normalize that for us.
And like we end up with millions and millions and millions of records and that's great.
But if a SaaS tool is really good at finding X, that doesn't necessarily mean that X is the biggest problem in our industry.
And so when we put supply chain security on there and expanded it from just being libraries, like, oh, you're using outdated or vulnerable components.
Like, yeah, that's bad.
But there's also malicious components.
There's also you didn't lock down your CI and then the co-op term, like the co-op or you call them interns, put too many zeros on the Kubernetes deployment.
And then you've got $30,000 bill you weren't expecting or like I've seen it, right?
I feel like it's hard to get data that tells the full picture.
And we're not allowed to just say, well, this is what the team thinks, right?
So that's where the surveys come in.
And we're like, this is what we see.
This is what we think.
Do you agree?
And like across the board, everyone was like, supply chain must be on that list.
You must expand it.
We agree.
I think it's the biggest issue of the year, at least of the last six months.
If we look at reports like the Verizon breach report and the CrowdStrike and the like the big reports of many, many breaches, if we look at the big ones, the nation state ones,
their supply chain, or in my opinion, if we really look at it, we think about it, they exploited the developer.
They compromised a developer within an organization.
It gave them access to multiple parts of the supply chain.
And then they owned the entire organization.
So if you get SQL injection in one app, you got into one database and maybe you could read sensitive data.
Maybe you could delete sensitive data.
If that database was completely unpatched in a total like terrible mess, then maybe you could take over that server.
Then if your network's totally not secure and crappy, which is not exactly that common, like I'll look at, you know, network diagrams with clients and I'm like, oh, that line, is that a firewall?
They're like, it's more aspirational.
I've heard that many times, right?
Then maybe they could pivot and get to a couple of places, but that's like, maybe, maybe, maybe, maybe, maybe you get a little bit, but you compromise a senior developer.
Right.
And so, yeah, I was really glad when the team agreed that we would do this and then the community supported it.
So I was like, yes, win.
Yeah.
You compromise a developer, then you get.
Especially a senior.
Yeah, exactly.
You get arbitrary code execution on potentially all the stuff that they send out to the world.
It's, it's really bad.
You know, an example of that would be the last past breach.
Yeah.
And the way that that all started from what I understand is one of the developers had an outdated version of Plex, the like streaming ripped video player on his home network that was open on the internet.
That got taken over.
Then they got into the dev machine and then they got everybody's password vaults.
It's like, excuse me, because you had a movie player on your home automation network.
That's crazy.
There's been some recent hacks where the developers download like a plugin or something and it's malicious.
And then not only is it trying to steal like secrets off their computer, but then it robs their crypto wallets.
Because why don't you just kick someone when they're down like jerks?
It's terrible.
Well, we'll circle back to that.
But I do think the vibe coding side is going to be a big deal in the future and you'll have a little bit of a challenge there.
I think obviously professional developers love to bag on vibe coding.
And I think that that's totally fair.
But the problem is, I think a lot of that is kind of dark matter.
Like you'll never see the people because the people do vibe coding.
They don't know to go and fill out a survey for OWASP.
They don't even know what a line of code looks like.
They're just make me happy.
You know, it's crazy.
And now some companies are building dark factories, which is a term that was new for me, which is where they replace their entire software development team only with complete AI end to end solutions where there's no human in the loop whatsoever.
And oh my gosh, Michael, imagine the security posture of what's being released there and the fact that they don't know what the posture is, right?
But they're getting to market faster than someone else.
Yes.
And so consumers don't know that what they're buying has been put together with duct tape and glue.
So I actually, we didn't talk about this beforehand, but I hope it's okay to mention.
So I'm trying to push a secure coding law in Canada.
So Canada is cute and quaint, just like all the stereotypes.
And a citizen is allowed to create a petition if she could get a member of parliament to support her.
And after three years of letter writing, one of them did.
Wow.
Congratulations.
Thank you.
In the house of commons and I have enough signatures, so it's going to go to vote.
And so right now I'm lobbying all the public to try to get them to call their member of parliament and ask them to vote.
Yes.
Because what happens is my member of parliament will be like, Hey, seven one, one, five says this.
We should create a secure coding law for all governmental organizations, have a standard and then, you know, assure the standard, make, make sure there's compliance.
And I also like wrote the standard for them and sent it to them.
Cause that's what I'm like, I'm like, you don't have to use it, but like, here it is in case you want one.
I've been writing letters for years.
I'm very annoying.
Guess what?
Members of parliament don't know what the word cyber means.
Like they're very smart.
I'm not trying to mock them.
I'm not an expert in what they do either.
Right.
And so I need members.
So Canadians, if you're listening, go like, look up petition E seven one, one five.
You'll find me sign it and then call or write your member of parliament.
So if enough of us call, if like 10 or 20, 30 people call the member of parliament or they receive emails, Michael, when the petition comes up, they're like, Oh yeah, my constituents care.
Therefore I do.
And they'll raise their hand and I get one chance.
And I really want a lot of hands going up specifically at least half of 334 people.
Good luck with that.
I hope that that goes through.
That's cool.
We'll know by June.
Yeah.
That's the challenge with legislatures and government in general.
So many of the people, especially elected officials, they're not elected because they're developers or security specialists or whatever.
Right.
But the difference is that you said it's fine because you don't know what they do.
You're not an expert in law or whatever.
That's that is true.
But they have to choose how it's going to work for us through technology, whereas you don't have to choose how law works for them as a tech.
You know what I mean?
Like it's they decide.
So it's I'm not saying that it's their fault or anything, but it is a very tricky thing to balance.
It is.
And this is why I, as like a influential person or whatever, are trying to use my influence for good.
And I'm trying to protect Canada.
And here's the thing, Michael, is that if Canada creates a law that does this, that is huge momentum for every other country.
And Canada was one of the first countries to have privacy laws.
Like we really led the way in that.
We really have led the way in like laws for quantum as well.
And like, we're not really used to being that we're just, you know, struggling along and we could lead the way in this.
Right.
And then that means other countries can say, well, they have one.
Like, do we really want to be behind Canada?
I mean, come on.
We love Canada.
Canada is awesome.
Yeah, we're sweet and we're wonderful.
And we mean well all the time.
This portion of Talk Python To Me is sponsored by Temporal.
Ever since I had Mason Egger on the podcast for episode 515, I've been fascinated with durable workflows in Python.
That's why I'm thrilled that Temporal has decided to become a podcast sponsor since that episode.
If you've built background jobs or multi-step workflows, you know how messy things get with retries, timeouts, partial failures, and keeping state consistent.
I'm sure many of you have written brutal code to keep the workflow moving and to track when you run into problems.
But it's trickier than that.
What if you have a long-running workflow and you need to redeploy the app or restart the server while it's running?
This is where Temporal's open source framework is a game changer.
You write workflows as normal Python code and Temporal ensures that they execute reliably, even across crashes, restarts, or long-running processes while handling retries, states, and orchestrations for you so you don't have to build and maintain that logic yourself.
You may be familiar with writing asynchronous code using the async and await keywords in Python.
Temporal's brilliant programming model leverages the exact same programming model that you are familiar with but uses it for durability, not just concurrency.
Imagine writing await workflow.sleep.
Heim Delta, 30 days.
Yes, seriously.
Sleep for 30 days.
Restart the server.
Deploy new versions of the app.
That's it.
Temporal takes care of the rest.
Temporal is used by teams at Netflix, Snap, and NVIDIA for critical production systems.
Get started with the open source Python SDK today.
Learn more at talkpython.fm/Temporal.
The link is in your podcast player's show notes.
Thank you to Temporal for supporting the show.
Let's shift just a little bit to maybe people who don't necessarily mean well, the people who might exploit, you know, broken access control or other types of things.
And to aid us here, going through the OWASP top 10, I've come up with a little example of, well, this is what some of the concrete examples might look like.
Maybe I'll put a link to this and I'll reference them.
And I don't know how often I'll totally use this.
But let's start with this one.
And if I understand it correctly, you all don't like suspense.
It's the worst comes first, then the second worst, and then the third worst.
Yeah, we go in order of this.
So this is, it causes lots and lots of damage.
It's not that hard to find or exploit.
And it's everywhere.
It's everywhere.
When I talk to people that do pen testing, they're like, yeah, I find this basically every time.
Like one of my friends, Katie Paxton Fear, she does API content and pen testing and bug bounty and stuff.
And she said, I have never not once found broken access control in an API, like never once.
And it's really hard to get right, Michael, because every single page, every single record, every single access, we should check that the role is allowed.
And that they still are that role, right?
So we continue to make sure the session's accurate and then grant access.
And unfortunately, we just forget to ask a bot.
Or we return the entire record set, and we'll just sort it out on the front end.
And the malicious actor is like, thanks for the data set.
That's so sweet of you to give that to me.
And we just screwed up so much, so much.
I would like to point out that these are not a single vulnerability.
It's not like this is the number one issue.
They're like categories, right?
It's like violations of these could be you didn't use least privilege, or you bypass a control check, or you didn't put access control on the delete part of the API.
You know, like there's a bunch of things that fall into each one of these, right?
It's a category.
They're all a bucket.
And when we looked at the data, poor code quality was a bucket.
I'm like, no, because all of the things go into that bucket, right?
The OWASP top one.
OWASP top one.
And then also the mitigation advice is, what if you sucked less, right?
Like there's no constructive feedback to poor code quality.
It's not specific enough.
So we didn't want buckets like that.
Keep it actionable, right?
Yeah, exactly.
If it's not actionable, it's not worth raising awareness about, we felt.
And broken access control, Michael, it's everywhere.
And I wish there was like a product that you could buy that could just do this for you.
So you can buy authentication products that manage session and identity like really, really, really well, right?
And people buy the crap out of them because they work really well.
I'd like to be able to buy an access control tool that was as easy to implement as, I'm going to try not to name brands, but you know the products, right?
People pay a lot of money for Okta, you know, at like Active Directory, you know, Incognito because they work, right?
And they work well.
And the less painful they are to implement, the more likely, like they're willing to pay more for that, right?
And so if we could solve this issue, like I think that could be pretty huge.
Yeah.
I got a couple of examples here that were, they're not obvious.
Some are obvious, kind of like, here's a Django example.
We might see this later.
So you might have an admin endpoint and it has at login required, which is a decorator in Django that will do the validation before the function even runs.
And so you look at it like, oh yeah, this is fine.
It's using authentication here, but it's not using authorization.
It's not checking that the person necessarily is an admin.
It's just that they're logged in, right?
Like that's a real simple example.
Yep.
And I see the problem.
Another one would be if you say we're going to let people read and write files.
Maybe it's like a WordPress type thing or something.
But then if they can put dot, dot in their path and break out, let me read the file dot, dot, slash, dot, dot, slash, et cetera, dot password and read the passwords or whatever, or usernames.
This is the type of stuff that falls in a broken access control or just no login checks at all.
I literally did this yesterday, Michael, because someone was like, hey, go get this file from there.
And then I go in the folder and it's not there.
Like the link wasn't correct.
So I just went through the web directory with that.
Like, but they wanted to send me the file.
So just to be clear, like, like they sent me and told me to go get it.
I wasn't stealing anything.
And I didn't end up eventually finding it either.
So then they had to send me another link that was correct.
But I was like, oh, I'll just like not waste their time.
I'll just go look for myself because it's that easy.
Incredible.
It's like, I'm going to use their tools, but not in a way that they necessarily expected.
Well, I mean, they could have just sent me the right link.
Exactly.
They should have just sent you the right link.
Yeah, I've I have some I cannot recount them here, but my dad, he I've got to let you help take care of him and stuff now these days.
And he can't do a lot of his own paperwork and things.
And so I've had to do some crazy stuff to to get access to or to help him fill out something that, yeah, it's insane.
OK, let's go on to number two.
This is just setting the wrong configurations, not following the hardening guide, not doing patching.
And this is so easy for a malicious actor to find because there's scanners.
I joke whenever anyone's like, oh, like, you know, we don't want to do a pen test because it might break our thing.
And I'm like, well, you're actually having a penetration test done all the time.
If you're on the Internet, you just aren't receiving the report.
That is absolutely so true and so disturbing.
If if if you're out there listening and you have something on the Internet, API website, whatever, and you have not just tailed the log of it and just see slash WP slash admin slash this slash that just coming at it left and right.
You're like, what is going on?
Because it doesn't show up in your analytics.
I actually had someone find something on my website that I was surprised about because I had a user from my blog from long ago and they could see my user and then it gave my
email address and it was actually a personal email address that I because I had a backup admin account and I used my personal email and he is like, did you want that on there?
I'm like, no, only my mom and my dad email me there because I'm bad.
And if my parents write me, I should write back.
Right.
And so I'm like, oh, that's the personal email that I'm supposed to answer on time.
He wrote me and helped me like turn off that setting that I had no idea about despite having multiple security plugins and having run an audit.
I'd miss that.
This one could evolve for like Python people like Django with debug equals true.
Now this is the most, probably most used misconfiguration example for Django apps out there.
You're like, well, of course, Michael, I know you don't set debug true in production.
You do it all the time.
People do it.
You're right.
And then two, there's like 10 other settings that are, should be in production that are not in production in Django.
Like HSTS.
Yes, please.
And a bunch of other, you know, do not allow me to put it, be put into an iframe and all sorts of other things, content security policies and security headers.
Yes, exactly.
This is what happened with Claude Code.
And this is how they, they essentially allowed debug and production, like by not suppressing their map file and then also not having it as part of their git ignore, which is essentially having debug mode in prod.
And that's how they lost their source code.
Just to be clear, I'm not shaming the developer that did that.
They probably didn't have a checklist for that person.
They probably didn't have anything that scanned to tell them that those settings were incorrect.
Right.
They probably don't even have a policy that clarifies.
They're like, oh, they should just know not to do that.
Right.
And then they were rushed.
Probably they're in a hurry.
And then.
Yeah.
They're shipping three or four times a day, which I appreciate, but at the same time.
Yeah.
And then now very bad things are happening.
It is going to be the most audited code that has ever happened.
Michael.
I've seen so many videos parsing that stuff apart.
It's wild.
Yeah.
For people who don't know, I'm sure people heard clog code got leaked, but basically the map file in JavaScript says, here's the minified version.
But if you want to show the full source version for helpful debugging, here it is.
And there's how you get to it.
And that apparently got shipped.
And people were just like, you know what?
Why don't we find out what those files are actually?
And it was two security misconfigurations because one of them would have stopped it from going and the other one would have like not had it been in the package in the first place.
Right.
And it's number two.
And it happens even to the really, really, really, really, really high profile, you know, high security assurance requiring places.
I have a third one on this list that I think will really surprise people like for real.
So imagine this.
I've got a self-hosted app and I'm going to run it on a Docker in Docker.
You know, it could be Kubernetes.
It could be whatever.
But I'm going to run it in Docker on my server.
And it has both a web interface and a database.
And the database is running on the default port and so on.
So that's all fine.
But it's in Docker and everything's locked down.
And so what you could do is you can use this thing called UFW, uncomplicated firewall on Linux.
Turn that on and say block or don't block.
Only allow my web port.
And in your Docker compose file, you often or even just Docker statements, you see map, say Postgres, port 5432 to 5432.
Guess what?
That's actually open on the Internet, probably with the default password on that database.
Because if you look at the Docker docs and you go to the bottom, it says uncomplicated firewalls, a friend that ships with Debian and Ubuntu unless you manage firewall.
Docker and UFW use firewall rules in ways that make them incompatible.
When you publish the container ports on Docker traffic, it gets diverted before that.
So guess what?
That's open on the Internet.
Holy smokes.
Is that it's so common to just see this port on the container map to this port on the server.
And if you're thinking that UFW on your firewall is going to save you, it's actually just open on the Internet.
Like I didn't realize that.
And so, for example, what do you do?
Well, you say localhost colon my port on the server.
So you're shipping, you're only listening locally.
You don't have, or you just don't do that.
But that's a really subtle and sneaky one that people should be aware of.
The thing is no one can memorize all of this.
And so what is the answer, Michael?
Checklists?
Checklists are good.
Scanners?
Scanners are good.
Honestly, I think the modern top tier AI agentic tools are really good.
They find a surprising amount of these things.
They find them if you ask them to find them, or they make it part of the code that they give you when you just ask for it.
Because people just say, I want the app.
They don't say, I want a secure app necessarily.
And well, it's more efficient to not worry about the security.
We'll save you some tokens.
Even if you just say, I want a secure app.
So I gave a conference talk two weeks ago at RSA called Insecure Vibes.
In the demo that I recorded in advance that was not part of the slides when I gave my live presentation, but it's on my YouTube.
I just asked Claude, I'm like, can you make a login function that's for an insulin pump?
So this is a medical device that needs to be really secure.
And it does it.
And then after I'm like, analyze it for vulnerabilities.
And multiple AIs found critical vulnerabilities in it.
So I asked for it to be secure.
So you can't just say, I want to be secure.
You have to say, and this is what secure means.
I do think you can find a lot if you use the tools in the right way.
But like you said, you've got to ask.
And it's a proper step.
Software supply chain failures.
Number three.
This is the expansion.
So this used to be vulnerable and outdated components, which is part of your software supply chain.
But Michael, I'm sure that I've told you this before, but for people that haven't heard me, blah, blah, blah, about it.
Every single thing that you use to create and maintain your software is part of your supply chain.
So that includes your browser, the plugins in the browser, the sandbox you created, your CI, all the settings in the CI, where you're getting your libraries and packages from, how you're getting them.
So do they maintain integrity across the wire when you get them?
Could it be that you got something else?
Like every single thing that you're using to maintain and create is part of the supply chain.
And so we need to protect the whole thing.
And like we were saying earlier, developers themselves are becoming targets of malicious actors.
We need to find ways to defend the developer themselves, protect them, make them safer doing their jobs, right?
And help them find ways to secure the whole supply chain that's not too painful because they still need flexibility in order to be creative.
So some Python things that you can do concretely here is pin your dependencies.
You can use pip compile or you can use uv lock files.
There's all sorts of things that are possible there.
And then you can also, I think the other side that we haven't mentioned, Tanya, is like known vulnerabilities in packages.
I think a lot of people, I would say over 95% of the people that install libraries from PyPI, they don't even check whether or not there's a vulnerability in that package before they install it.
I would like to see.
So in 2022, the first company announced this idea of reachability.
So let's say you want to do math.
So you install a math library.
We don't actually want to do all of math, right?
We probably just want to do calculus, but maybe the vulnerabilities in the statistics function, right?
And so when your code calls all the calculus functions, you're like, woo, derivatives.
You're not actually, there's no reachable path from your code to the vulnerability.
Most of the time, that means it's not exploitable, except for if it's log4j, then you're just screwed.
Just to be clear, you're just in trouble, right?
But for most things, like 99.9% of the time, then you're fine if there's no reachability.
And so software composition analysis tools, sometimes called supply chain security tools, when the marketing teams got a little out of hand.
I feel like if you do one of the 19 attack surfaces within the supply chain that you don't get to call yourself a supply chain tool, but I digress.
I have strong feels.
That's so overwhelming.
I'm just not even going to look at it.
I have a known vulnerability in one of the packages that I am shipping to production.
I think it's a PDF package or something like that.
I can't remember.
And I scan all my builds with pip audit and it will fail the build.
So I have to ignore it because it is a vulnerability when you call a path that I don't call and you're running on Windows.
And I'm trying to deploy it to Docker.
And I'm not calling that path.
I'm like, I understand it's a problem that could be an issue under some circumstances, but it doesn't apply here.
And I just need to use it.
And it's a Windows problem on my Docker Linux.
I don't really care right now.
I mean, it's fine.
Until they fix it, I'll be okay.
Well, and especially if you know what the problem is and you're not going to suddenly switch to Windows, why would you do that?
So the tools are maturing, but they're not perfect.
And lots of them are going at different speeds.
We'll just say that.
So I look forward to the day where there's reachability done on all of those things.
This portion of Talk Python To Me is brought to you by us.
I want to tell you about a course I put together that I'm really proud of, Agentic AI Programming for Python Developers.
I know a lot of you have tried AI coding tools and come away thinking, well, this is more hassle than it's worth.
And honestly, all the vibe coding hype isn't helping.
It's a smokescreen that hides what these tools can actually do.
This course is about agentic engineering, applying real software engineering practices with AI that understands your entire code base, runs your tests, and builds complete features under your direction.
I've used these techniques to ship real production code across Talk Python, Python Bytes, and completely new projects.
I migrated an entire CSS framework on a production site with thousands of lines of HTML in a few hours.
Twice.
I shipped a new search feature with caching and async in under an hour.
I built a complete CLI tool for Talk Python from scratch, tested, documented, and published to PyPI in an afternoon.
Real projects, real production code, both Greenfield and legacy.
No toy demos, no fluff.
I'll show you the guardrails, the planning techniques, and the workflows that turn AI into a genuine engineering partner.
Check it out at talkpython.fm/agentic dash engineering.
That's talkpython.fm/agentic dash engineering.
The link is in your podcast player's show notes.
One of the other things I wanted to mention is like, so you said pin dependencies.
And so I teach this and then inevitably every time someone's like, well, if I pin dependencies forever, then I just have all these really old dependencies.
That's not what Michael means.
He means you do development, you update your dependencies to a version.
Like ideally you're like LTE, you're like latest, you know, stable version of whatever the thing is.
Because you're trying to keep like definitely as supported version, recent, you're not picking terrible things where, you know, it hasn't been updated in two years, or there's one maintainer and they happen to live in Russia and work for the Russian government, right?
So you're picking like decent ones.
You're updating it in dev.
You're like, okay, this is the one.
Then you pin it.
So as it goes up to different environments, you don't get a surprise update and it changes.
And then there's something different in prod than what you tested in UAT and approved with the security tools.
That's what, that's what.
And a hundred percent.
Because it gets misinterpreted.
Yeah.
And another thing to do that you can do real simple is like with some of the tools, like with uv, you can say, I have pin dependencies, update them to the current ones
with a very important caveat that you can say that are older than a week or older than a day or something.
But because, you know, the really big example here is LLM, light LLM, just this, was that just this week or was that last week?
I can't keep it.
It was very recent.
Yeah.
This thing has a dependency that itself became, like you talked about, the developer got taken over, I believe, and a virus got put in and it was only out for like half an hour or something, but it took over, it's so popular.
It got, took it, took it over like 50,000 machines because it gets downloaded millions of times a day.
Automatically.
If you say, give me the latest, he's like, obviously waiting a week is not hardcore security, but at the same time, so many of these popular issues that people take, they only last briefly, right?
For a few moments.
And then somebody's like, oh my gosh, why is this thing using 100% CPU?
You know what I mean?
And here's the thing, Michael, is that not all of those 50,000 got the memo that this happened and they're still vulnerable in prod and they could be from them.
Yeah.
It could be for a long time.
Yes, I agree.
Like update, but to, you know, one that's three days old or one week old, it's weird.
So this advice has drastically changed over the past six months.
The best practice used to be auto update to latest version, period.
That used to be the advice and that's no longer the advice.
And it's kind of heartbreaking, especially if you use npm.
NPM is just like under siege.
It is.
Yeah.
High PI is as well, but it looks over at npm as thankful for its situation.
Number four.
Or I got to keep cruising here.
For cryptographic failures.
Cryptographic failures.
Yeah.
Not encrypting.
Encrypting using something really old.
You start off encrypted and then briefly you're not encrypted and then you're encrypted again.
You don't encrypt it when you're supposed to.
Also in this realm, one way hashing, not just reversible encryption, right?
It would probably fall in here.
Encrypting user passwords and storing them in the database along with the key.
Ideally, we would hash and we would salt and then hash user passwords.
That would be the best.
If you really, really, really, really are intense, you could pepper it too.
And no, I did not make that up.
That is a mathematical nerd joke, not an app sec joke.
But a salt is unique per user and the salt itself isn't really a secret.
Where a pepper is unique per system or per organization.
And it is a secret.
Right.
Like a secret key that you set and then it gets factored in there.
That's cool.
Yeah.
Also, maybe choose more modern hashing algorithms, right?
Obviously not MD5, but maybe something memory hard like Argon maybe.
I don't know.
Yes.
Argon 2.
That would be better for sure.
And this is something where if you're going to do it, it's very easy to look up what you're supposed to do on the internet.
This is something where you can ask the AI, like, are you using a good algorithm?
Are you doing this?
Like, make sure it's secure.
And then it's good as long as it does it.
Because one suggestion, if you are going to VibeCode and not do the 400 other things we'll talk about later when we talk about my prompt library, but ask it to list its security assumptions.
So whatever it is you prompt, you give it to make a thing.
You're like, make this, then do that, blah, blah, blah.
Please list all your security assumptions.
And it'll be like, oh, yeah, but obviously like you wouldn't do like authentication like that because that's terrible.
And like in production, you would do this other thing and you're like, oh, yeah, because it'll assume that you're going to change a bunch of things later that it doesn't tell you unless you ask it to tell you its assumptions.
Yeah.
We'll use no password here, but when you ship it, you're going to add that, right?
Like, no, I wasn't going to, but now I will.
All right.
I think one of the best known ones has got to be little Bobby tables and friends.
Number five, injection.
Yes.
So injection, tricking an application in, like you put your code, the malicious actor's code into a place where it should be data, but you've tricked it into thinking it's its code.
And then either it executes it or it interprets it.
Like if there's an interpreter, there's a compiler, there's the potential for injection.
And it, yeah, we don't want to mix data in with commands.
We don't want to mix data in with anything that's going to be executed or interpreted.
And we do it a lot, Michael.
I know we make bad choices, don't we?
We make bad choices.
So obviously SQL injection is the number one in this world for sure.
And still it's popular.
Still people don't know.
It's still tricky.
I mean, we have certainly parametrized queries and ORMs and stuff that should be helping us or does help us if we choose to use them with this.
However, I think other ones should just give them a quick shout out.
Like for example, if you're accepting JSON and converting it to a dictionary in Python, you can do MongoDB injection.
Like your password, you know, the Bobby tables one is like quote, semicolon drop table that, you know, like that's what that looks like in T-School.
But in MongoDB, you can do queries that are dictionaries.
That's like kind of how you do your filtering.
So if you take something that would be a password in a JSON document, the password could be curly brace greater than, you know, one equals one.
Like a really complicated JSON dictionary that is actually the query that is equivalent.
So you got to be super careful there as well.
And that's really tricky to do that.
And then also like the pickles and like serialization, deserialization.
There's a lot to this, not just SQL injection.
It's a lot about input validation.
So using a parametrized query, so store procedures, prepared statements, whatever you want to call them.
What that does is says this is data only treated as data.
And then the database can do that.
But if we, on top of that, do input validation.
So like we're getting the thing that looks correct and we're rejecting, we're not trying to fix it.
We're just rejecting everything that looks not correct.
And then if we have to accept any special characters, we escape them or sanitize them out.
I prefer escaping.
I think it's weird to remove stuff.
That's my data.
I probably want it.
So like if you have to accept single quotes because you know you're going to have users named O'Malley, let's say.
Right.
So we accept the letters.
We accept the numbers.
We accept a single quote and some dashes, even though those are dangerous.
And then we escape those characters because we know they're potentially dangerous.
And then we specify, by the way, that's definitely data and not code by making it a parameter.
Right.
And then we're locked down.
We're in really good shape.
If we olded input validation on everything and then we just rejected everything that looked weird, especially against like we always need to do like a yes list and allow like this is allowed list.
Not like when I was a pen tester, Michael, I was not.
I was a pen tester for a year and a half.
I had basically zero training and I could get around those in two seconds.
And like I was not particularly superbly talented.
And I was just like, pew, pew, pew, ha, ha, ha, ha, ha, block list.
You just try.
If you just know to look, right?
Yeah.
Well, and there's cheat sheets all over the internet of how to get around them.
It's so everyone knows how to get around them.
So, but you can't get around.
Well, you're only allowed letters and numbers.
It's like, well.
Let's keep moving a little bit quickly so that we know that we're, we got time for a little retrospective.
So insecure design, that's a fun one.
It does not matter how perfectly you follow the plan if the plan is bad.
Right.
And so this is, this was new on the last time we released the list was the first time it was on there.
And I'm really glad because all the other items are implementation.
And this is the only one that is design the plan.
And so essentially it means, you know, someone designed something and you don't talk about it.
You don't analyze it for security.
You don't intentionally apply secure design concepts.
You don't do a threat model.
There's no security review.
You YOLO that.
You don't even have a list of security requirements usually that you knew you should have added.
Like if you're going to do an API and it's, you know, visible from accessible from the internet, to me, it should be behind an API gateway, period.
That is my opinion.
No, I don't sell one, but I think we all need one.
Right.
And to me, that should just be a requirement up front.
And then when I see your design document and it's there, I'm like, thumbs up, let's go.
Right.
But if you're not giving clear requirements and then you're not reviewing the design, you are getting a YOLO approach at stuff.
And that doesn't mean developers don't care.
But if no one's taught them this, no one's asked for this, and then no one checks this.
The problem with this one is the code looks fine.
It looks like you're doing it right.
It's just there's something important that's just not even there.
Like examples that I came up with were like no rate limiting would be one.
The login looks fine.
You're checking the person's not a duplicate that they're there, et cetera, et cetera.
Right.
Or a client side enforcement and some kind of like Vue.js act.
You've got all the validation there, but the API actually just assumes the client is doing it, which is never the way.
And there's a lot of business logic issues that will be the way that you're solving the problem.
If users do the thing you want, it's fine.
But not all users do the thing you want.
And some of them are Tanya.
And they're like, well, I'm just going to click through your.
Exactly.
Some of us are curious and we like to click the buttons.
We're like, oh, look at that.
Oh, there's a next button, even though it says it's the last page.
Well, what would happen if we click that?
Absolutely.
You've got to click that button, right?
Authentication failures, number seven.
So this is when an attacker can trick the app into thinking they're a different user, usually an admin user.
Or if they're not a legitimate user, tricking them into being a legitimate user.
But we all want to be admin, Michael.
Oh, yeah.
This can be caused by lots of things.
We wrote our own authentication instead of buying a tried, tested, and true product that will do this for us easier, better, faster, and cheaper in the long run when we count maintenance.
That's the biggest mistake.
But we don't protect against credential stuffing.
We don't protect against brute force.
Those are the two super, super huge ones.
We let people reuse passwords, use terribly insecure passwords, etc. We don't have multiple forms of authentication.
So there's no second factor.
Yeah.
And there's, Michael, there are ways to do multi-factor that don't, like, have to be awful necessarily.
Like, if you don't require the same level of security, like posture.
So, for instance, you know, you do have multi-factor authentication for the first time.
But then maybe you fingerprint their browser and their device and their network.
And if they're going to log in from the same device, the same browser, and the same network, maybe you don't require an MFA challenge very often.
A hundred percent.
Like, you could say, trust this machine or this browser.
And you're like, okay, we'll never ask you 2FA again.
Just your username, password.
Or we won't, unless you're doing something like deleting your account.
There's ways to make this not necessarily always super painful.
And I, you know, pass keys are so nice.
Those are making things a lot nicer.
But I still feel like there's a ways to go.
I dream of the day where we trust our devices so well that, like, I can just touch the thing and I know it's okay.
Right?
And I know that someone can't just, like, XKCD hit me with a wrench until I put the thing in front of my face and then it unlocks.
Exactly.
That is one of the weakest parts of the security chain there.
Mm-hmm.
Software or data integrity failures?
Number eight.
So this is one we fought a lot about.
Yeah.
Especially me and Neil.
Because Neil, I wrote this one and Neil wrote the supply chain one or vice versa.
And there's lots of arguments of how to differentiate.
So we need to make sure that things we download are exactly what we think they are and that the integrity, it's not been spoofed or tampered with in the meantime.
So no one has changed it.
And this is for data and for software.
So, you know, third-party components that we're getting.
Are we getting the thing we thought?
Is there a table squat?
Is, has someone been able to intercept in between and change it out?
Same with data.
Like, did someone change the data on the way to us, et cetera.
And this is really key, especially for things that require anything medical.
Like imagine the insulin pump that gets it wrong sometimes and people have comas.
Like that would be so unbelievably bad.
That's very bad.
Yeah, I worked with a company that did like all the medical devices and instruments and ORs and ERs and security assurance.
Hi.
It was an awesome project.
It was really cool, but it was also like, damn, your job hard.
It's tough to sleep at night in that one.
Yeah.
The thing is, is that private industry tends to really focus on availability.
Like if their website's down, they can't sell their thing.
Clients call, it costs them money.
Right.
But integrity is like more silent hurt, if that makes sense.
Yeah.
So many of these are like this, honestly.
Like the whole top 10 is only, it only slows you down and it's sand in the gears until something happens.
And then it's your fault for not doing it.
But before that, it's like all this stuff is a hassle.
And integrity, it comes into play in so many situations because some, it can fail silently.
Things that fail silently are more scary for security teams.
Does that make sense?
People love to use CDNs for their JavaScript and their CSS and so on.
And there've been examples where the CDN was taken over or another developer could have been compromised who published a malicious JavaScript.
And the danger with this is if you make that hack go through, you don't just take over that app.
You take over all the people who use that app and everyone who uses the CDN to pull it out.
Like it can be really the knock-on effects are mega.
Yeah.
And like checking the sub-resource integrity, doing that check, that can help.
Sometimes we can do all the right things and we still get hurt.
Because like for instance, with SolarWinds, the compromise was so deep in the organization that they were able to not only push in like code that was malicious, have it pass all the security tests in the pipeline, then sign it and then release it.
And then not have customers also notice the problem.
Like that situation is rare.
What we want to do with this one is raise awareness that you should just be checking the integrity of your stuff, period.
Right?
So the software composition analysis companies, the security researchers, they're on it finding those rare edge case zero day situations.
What we need the average developer to do is just check integrity, period.
Like the thing you've got is what you think you've got and it's from the right place.
And if we could all do that, like life would improve greatly.
There's defaults that are not great.
For example, check this out.
JS deliver are Tailwind.
So here's a real popular CDN delivering a very, very popular library.
Here's how it tells me to use it.
What's missing here?
Sub-resource integrity check.
Yes.
So if I just say, I want to use this Tailwind and it says, great, source equals such and such.
Good to go.
You know what I mean?
And that's it.
So even the really popular CDNs and stuff are just encouraging you to fall, to scramble from the pit of success.
You know, it's not that at all.
Maybe we should write them and be like, I want you to change this, please.
When I worked at Microsoft, I did that all the time.
I'd be like, you need to change your readme page.
It's wrong.
You forgot the security thing.
And they'd be like, Tanya, just, it's a demo.
I'm like, nope.
Two more real quick before we run out of time.
Logging and alerting.
So security logging and alerting.
So developers might be doing lots of logging and they might be doing some alerting for debugging, which is important and you should still do it.
But this is more that we're not logging when security controls are called and especially pass or fail.
So if someone tries to log in 100 times in one second, I don't want to know the 100th time that they got in.
I want to know all 99 times where they failed in the logs.
Right.
I want to have enough information in those logs that I can do a proper investigation.
Like when I worked in AppSec, my job wasn't called incident responder.
But every time an app got smashed, they're like, okay, Tanya, do you saying that you do that weird thing?
And I would go look at the logs.
And I remember a client calling me one day and they're like, Visa called us and 27 of our customers got popped and we need you to go investigate.
And turns out they didn't have any logs.
They didn't think they needed to log that.
And so they had absolutely no application logs for that log for that app.
Sorry.
And I was like, when am I supposed to investigate walk around the building with like a magnifying glass and just look cool with a hat on?
Like there's nothing, there's no evidence.
There's probably somebody in the corner with a hoodie, sunglasses looking sort of hacker-ish.
Right.
Like, I'm just like, what am I supposed to investigate guys?
Like you have no logs at all.
You got to just let it keep going.
Basically, you got to say, well, now we add logging and then we can figure out if there's new stuff happening or something.
It's really bad.
It turns out it wasn't them.
It turned out that there's a sandwich shop downstairs and an employee had swiped cards and everything from our end was fine.
But then I was like, we are rewriting this app so that it does security logging and failure.
So essentially, you're making it so we can't investigate.
You're making it so there's no evidence that a thing happened.
We can't press charges in court.
There's no chain of custody.
We'll never know what happened.
And then that means we don't know how to protect ourselves in the future.
And we really need these logs.
So every time a security thing happens, input validation, output encoding, like anything that is security related, just log that the attempt was made and it worked or it didn't work.
And, you know, which user ID, et cetera, things like that.
And the timestamp.
All right.
Last one.
Let's round it out real quick with mishandling of exceptional conditions.
So this is brand new and this one is related to the other one.
So number nine was basically you're not doing logging when you should or your logs suck.
They're incomplete.
This one is errors happen and you just don't handle them properly.
So I'm sure you've reviewed code and seen this where it's like try and it does a thing and then catch and then there's nothing and then end.
I'm like, what?
You didn't handle anything.
Or the handling is just I'm going to print the entire system error to the screen with the stack trace and a mess.
Nope, that's gross.
I'm just going to not properly recover.
Right.
And so application resilience is important, but you can't have that at all.
If you're not doing this, you can't recover.
Yeah.
Or you don't use a database transaction and it's data is corrupted, something like that.
This is where a lot of business logic flaws, like really unique bugs happen that are harder to find because we are not handling our errors at all or we're handling them very, very poorly.
And I was really excited to have this on here because lack of application resilience tied for this one for spot number 10.
But if you solve this, you almost always solve lack of application resilience.
But if you solve lack of application resilience, you do not solve this.
And so I was like, and so that's how I got them to agree to put this one on.
And so the other one, having technical discussions with really smart people, it's pretty cool.
Absolutely.
So I want to take a moment and talk about AI and security and give you a chance to talk about your prompt library and how people can get it.
And while you're doing that, I'm going to pull up an example I can kick off.
So tell people about it and I'll pull up the example.
I give training and I do this bad, better, best thing where I give an example.
So I'm like input validation or whatever the topic is, you know, like a brief lecture on it and best practices.
Then I give an example of bad code.
Then we fix that thing, better code.
And then best codes, like layers of defenses.
And when I was creating these examples with the AI, Michael, every time the example was bad code, like no security control whatsoever or completely incorrectly done.
So like you get the input, you use it and then you validate it.
Right.
So it has gotten better.
So over the past two years, I've seen it go from every time bad to maybe half the time.
It's a bad example.
Sometimes I have to dumb it down now, which is encouraging.
But that's obviously not what we want.
And so the AI, I think everyone knows, is not creating great code.
And the reason is it was trained on not great code.
Most code out there is not great code.
The code specifically it used was demos, examples, things on GitHub, publicly available demos where there's no security team involved.
Right.
So like if you went and scanned the code inside Microsoft that makes the Microsoft products, you better believe it, that'd probably be pretty darn good code versus some random crap Tanya did five years ago that's on her GitHub.
That might be really crappy or it might even be intentionally vulnerable.
Right.
And it doesn't.
Yeah.
No.
And so as a result, we have this thing that's trained that security just it's optional, it's low priority and it's missing.
And so it is doing what it was trained to do.
And developers and non-developers are constantly making apps now.
We have CEOs making apps because they don't like what the marketing team did.
And they're like, look what I did over the weekend.
Boom.
It's publish, please, because I'm the boss.
Oh, I've seen it.
Like literally.
Yeah.
Who's going to say no, right?
Yeah, exactly.
And so here we have very, very insecure code going onto the internet very, very quickly, often with no time for the security team to go look at it.
All right.
So you've got this prompt library that people can go and get from your website for free.
You gave me an example to say, go find problems in this code.
I took just some random code that I know has trouble in it and threw it in here.
So the secure code prompt library, if you want to go, just go securemyvibe.ca and you do have to join my newsletter to get it.
But I feel that's a reasonable price because my newsletter is awesome and you get memes.
But anyway, so this is from that.
So the prompt library has many things, but one of them is to review the code for security.
So this is a code review prompt.
So after you've generated the code, you would put this in.
We have high risk findings.
That looks like an, and what number was that?
We got more findings, mass assignment, unvalidated JSON.
Yeah.
And look how short your code was.
I gave it 62 lines of code here.
And you are going to have more vulnerabilities than you have lines of code.
Okay.
So I'm not going to go into the details, but wow, I just gave it a little bit and it pulled up a whole bunch.
So I think that that is.
Did this find more than when you just asked it to review for vulnerability?
Yeah, I think so.
I think it did actually.
Because if you put the AI in the right frame of mind, right?
That's incredible.
Well, and I gave it specific things that I wanted it to look for.
So the prompt library has three levels.
So prompt level one, you would make, you would add it to your memory or make a code skill, but you would make it run 100% of the times that you generate code.
And it takes most of the first two thirds of my most recent book, Alice and Bob Learn Secure Coding, and it has condensed it into a set of prompts.
Oh, that's awesome.
When you build the code, these are the rules for doing so.
Then, so that runs just every single time.
And then it tells you all of its security assumptions and it flags any potential security issues for you automatically.
So every time you generate code, it's like, I need you to know these things.
And so then you can address them.
And then level two prompts are, well, I'm going to build an API or I'm going to build a serverless app or I'm going to do this or I'm going to do that.
And then you fill in the blanks and it helps basically set security requirements before the code's generated.
So it does the first prompt and then that as like a double check.
Then after you can run the secure code review check.
And then level three is like where you want to get nitty gritty.
Like you're like, I'm doing a user login feature and I want to hash these passwords very securely.
Like, and then it's very specific about exactly how to do that.
And it's free.
Yeah.
People should definitely check this out.
That's very cool.
All right.
We are out of time, Tanya.
Thank you so much for being here.
Final thoughts.
People want to get going with the new top 10.
Please go take a look at it.
So just look up OWASP top 10 and that will be us.
Like Google's very good at finding us and maybe give it a read and maybe think about it the next time you are building an app.
Also, maybe consider visiting your local OWASP chapter.
Next time you want to, you know, search the internet how to do something that is security related, look up OWASP cheat sheets and then authentication, authorization or wherever you're doing.
There's over 100 cheat sheets.
We are a community that lives to serve and help you secure your software.
And come check out me.
If you look up She Acts Purple, I am all the things, the newsletter, the podcast, the blog, et cetera.
And I'm also here to help.
Well, I know you're doing really good stuff.
I really appreciate your time here.
Thank you, Tanya.
Thank you, Michael.
This has been another episode of Talk Python To Me.
Thank you to our sponsors.
Be sure to check out what they're offering.
It really helps support the show.
This episode is brought to you by Temporal, durable workflows for Python.
Write your workflows as normal Python code and Temporal ensures they run reliably, even across crashes and restarts.
Get started at talkpython.fm/Temporal.
If you or your team needs to learn Python, we have over 270 hours of beginner and advanced courses on topics ranging from complete beginners to async code, Flask, Django, HTML, and even LLMs.
Best of all, there's no subscription in sight.
Browse the catalog at talkpython.fm.
And if you're not already subscribed to the show on your favorite podcast player, what are you waiting for?
Just search for Python in your podcast player.
We should be right at the top.
If you enjoyed that geeky rap song, you can download the full track.
The link is actually in your podcast blur show notes.
This is your host, Michael Kennedy.
Thank you so much for listening.
I really appreciate it.
I'll see you next time.
и Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би Би
Thank you.