Page 123 - 《软件学报》2026年第7期
P. 123
软件学报 ISSN 1000-9825, CODEN RUXUEW E-mail: jos@iscas.ac.cn
2026,37(7):2808−2830 [doi: 10.13328/j.cnki.jos.007587] [CSTR: 32375.14.jos.007587] http://www.jos.org.cn
©中国科学院软件研究所版权所有. Tel: +86-10-62562563
*
CAnalyzer: 面向 C/C++源代码的软件成分分析技术
徐美秋, 王舒婧, 王 莹, 于 海, 朱志良
(东北大学 软件学院, 辽宁 沈阳 110169)
通信作者: 王莹, E-mail: wangying@swc.neu.edu.cn
摘 要: 第三方库 (third-party library, TPL) 在软件开发中得到了广泛应用, 但也带来了安全漏洞和许可证冲突等风
险. 为应对这些挑战, 软件成分分析 (software composition analysis, SCA) 技术应运而生, 旨在通过识别和分析软件
中使用的开源组件及其依赖关系, 帮助开发者检测安全漏洞、过时补丁和许可证合规性问题, 确保软件供应链的
安全. 然而, 现有 SCA 工具在 C/C++领域存在 3 大局限: 缺乏全面的 TPL 特征库、难以识别库粒度复用、对 TPL
依赖关系的分析能力不足. 针对上述问题, 提出 C/C++源代码软件成分分析技术——CAnalyzer, 用于软件库粒度的
复用检测场景. CAnalyzer 通过整合 15 个平台的数据, 构建了一个包含 33 100 个 TPL 和 30 047 290 个函数的特征
库, 并通过特征库预处理与多重阈值匹配策略, 显著提升了 TPL 检测的准确性. 此外, CAnalyzer 通过解析源码中的
依赖指令, 实现了 TPL 间依赖关系的自动化构建. 实验结果表明, CAnalyzer 在 TPL 检测中的精确率为 90.63%, 召
回率为 86.57%, 在两项指标上均优于现有方法 CENTRIS、TPLite 和 OSSFP. 在 TPL 依赖关系检测中, CAnalyzer
的召回率和精确率分别为 94.79% 和 98.99%. 目前, CAnalyzer 已被 OpenHarmony 社区采纳, 在 689 个代码仓库中
识别出 166 项外部组件, 体现了其在开源社区管理中的应用价值.
关键词: 开源软件复用; 软件成分分析; 第三方库依赖
中图法分类号: TP311
中文引用格式: 徐美秋, 王舒婧, 王莹, 于海, 朱志良. CAnalyzer: 面向C/C++源代码的软件成分分析技术. 软件学报, 2026, 37(7):
2808–2830. http://www.jos.org.cn/1000-9825/7587.htm
英文引用格式: Xu MQ, Wang SJ, Wang Y, Yu H, Zhu ZL. CAnalyzer: Software Composition Analysis Technique for C/C++ Source
Code. Ruan Jian Xue Bao/Journal of Software, 2026, 37(7): 2808–2830 (in Chinese). http://www.jos.org.cn/1000-9825/7587.htm
CAnalyzer: Software Composition Analysis Technique for C/C++ Source Code
XU Mei-Qiu, WANG Shu-Jing, WANG Ying, YU Hai, ZHU Zhi-Liang
(Software College, Northeastern University, Shenyang 110169, China)
Abstract: Third-party libraries (TPLs) are widely used in software development but also introduce risks such as security vulnerabilities
and license conflicts. In response, software composition analysis (SCA) has emerged to help developers detect security vulnerabilities,
outdated patches, and license compliance issues by identifying and analyzing open-source components and their dependencies, thereby
ensuring the security of software supply chains. However, existing SCA techniques in the C/C++ domain face three major limitations: a
lack of comprehensive TPL feature libraries, difficulty in detecting library-granularity reuse, and insufficient capability to analyze TPL
dependencies. To address these limitations, a SCA technique for C/C++ source code—CAnalyzer—is proposed for software library-
granularity reuse detection scenarios. By integrating data from 15 platforms, CAnalyzer builds a feature database containing 33 100 TPLs
with 30 047 290 functions. Meanwhile, the precision of TPL detection is significantly improved through feature database preprocessing and
* 基金项目: 国家重点研发计划 (2024YFF0908000); 中国博士后科学基金 (2024M750375); CCF 华为胡杨林基金软件工程专项 (鸿蒙专
题) (CCF-HuaweiSE20240210)
本文由“智能化基础软件可信构造和供应链安全”专题特约编辑王林章教授、司徒凌云研究员、钟浩研究员、 向剑文教授、张路教授
推荐.
收稿时间: 2025-09-08; 修改时间: 2025-10-20; 采用时间: 2025-12-08; jos 在线出版时间: 2025-12-26
CNKI 网络首发时间: 2026-06-02

