arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2602.08242cs.SEcs.NI
收藏

网络层软件测试:自动化HTTP API质量评估与生产Web应用的安全分析

Software Testing at the Network Layer: Automated HTTP API Quality Assessment and Security Analysis of Production Web Applications

Texas Wesleyan University(韦斯利安大学);Technical University of Munich(慕尼黑工业大学);National University of Sciences and Technology(国立科学与技术大学)

Ali Hassaan Mughal, Muhammad Bilal, Noor Fatima

AI总结:

本文提出自动化框架评估生产Web应用HTTP API质量与安全,通过分析18个网站的HTTP流量,发现冗余请求和缺失缓存头是主要问题,揭示质量差异及安全风险。

摘要:

现代Web应用严重依赖客户端API调用来获取数据、渲染内容并与后端服务通信。然而,这些网络交互的质量(冗余请求、缺失缓存头、过大负载和过多第三方依赖)很少系统性地进行测试。此外,许多质量缺陷具有安全影响:缺失的缓存头可能导致缓存污染,过多的第三方依赖扩大了供应链攻击面,而错误响应可能泄露服务器内部信息。在本研究中,我们提出了一种自动化软件测试框架,用于捕获和分析18个生产网站的完整HTTP流量,涵盖11个类别(电子商务、新闻、政府、开发工具、旅行等)。通过Playwright自动化浏览器工具,我们记录了108个HAR(HTTP Archive)文件,每个页面进行3次独立运行,然后应用8个基于启发式的反模式检测器,为每个网站生成一个综合质量评分(0-100)。我们的结果揭示了广泛的质量分布:极简服务器渲染网站获得满分100分,而内容丰富的商业网站评分低至56.8。我们识别出冗余API调用和缺失缓存头是两种最普遍的反模式,分别影响67%的网站,而第三方开销超过20%的网站占72%。一个实用网站每页面加载时发出2684次请求,比最简网站多447倍。为了保护网站声誉,所有身份均使用基于类别的伪名进行匿名化。我们提供所有分析脚本、匿名结果和可重复性说明作为开放存档。本工作为现代Web的HTTP API调用质量建立了实证基准,并提供了一个可重复的测试框架,供研究人员和实践者应用于自己的应用。

英文摘要:

Modern web applications rely heavily on client-side API calls to fetch data, render content, and communicate with backend services. However, the quality of these network interactions (redundant requests, missing cache headers, oversized payloads, and excessive third-party dependencies) is rarely tested in a systematic way. Moreover, many of these quality deficiencies carry security implications: missing cache headers enable cache poisoning, excessive third-party dependencies expand the supply-chain attack surface, and error responses risk leaking server internals. In this study, we present an automated software testing framework that captures and analyzes the complete HTTP traffic of 18 production websites spanning 11 categories (e-commerce, news, government, developer tools, travel, and more). Using automated browser instrumentation via Playwright, we record 108 HAR (HTTP Archive) files across 3 independent runs per page, then apply 8 heuristic-based anti-pattern detectors to produce a composite quality score (0-100) for each site. Our results reveal a wide quality spectrum: minimalist server-rendered sites achieve perfect scores of 100, while content-heavy commercial sites score as low as 56.8. We identify redundant API calls and missing cache headers as the two most pervasive anti-patterns, each affecting 67% of sites, while third-party overhead exceeds 20% on 72% of sites. One utility site makes 2,684 requests per page load, which is 447x more than the most minimal site. To protect site reputations, all identities are anonymized using category-based pseudonyms. We provide all analysis scripts, anonymized results, and reproducibility instructions as an open artifact. This work establishes an empirical baseline for HTTP API call quality across the modern web and offers a reproducible testing framework that researchers and practitioners can apply to their own applications.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑