Launder-Bench:能否检测仓库级智能体代码洗白行为?
Launder-Bench: Can Repository-Level Agentic Code Laundering Be Detected?
AI总结:
本文提出首个仓库级智能体重写溯源基准Launder-Bench,通过实验发现现有方法在该基准上表现不佳,揭示了代码相似度与溯源证据间的系统性差距。
摘要:
编码智能体如今可重写仓库级代码库,同时保留经测试的行为,这为抄袭检测、许可证审计和软件溯源带来了新挑战。本文探究此类重写是否仍可追溯至其源头。现有克隆基准侧重代码片段与有限编辑,而仓库转换基准评估功能正确性而非溯源。此外,当独立实现的相似度相近时,对最相似源头的排名无法证明衍生关系。本文定义仓库级智能体代码洗白概念,并推出Launder-Bench——据作者所知,首个针对智能体重写下的溯源仓库级基准,由282个真实仓库构建。本文采用源头隐藏重建协议,分解源头行为、重建模块与仓库结构,且仅在基于执行的验证后保留重写内容。本文在两个互补场景中评估同一溯源问题:Launder-Bench-Pair包含1128个成对实例,用于判断两个仓库是否共享溯源;Launder-Bench-Attr包含229个源头归属实例,用于判断哪个候选为源头,且在证据不足时执行弃权(不执行)。通过测量同域独立仓库,可确定无共享溯源时能产生的相似度,并提供检测器特定参考区间。现有方法远未在Launder-Bench上达到饱和:最强的静态方法在成对检测上仅达到0.66的AUROC,而仓库编码器在归属查询中最多将真实源头排在首位的比例为22%,但仅在1%-2%的归属查询中获得校准归属信用。这些结果揭示了相对代码相似度与源头特定溯源证据之间存在系统性差距,为智能体重写下的溯源检测提供了可复现的目标。
英文摘要:
Coding agents can now rewrite repository-scale codebases while preserving tested behavior, creating a new challenge for plagiarism detection, license auditing, and software provenance. We ask whether such rewrites can still be traced to their source. Existing clone benchmarks emphasize fragments and bounded edits, while repository-transformation benchmarks evaluate functional correctness rather than provenance. Moreover, ranking the most similar source does not establish derivation when independent implementations can be similarly close. We define repository-level agentic code laundering and introduce Launder-Bench, to our knowledge the first repository-level benchmark for provenance under agentic rewriting, constructed from 282 real-world repositories. A source-hidden reconstruction protocol decomposes source behavior, reconstructs modules and repository structure, and retains rewrites only after execution-based verification. We evaluate the same provenance problem in two complementary settings: Launder-Bench-Pair contains 1,128 pairwise instances asking whether two repositories share provenance, while Launder-Bench-Attr contains 229 source-attribution instances asking which candidate is the source, with abstention when evidence is insufficient. Measured same-domain independent repositories establish how much similarity can arise without shared provenance and provide detector-specific reference bands. Existing methods remain far from saturating Launder-Bench: the strongest static method reaches only 0.66 AUROC on pairwise detection, while repository encoders rank the true source first on up to 22% of attribution queries but earn calibrated attribution credit on only 1-2%. These results reveal a systematic gap between relative code similarity and source-specific provenance evidence, providing a reproducible target for provenance detection under agentic rewriting.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。