3/6/2026 at 7:57:50 PM
I recommend that anyone who is responsible for maintaining the security of an open-source software project that they maintain ask Claude Code to do a security audit of it. I imagine that might not work that well for Firefox without a lot of care, because it's a huge project.But for most other projects, it probably only costs $3 worth of tokens. So you should assume the bad guys have already done it to your project looking for things they can exploit, and it no longer feels responsible to not have done such an audit yourself.
Something that I found useful when doing such audits for Zulip's key codebases is the ask the model to carefully self-review each finding; that removed the majority of the false positives. Most of the rest we addressed via adding comments that would help developers (or a model) casually reading the code understand what the intended security model is for that code path... And indeed most of those did not show up on a second audit done afterwards.
by tabbott
3/7/2026 at 1:05:38 PM
I have a few skills for this that I plug into `cargo-vet`. The idea is straightforward - where possible, I rely on a few trusted reviewers (Google, Mozilla), but for new deps that don't fall into the "reviewed by humans" that I don't want to rewrite, I have a bunch of Claude reviewers go at it before making the dependency available to my project.by staticassertion
3/6/2026 at 8:27:27 PM
I'm curious: has someone done a lengthy write-up of best practices to get good results out of AI security audits? It seems like it can go very well (as it did here) or be totally useless (all the AI slop submitted to HackerOne), and I assume the difference comes down to the quality of your context engineering and testing harnesses.This post did a little bit of that but I wish it had gone into more detail.
by Analemma_
3/6/2026 at 11:53:02 PM
OpenAI just released “codex security”, worth trying (along with other suggestions) if your org has access https://openai.com/index/codex-security-now-in-research-prev...by j-conn
3/6/2026 at 9:28:26 PM
The HackerOne slop is because there's a financial incentive (bug bounties) involved, which means people who don't know what they are doing blindly submit anything that an LLM spots for them.If you're running the security audit yourself you should be in a better position to understand and then confirm the issues that the coding agents highlight. Don't treat something as a security issue until you can confirm that it is indeed a vulnerability. Coding agents can help you put that together but shouldn't be treated as infallible oracles.
by simonw
3/7/2026 at 1:10:23 AM
That sounds like the same problem (a deluge of slop) with a different interface (eating straight from the trough rather than waiting for someone to put a bow on it and stamp their name to it)?by hansvm
3/7/2026 at 1:33:06 AM
I've found it's pretty good. It's really not that much of a burden to dig through 10 reports and find the 2 that are legitimate.It's different from Hacker One because those reports tend to come in with all sorts of flowery language added (or prompt-added) by people who don't know what they are doing.
If you're running the prompts yourself against your own coding agents you gain much more control over the process. You can knock each report down to just a couple of sentences which is much faster to review.
by simonw
3/7/2026 at 2:44:49 AM
You also probably have a much better idea of where the unsafe boundaries in your application are. Letting the models know this information up front has given me a dozen or so legitimate vulnerabilities in the application I work on. And the signal to noise ratio is generally pretty good. Certainly orders of magnitude better than the terrible dependabot alerts I have to dismiss every dayby Mapsmithy
3/7/2026 at 6:15:15 AM
Seems very similar to turning on compiler warnings. A load of scary nothings, and a few bugs. But you fix the bugs and clarify the false positives, and end up with more robust and maintainable code.by stubish
3/6/2026 at 10:29:06 PM
The question still is: will enough useful stuff be included, to make it worth to dig through the slop? And how to tune the prompt to get better results.by johannes1234321
3/6/2026 at 11:53:27 PM
I assume it's just like asking for help refactoring, just targeting specific kinds of errors.I ran a small python script that I made some years ago through an LLM recently and it pointed out several areas where the code would likely throw an error if certain inputs were received. Not security, but flaws nonetheless.
by unethical_ban
3/6/2026 at 10:42:03 PM
Best way to figure that out is to try it and see what happens.by simonw
3/6/2026 at 11:36:28 PM
[claimed common problem exists, try X to find it] -> [Q about how to best do that] -> "the best way to do it is to do it yourself"Surely people have found patterns that work reasonably well, and it's not "everyone is completely on their own"? I get that the scene is changing fast, but that's ridiculous.
by Groxx
3/7/2026 at 12:05:15 AM
There's so much superstition and outdated information out there that "try it yourself" really is good advice.You can do that in conjunction with trying things other people report, but you'll learn more quickly from your own experiments. It's not like prompting a coding agent is expensive or time consuming, for the most part.
by simonw
3/6/2026 at 11:44:21 PM
/security-review really is pretty good.But your codebase is unique. Slop in one codebase is very dangerous in another.
by nl
3/7/2026 at 2:26:56 PM
For those not aware, this is a specific feature available in Claude Code.https://support.claude.com/en/articles/11932705-automated-se...
by LamaOfRuin
3/7/2026 at 9:35:07 PM
that's kinda what I was looking for tbh. I didn't know that was an option, and nothing in the thread (or article) seemed to imply it was.I was mostly working off "well I could ask claude to look at my code for security problems, i.e. 'plz check for security holes kthx', but is that really going to be the best option?". if "yes", then it would kinda imply that all the customization and prompt-fiddling people do is useless, which seems rather unlikely. a premade tool is a reasonable starting point.
by Groxx
3/6/2026 at 10:46:53 PM
That depends on how the tool is used. People who ask for a security vulnerability get slop. People who asked for deeper analysis often get something useful - but it isn't always a vulnerability.by bluGill
3/6/2026 at 10:54:59 PM
You're either digging through slop or digging through your whole codebase anyway.by ronsor
3/6/2026 at 8:55:25 PM
We split our work:* Specification extraction. We have security.md and policy.md, often per module. Threat model, mechanisms, etc. This is collaborative and gets checked in for ourselves and the AI. Policy is often tricky & malleable product/business/ux decision stuff, while security is technical layers more independent of that or broader threat model.
* Bug mining. It is driven by the above. It is iterative, where we keep running it to surface findings, adverserially analyze them, and prioritize them. We keep repeating until diminishing returns wrt priority levels. Likely leads to policy & security spec refinements. We use this pattern not just for security , but general bugs and other iterative quality & performance improvement flows - it's just a simple skill file with tweaks like parallel subagents to make it fast and reliable.
This lets the AI drive itself more easily and in ways you explicitly care about vs noise
by lmeyerov
3/6/2026 at 8:29:27 PM
No mention of the quality of the engineers reviewing the result?by ares623
3/7/2026 at 1:21:42 AM
This is exactly how I would not recommend AI to be used.“do a thing that would take me a week” can not actually be done in seconds. It will provide results that resemble reality superficially.
If you were to pass some module in and ask for finite checks on that, maybe.
Despite the claims of agents… treat it more like an intern and you won’t be disappointed.
Would you ask an intern to “do a security audit” of an entire massive program?
by SV_BubbleTime
3/7/2026 at 1:51:38 AM
My approach is that, "you may as well" hammer Claude and get it to brute-force-investigate your codebase; worst case, you learn nothing and get a bunch of false-positive nonsense. Best case, you get new visibility into issues. Of _course_ you should be doing your own in-depth audits, but the plain fact is that people do not have time, or do not care sufficiently. But you can set up a battery of agents to do this work for you. So.. why not?by padolsey
3/7/2026 at 2:00:13 AM
IMO the key behavior is that LLMs are really good at fuzz testing, because they are probabilistic monkeys on typewriters that are much more code-aware than a conventional fuzz tester. They cannot produce a comprehensive security audit or fix security issues in a reliable way without human oversight, but they sure can come up with dumb inputs that break the code.The results of such AI fuzz testing should be treated as just a science experiment and not a replacement for the entire job of a security researcher.
Like conventional fuzz testing, you get the best results if you have a harness to guide it towards interesting behaviors, a good scientific filtering process to confirm something is really going wrong, a way to reduce it to a minimal test case suitable for inclusion in a test suite, and plenty of human followup to narrow in on what's going on and figure out what correctness even means in the particular domain the software is made for.
by creatonez
3/7/2026 at 5:25:39 AM
>the key behavior is that LLMs are really good at fuzz testing, because they are probabilistic monkeys on typewritersThat's exactly what they're not. Models post-trained with current methods/datasets have pretty poor diversity of outputs, and they're not that useful for fuzz testing unless you introduce input diversity (randomize the prompt), which is harder than it sounds because it has to be semantical. Pre-trained models have good output diversity, but they perform much worse. Poor diversity can be fixed in theory but I don't see any model devs caring much.
by orbital-decay
3/7/2026 at 6:14:54 AM
What is there to loose in trying?Basically, don't trust AI if it says "you program is secure", but if it returns results how you could break it, why not take a look?
This is the way I would encourage AI to be used, I prefer such approaches (e.g. general code reviews) than writing software by it.
by krzyk
3/9/2026 at 2:24:01 AM
Because if you want the work done correctly, you WILL put the time you thought you were saving in. Either up front, or in review of its work, or later when you find out it didn’t do it correctly.by SV_BubbleTime
3/7/2026 at 3:09:00 AM
It depends whether anyone was ever actually going to spend that week doing it the "hard" way. Having Claude do it in a few minutes beats doing nothing.Put another way: I absolutely would have an intern work on a security audit. I would not have an intern replace a professional audit though.
It's otherwise a pretty low stakes use. I'd expect false positives to be pretty obvious to someone maintaining the code.
by eli
3/7/2026 at 3:26:32 AM
My point is that it’s one thing to say I want my intern to start doing a security audit.It’s another thing to say hey intern security audit this entire code base.
LLM’s thrive on context. You need the right context at the right time, it doesn’t matter how good your model is if you don’t have that.
by SV_BubbleTime
3/7/2026 at 4:42:43 AM
> Would you ask an intern to “do a security audit” of an entire massive program?Why not?
You can't relies solely on that, but having an extra pair of eye without prior assumption on the code always is good idea.
by j16sdiz