Hacker News new | ask | show | jobs
by adrianmonk 6 days ago
I'm not following the reasoning how specs improve security issue response.

The idea is that a formal spec exists and AI generates code from that. Then when an attacker discovers a vulnerability, you can generate code again without needing to wait on the project maintainer.

If the spec plus the AI is sufficient to generate software without the vulnerability, why didn't it just do that originally? Why would doing the same thing again fix anything?

Instead, the formal spec needs to be updated to add "and don't have this vulnerability". Which can be done, but now you're back to coordinating with the maintainer. The maintainer owns the spec. What's really happened is that software is now written in a different language, a formal spec language instead of a traditional language.

If you don't want to wait on the maintainer, you could just change the spec yourself as a temporary measure. But that's also not anything new. With traditional software, you can patch the source without the maintainer's involvement as a temporary measure.

1 comments

Yeah, because it's probabilistic all the way down, adding stuff to the spec doesn't change the outcome.

"If the spec plus the AI is sufficient to generate software without the vulnerability, why didn't it just do that originally?" I ask this too. Best answer I've gotten is that LLMs simply don't know/understand systems yet in a way that would let them proactively find and fix these issues in the normal course of writing code.

I don't think that our test suites are robust enough to handle the idea of "re-engineer everything from a specification." There are plenty of examples of code that is being rewritten to Rust and proudly posted to X that looks like it passes all tests, and yet we learn very quickly that the tests never accounted for real world scenarios. I also oscillate daily as to whether or not we will ever be able to build test suites robust enough to handle this. In theory, yes, if we write good enough test suites with enough coverage, we'll get similar behavior... But there's just so few examples of what that looks like in practical everyday software that we ship.