跳到正文
DEV Community· Asael Shinder·· 43 分鐘前AI 評分53

程式碼中的更多安全漏洞或會先由機器發現

More of the Security Bugs in Your Code May Be Found by Machines First

AI 導讀

文章指出,能讀取程式碼並測試疑似問題的自動化工具,可能先於人員發現更多真實漏洞;開發者亦會收到看似可信、但所述漏洞並不存在的報告。

正文

Asael Shinder

A message arrives in your team's security inbox. It describes a memory bug in a parser you maintain, with a small input that crashes it and a clear explanation of why. At the bottom, the reporter mentions that the bug was found by an automated tool built on a large language model. You test it. It is real.

Expect more of these messages, and of the other kind too.

Automated tools have found bugs for a long time. Fuzzers throw huge numbers of strange inputs at a program and watch for crashes, and they have found many thousands of real problems. What is new is tools that can read code, form a guess about what might be wrong and test the guess.

In November 2024 Google announced that Big Sleep, a project from its Project Zero and DeepMind teams, had found an exploitable memory safety bug in SQLite, one of the most widely used pieces of software in the world. The bug was in a development version and was fixed before it reached a release. In 2025 DARPA, the research agency of the US Department of Defense, held the final of its AI Cyber Challenge, where teams built systems that find and fix vulnerabilities in open source code automatically.

There is a less flattering side. In January 2024 Daniel Stenberg, who leads the curl project, wrote about bug reports that had clearly been produced with AI help and described security problems that did not exist. Each one still had to be read and checked by a volunteer.

Both of these will become part of your job. Machines will find real bugs in your code, sometimes before anyone with good intentions does. And you will receive reports that sound convincing and are wrong.

A few things will help. Make it easy to report a problem, with a clear address and a short policy. Ask for something you can run, such as a test or an input that reproduces the issue, before spending hours on a description. Keep your dependencies current, because the same tools are being pointed at popular libraries, and fixes will arrive faster. And try the tools yourself. If a machine can find a bug in your code, it is far better if it is your machine, run on a Tuesday afternoon, than someone else's.

The work of judging which bugs matter and how to fix them safely is still yours. There will simply be more to judge.

– Asael Shinder

來源:DEV Community · dev.to