APISENSOR: 从运行时流量日志中鲁棒地发现Web API
APISENSOR: Robust Discovery of Web API from Runtime Traffic Logs
AI总结:
APISENSOR通过无监督方法从混合运行时流量中恢复准确API,提升了API发现的鲁棒性和准确性,优于现有方法。
摘要:
大型语言模型(LLM)驱动的代理越来越多地依赖API来操作复杂网络应用,但快速演变往往导致API文档不完整或不一致。现有工作分为两类:(1)静态的白盒方法基于源代码或形式规范,(2)动态的黑盒方法从运行时流量推断API。静态方法依赖内部工件,通常在封闭源系统中不可用,并且经常过度近似API使用,导致高误报率。尽管动态黑盒API发现具有广泛适用性,但在复杂环境中共享收集点聚合多个应用程序流量时,其鲁棒性会下降。为提高混合运行时流量下的鲁棒性,我们提出了APISENSOR,一种黑盒API发现框架,能够无监督地重建应用程序API。APISENSOR对复杂流量进行结构化分析,结合流量去噪和标准化与基于图的两阶段聚类过程,以恢复准确的API。我们使用超过10,000个运行时请求在六个Web应用程序上评估了APISENSOR,结果表明APISENSOR显著提高了发现准确性,平均组准确率精度为95.92%,F1分数为94.91%,优于现有方法。在不同应用程序和噪声设置下,APISENSOR实现了最低的性能方差,最多FGA下降8.11点,证明了在10个基线中最佳的鲁棒性。消融研究证实每个组件都是必要的。此外,APISENSOR在真实应用中揭示了API文档不一致,后来由社区开发人员证实。
英文摘要:
Large Language Model (LLM)-based agents increasingly rely on APIs to operate complex web applications, but rapid evolution often leads to incomplete or inconsistent API documentation. Existing work falls into two categories: (1) static, white-box approaches based on source code or formal specifications, and (2) dynamic, black-box approaches that infer APIs from runtime traffic. Static approaches rely on internal artifacts, which are typically unavailable for closed-source systems, and often over-approximate API usage, resulting in high false-positive rates. Although dynamic black-box API discovery applies broadly, its robustness degrades in complex environments where shared collection points aggregate traffic from multiple applications. To improve robustness under mixed runtime traffic, we propose APISENSOR, a black-box API discovery framework that reconstructs application APIs unsupervised. APISENSOR performs structured analysis over complex traffic, combining traffic denoising and normalization with a graph-based two-stage clustering process to recover accurate APIs. We evaluated APISENSOR across six web applications using over 10,000 runtime requests with simulated mixed-traffic noise. Results demonstrate that APISENSOR significantly improves discovery accuracy, achieving an average Group Accuracy Precision of 95.92% and an F1-score of 94.91%, outperforming state-of-the-art methods. Across different applications and noise settings, APISENSOR achieves the lowest performance variance and at most an 8.11-point FGA drop, demonstrating the best robustness among 10 baselines. Ablation studies confirm that each component is essential. Furthermore, APISENSOR revealed API documentation inconsistencies in a real application, later confirmed by community developers.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。