论文

研究显示 LLM 代码安全审计盲目信任静态分析证据

Trusting the Tool: Asymmetric Deference of LLM Vulnerability Auditors to Static-Analysis Evidence

精选理由

测了11个模型发现:静态分析说“检查过了”,模型就真信,漏洞检出率掉19个点,论文还给了个修复方法。

论文测试了 11 个模型配置、四家厂商共 16,572 次审计,模型在 PrimeVul 数据集的 916 对 C/C++ 函数上结合静态分析证据判断漏洞。真实证据几乎不提升准确率(仅 +0.02),但伪造的“检查已存在”保证会令真实漏洞的检出率最多下降 19 个百分点,而伪造报警则常被模型质疑。单独调用验证每条声明并展示被驳回的声明,在伪造保证条件下提升准确率 12 个点(p=0.002)。

原文 · arXiv cs.LG

Trusting the Tool: Asymmetric Deference of LLM Vulnerability Auditors to Static-Analysis Evidence

Pipelines that combine large language models (LLMs) with static analysis let the model consume the analyser's output as evidence, but whether the model distinguishes true from false evidence, and whether its scrutiny depends on what the evidence claims, has not been measured. We built an intraprocedural analyser for C/C++ that produces proof obligations and audited vulnerable and patched functions from PrimeVul under six evidence conditions that differ only in the notes, including fabricated assurances that a missing check exists and fabricated alarms that an added check is missing. The study covers 916 pairs in four disjoint sets, eleven model configurations from four vendors and 16,572 audits; no model is trained or fine-tuned. True evidence barely improved accuracy (+0.02). False evidence acted asymmetrically: relative to true notes about the same operations, false assurances lowered the detection of real vulnerabilities by up to 19 points, whereas false alarms never significantly lowered accuracy and were disputed far more often. An internally registered replication on seven new models confirmed that false assurances move verdicts towards their claim more than false alarms do (mean asymmetry +0.16, 95% CI +0.10 to +0.24). Instructions in the audit prompt did not reliably reduce deference; the best one failed to replicate. Verifying each claim in a separate call and showing the refuted claims raised accuracy under false assurances by 12 points in a pre-specified test (p=0.002) without loss under true evidence; for a second model the gain was smaller and not significant. Pipelines should therefore verify a tool's guarantees before the model relies on them, and studies should measure deference in a direction-aware way.