Better HN
topnewbestaskshowjobs
Log inSign up

staticassertion

13,486 karma · joined Jun 1, 2016 (10y ago) · 4,896 submissions

@insanitybit
Submissions

comment 8mo ago · link · parent

Most devs aren't very good. That's the reality, it's what we've all known for a long time. AI is trained on their code, and so these "subpar" devs are blown away when they see the AI generate boring, subpar code.

The second you throw a novel constraint into the mix things fall apart. But most devs don't even know about novel constraints let alone work with them. So they don't see these limitations.

Ask an LLM to not allocate? To not acquire locks? To ensure reentrancy safety? It'll fail - it isn't trained on how to do that. Ask it to "rank" software by some metric? It ends up just spitting out "community consensus" because domain expertise won't be highly represented in its training set.

I love having an LLM to automate the boring work, to do the "subpar" stuff, but they have routinely failed at doing anything I consider to be within my core competency. Just yesterday I used Opus 4.6 to test it out. I checked out an old version of a codebase that was built in a way that is totally inappropriate for security. I asked it to evaluate the system. It did far better than older models but it still completely failed in this task, radically underestimating the severity of its findings, and giving false justifications. Why? For the very obvious reason that it can't be trained to do that work.

comment 8mo ago · link · parent

I absolutely have the hang of Claude and I still find that it can make those ridiculous mistakes, like replicating logic into a test rather than testing a function directly, talking to a local pg that was stale/ running, etc. I have a ton of skills and pre-written prompts for testing practices but, over longer contexts, it will forget and do these things, or get confused, etc.

You can minimize these problems with TLC but ultimately it just will keep fucking up.

comment 8mo ago · link · parent

Agreed. When I've written very low level code where there are "odd" constraints ("this function must never take a lock, no system calls can be made" etc) the LLM would accidentally violate them. It seems sort of obvious why - the vast majority of code it is trained on does not have those constraints.

comment 8mo ago · link · parent

Maybe, but the person they're responding to seemed to be genuine in their question, and I worry that they'll read a statement like "they mostly ate meat" and think it's plausible when it's insanely incorrect.

comment 8mo ago · link · parent

lol this is such utter bullshit? I'm blown away by how confidently stated and how utterly incorrect this is.

1. Ancient egyptians ate fucktons of wheat and barley, lentils, chickpeas, etc. They ate massive amounts of fiber lol I mean holy fuck I just can't believe how wrong you are?

2. Fiber is very, very well understood by ALL health organizations to be preventative for colon cancer.

comment 8mo ago · link · parent

> Yeah, i wonder what was the fiber i take for someone from egypt or hunter gatherers.

Very high.

> But if a person is regular and does not have any gut issues, how would more fiber help?

There is a ton of research about this and it's why WHO and other orgs state explicitly that fiber reduces rates of colon cancer.

comment 8mo ago · link · parent

I think that's all very fair.

comment 8mo ago · link · parent

That's fine. It's just unclear to me if the parent poster is being critical exclusively of people "irl" giving unsolicited advice or if they're speaking to the forum of users who come here explicitly to discuss topics like these.

If it's the former, I'm ambivalent. I don't give advice as a general rule. If it's the latter, I find that totally silly.

comment 8mo ago · link · parent

> My comment is that it is not ONLY low fiber diets.

Well, you said "can't" and I asked "why", which feels very reasonable to me. Your argument seems to be that it wouldn't account properly for the data - specifically, you're saying we would have seen colon cancer rates rise earlier.

> Western diet collapsed its fiber intake well over 80 years ago - it would have shown up already.

I don't really buy this for a lot of reasons. Probably the two most important are (a) ability to screen historically and (b) the timing isn't particularly "off" for the fiber argument. We did see it already, we've been seeing increases in color cancer risks for decades.

Now, I'm not married to it "just" being fiber whatsoever, but if I were to "bet" on the major contributing factor, naively, that's where my money would go. I think it's very reasonable to not place your bet there.

comment 8mo ago · link · parent

You're on a discussion forum where the topic is colon cancer. Surely you understand that people are going to discuss it?

It's a bit hard to tell from your post what you're saying. Certainly I can imagine being annoyed by constantly being given health advice from layman. But this is... a forum.

comment 8mo ago · link · parent

Uh, what? I have not made a presuppositional argument (I made no argument at all...). I made a statement about my epistemic state - ie: that I would "bet" on low fiber being the major contributor to colon cancer rates. Someone then asserted that it can't be that, and I asked "why?".

> Why would more fiber help?

Because there is an incredible amount of research into high fiber diets being good for your gut, including reduced colon cancer rates. This is the consensus of various organizations such as WHO - high fiber diets have lower risks of colon cancer.

comment 8mo ago · link · parent

Why?

comment 8mo ago · link · parent

This is my personal bet. It's just low fiber diets.

comment 8mo ago · link · parent

Yeah for sure, it's a real issue. In general, seccomp feels hard to use unless you own your stack top to bottom.

comment 8mo ago · link · parent

This is a problem but fwiw libc's should be falling back to old system calls. You can block clone3 today and see that your libc will fall back to clone.

comment 8mo ago · link · parent

I don't think so. I've never had Claude reject the idea of finding a vulnerability (unlike ChatGPT). The issue is that it's limited by its training set. It'll be trained on things like UAF, it won't be trained on things like "the way your secrets are injected + the way you make HTTP requests + the way you deploy means that an SSRF can expose your private key" or whatever, and that's a technology limitation.

comment 8mo ago · link · parent

People should really just use integers.

It's funny how fast it is to just implement a counter and how much people rely on UUIDs to avoid it. If you already use postgres somewhere, just create a "counter" table for your namespace. You can easily count 10K-100k values per second or faster, with room to grow if you outscale that.

What do you get? The most efficient, compressible little integers you could ever want. You unlock data structures like roaring bitmaps/ treemaps. You cut memory to 25% depending on your cardinality (ie: you can use u16 or u32 in memory sometimes). You get insane compression benefits where you can get rows of these integers to take a few bits of data each after compression. You get faster hashmap lookups. It's just insane how this compounds into crazy downstream wins.

It is absolutely insane how little cost it is to do this and how many optimizations you unlock. But people somehow think that id generation will be their bottleneck, or maybe it's just easier to avoid a DB sometimes, or whatever, and so we see UUIDs everywhere. Although, agreed that most of the time you can just generate the unique id for data yourself.

In fairness, UUID is easier, but damn it wrecks performance.

comment 8mo ago · link · parent

I don't really respond to email. I prefer to keep things scoped to single discussions on forums. Beyond that, I'm simply not an expert on these topics so I suspect we'll hit limits almost immediately to what I can meaningfully engage in before I either lead you entirely astray or simply have nothing to provide.

There are numerous academics in this area though who I suspect would be quite interested in discussion, and I'd point you towards the Stanford Encyclopedia of Philosophy as the defacto resource for these topics.

I'm actually quite sick with a fever currently so you'll have to excuse me for such a brief response, I'm barely awake as it is.

comment 8mo ago · link · parent

I don't think that matters at all.

comment 8mo ago · link · parent

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.

comment 8mo ago · link · parent

I don't think this is an issue of experience here. I don't know that anyone has claimed that LLMs can create truly novel solutions to complex problems given that the technology is token prediction.

comment 8mo ago · link · parent

https://news.ycombinator.com/item?id=47274478

comment 8mo ago · link · parent

I suppose it's mixed results but a coverage report should give you "these exact lines are uncovered" and it becomes pretty straightforward to see "ah yeah that error condition isn't tracked, the behavior should be X, go write that test".

comment 8mo ago · link · parent

My point is that "verifiable testcases" works great for proving "this is vulnerable" but LLMs are still risky if you believe "this is safe", which you can't easily prove. My point is that you need to be very skeptical of when they decide that something isn't vulnerable.

I completely agree that LLMs are great when instructed to provide provable, repeatable exploits. I have done this multiple times and uncovered some neat bugs.

> I can't really confirm the part about "local" bugs anymore though, but that might also be a model thing.

I don't think it's a model thing, it's just a sort of basic limitation of the technology. We shouldn't expect LLMs to perform novel tasks so we shouldn't expect LLMs to find novel vulnerabilities.

Agents help, human in the loop is critical for "injecting novelty" as I put it. The LLM becomes great at producing POCs to test out.

comment 8mo ago · link · parent

I've had mixed results. I find that agents can be great for:

1. Producing new tests to increase coverage. Migrating you to property testing. Setting up fuzzing. Setting up more static analysis tooling. All of that would normally take "time" but now it's a background task.

2. They can find some vulnerabilities. They are "okay" at this, but if you are willing to burn tokens then it's fine.

3. They are absolutely wrong sometimes about something being safe. I have had Claude very explicitly state that a security boundary existed when it didn't. That is, it appeared to exist in the same way that a chroot appears to confine, and it was intended to be a security boundary, but it was not a sufficient boundary whatsoever. Multiple models not only identified the boundary and stated it exists but referred to it as "extremely safe" or other such things. This has happened to me a number of times and it required a lot of nudging for it to see the problems.

4. They often seem to do better with "local" bugs. Often something that has the very obvious pattern of an unsafe thing. Sort of like "that's a pointer deref" or "that's an array access" or "that's `unsafe {}`" etc. They do far, far worse the less "local" a vulnerability is. Product features that interact in unsafe ways when combined, that's something I have yet to have an AI be able to pick up on. This is unsurprising - if we trivialize agents as "pattern matchers", well, spotting some unsafe patterns and then validating the known properties of that pattern to validate is not so surprising, but "your product has multiple completely unrelated features, bugs, and deployment properties, which all combine into a vulnerability" is not something they'll notice easily.

It's important to remain skeptical of safety claims by models. Finding vulns is huge, but you need to be able to spot the mistakes.

comment 8mo ago · link · parent

> Yes, I am confident. But not ambiguous that my confidence is backed up with some aesthetic factors, not just squeezing out the hand waving.

I think that's fine. I'm actually sort of agnostic about it myself. I find nothing particularly striking about brute facts or contingencies, certainly it's not magical to me, but I wouldn't say that they're logically necessary. I find it a bit interesting to consider.

> I think contradiction is a category error for primitives of reality. Conservation is the right view.

It may be interesting as a thought exercise to wonder if non-contradiction could be an emergent property. It would certainly make for an interesting model for the beginning of the universe.

> I expect logic to be necessary for us to reason about primitives. But that logic is the wrong way to think of basis elements. Those are very different things.

I think this would probably be contentious, I think most people believe that logical values are basically "necessary". I don't really know though.

I will perhaps spend some time reflecting on the concepts you're referring to with regards to logic and primitives. I'm not really familiar enough with that sort of grounding or reduction.

> Well thanks for pushing me, I am sure I have taken up enough of your time. But, I am now aware of more philosophical viewpoints on the big questions!

I think that's a very good outcome, thank you for pursuing that, it's always interesting to reflect on such topics, to me at least.

comment 8mo ago · link · parent

Maybe, but I'm not really convinced. LLMs make some aspects of the job faster, mainly I don't have to type anymore. But... that was always a relatively small portion of the job. Design, understanding constraints, maintaining and operating code, deciding what to do, what not to do, when to do it, gaining consensus across product, eng, support, and customers, etc. I do all of those things as an engineer. Coding faster is really awesome, it's so nice, and I can whip up POCs for the frontend etc now, and that's accelerating development... but that's it.

The reality is that a huge portion of my time is spent doing similar work and what LLMs largely do is pick up the smaller tasks or features that I may not have prioritized otherwise. Revolutionary in one sense, completely banal and a really minor part of my job in many others.

comment 8mo ago · link · parent

You can do novel work with an LLM. You can. The LLM can't. It can be an aid - exploring papers, gathering information, helping to validate, etc. It can't do the actual novel part, fundamentally it is limited to what it is trained on.

If you are relying on the LLM and context, then unless your context is a secret your competitor is only ever one prompt behind you. If you're willing to pursue true novelty, you need a human and you can leap beyond your competition.

1
121314
164