跳到正文
返回论文列表
cs.SE提交于 已译

信任工具:LLM 漏洞审计器对静态分析证据的非对称依赖

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

ZhiHong Liu · Shuyao Gao

中文摘要

将大语言模型(LLM)与静态分析结合的流水线会让模型把分析器输出作为证据,但模型能否区分真证据与假证据,以及其审查程度是否取决于证据主张,尚未得到测量。研究构建了面向 C/C++ 的过程内分析器,用于生成证明义务,并在 PrimeVul 的易受攻击与已修补函数上开展审计。六种证据条件仅在说明文字上不同,其中包括虚构“缺失检查已存在”的保证,以及虚构“新增检查缺失”的警报。研究覆盖四组互不重叠数据中的 916 对函数、来自四家厂商的 11 种模型配置,以及 16,572 次审计,所有模型均未经训练或微调。真实证据对准确率几乎没有改善(+0.02),假证据则产生非对称影响:与针对相同操作的真实说明相比,虚假保证使真实漏洞检出率最多下降 19 个百分点;虚假警报未显著降低准确率,且遭到反驳的频率高得多。预注册的内部复现实验在 7 个新模型上确认,虚假保证比虚假警报更能推动结论偏向其主张,平均非对称性为 +0.16,95% CI 为 +0.10 至 +0.24。审计提示中的指令无法可靠降低依赖程度,表现最佳的版本也未能复现。在预先设定的测试中,分别调用核验每项主张并展示被反驳的主张,使虚假保证条件下的准确率提高 12 个百分点(p=0.002),且在真实证据下无损失;第二个模型的增益较小且不显著。因此,流水线应在模型依赖工具保证前先行核验,研究也应以区分方向的指标衡量依赖倾向。

关键要点

  1. 01问题:尚未测量 LLM 能否区分静态分析器提供的真实与虚假证据。
  2. 02方法:面向 C/C++ 构建过程内分析器,审计 PrimeVul 中 916 对函数,共执行 16,572 次审计。
  3. 03结果:真实证据仅带来 +0.02 准确率,虚假保证使真实漏洞检出率最多下降 19 个百分点。
  4. 04复现:7 个新模型确认虚假保证比虚假警报更能推动结论偏向其主张。
  5. 05缓解与局限:单独核验主张在虚假保证下提高 12 个百分点,但第二个模型增益不显著。

解读

尚无解读。

原始英文摘要

arXiv:2610.32876v1 Announce Type: cross Abstract: 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.

同方向论文 · cs.SE

查看全部 →

反向发现 · 这篇论文相关的工具与提示词

去交叉发现 →

关联提示词 · 6

编程github.com·外部收录·

对提交的代码进行多维度 Code Review,输出按严重程度分类的问题清单、修改建议与审查结论。

# Role 你是一位经验丰富的代码审查专家。你擅长通过建设性反馈、系统性分析和协作改进,将代码审查从「把关」升级为「知识分享」。你熟悉 React、Vue、Rust、TypeScript、Java、Python、C/C++ 等语言的最佳实践。 # Task 对我提供的【代码】进行全面的 Code Review,从正确性、安全性、性能、可维护性、规范性等多维度审查,并给出建设性、可执行的反馈。 # Core Principles ## 1. 审查心态 - **目标**:…

编程promptwhiteboard.com·外部收录·

从正确性、可维护性、安全、性能和测试缺口审查代码,输出按严重程度排序的问题、引用、修复建议和缺失测试。

任务类型: 代码审查 目标: 从正确性、可维护性、安全、性能和测试缺口审查代码。 背景: - [项目、产品或主题]: [项目、产品或主题] - [受众和使用场景]: [受众和使用场景] - [约束、必须满足的要求和避免事项]: [约束、必须满足的要求和避免事项] 需要提供的信息: [在这里粘贴原始材料] 期望输出: 1. 按严重程度排序的问题 2. 文件或段落引用 3. 修复建议 4. 缺失测试 质量标准: - 具体表达,避免泛泛建议。 - 明确写出假设。 - 优先给可执行下…

编程zhuanlan.zhihu.com·外部收录·

用 AI 写代码后,在上线前按密钥、数据库、API、依赖、HTTP 五方面逐项扫描安全漏洞

你是一位资深代码安全审计专家。对以下项目逐项检查: 一、密钥与凭证 - 所有 API Key/Token/密码是否用环境变量?.env 是否在 .gitignore? - 是否有硬编码的 JWT Secret、数据库密码? 二、数据库安全 - 用户表是否启用 RLS?SQL 是否参数化查询? - 密码是否用 bcrypt/argon2 哈希? 三、API 安全 - 用户输入是否在服务端校验?认证路由是否加 auth 中间件? - 公开 API 是否有 rate limitin…

编程github.com/f/awesome-chatgpt-prompts·外部收录·

AI-Generated PLC Code Reviewer

I want you to act as a strict reviewer of PLC code written by an AI, before it is downloaded to a controller. Platform: ${Platform and version}. Language: ${Language}. Below are my numbered requirements, then the code. Do a review in five …

编程github.com/f/awesome-chatgpt-prompts·外部收录·

Code Review Second Opinion

- When the user is requested as reviewer, read the PR diff and description. - Report only high-signal findings: logic bugs, security issues, race conditions, missing error handling, missing tests for new branches. - Rank findings by severit…