基于OpenSSF评分卡的维护分数预测:对与PyPI包关联的GitHub仓库的研究
Forecasting the Maintained Score from the OpenSSF Scorecard: A Study of GitHub Repositories Linked to PyPI Packages
AI总结:
本文研究如何通过机器学习和深度学习模型预测OpenSSF评分卡中的维护分数,发现聚合表示如分桶分数和趋势类型能实现较高准确率。
摘要:
背景:OpenSSF评分卡被广泛用于评估开源软件仓库的安全状况,其中维护指标是衡量近期维护活动的关键指标,帮助用户识别活跃维护的项目和可能被弃用的依赖项。然而,该指标本质上是回顾性的,仅提供过去90天仓库活动的短期快照,无法提供未来洞察。这一限制使依赖开源依赖项的开发人员和组织在风险评估上更加复杂。目标:本文研究了预测OpenSSF维护分数所捕捉的未来维护活动的可行性。方法:我们关注3,220个与PyPI中排名前1%的中央库关联的GitHub仓库,这些库根据PageRank排名。我们重建了三年期的历史维护分数,并将问题框架为多元时间序列预测任务。我们研究了四种目标表示:原始维护分数(0-10)、分桶分数(低0-2、中3-7、高8-10)、连续分数之间的数值趋势斜率,以及分类趋势类型(下降、稳定、上升)。我们比较了机器学习模型(随机森林)和深度学习模型(LSTM)在3-12个月训练窗口和1-6个月预测窗口下的表现。结果:我们的结果表明,未来维护活动可以以有意义的准确性进行预测,特别是使用聚合表示如分桶分数和趋势类型,准确率超过0.95和0.79。值得注意的是,更简单的机器学习模型至少与深度学习方法表现相当,表明有效的预测不需要复杂的架构。
英文摘要:
Background: The OpenSSF Scorecard is widely used to assess the security posture of open-source software repositories, with the Maintained metric serving as a key indicator of recent maintenance activities, helping users identify actively maintained projects and potentially abandoned dependencies. However, the metric is inherently retrospective, providing only a short-term snapshot based on the past 90 days of repository activity and offering no insight into the future. This limitation complicates risk assessment for developers and organizations that rely on open-source dependencies. Aims: In this paper, we investigate the feasibility of forecasting future maintenance activities as captured by the OpenSSF Maintained score. Method: Focusing on 3,220 GitHub repositories linked to one of the top 1% most central PyPI libraries, as ranked by PageRank, we reconstruct historical Maintained scores over a three-year period and frame the problem as a multivariate time series forecasting task. We study four target representations: the raw Maintained score (0-10), a bucketed score capturing low (0-2), moderate (3-7), and high (8-10) maintenance levels, the numerical trend slope between consecutive scores, and categorical trend types (downward, stable, upward). We compare a machine learning model (Random Forest) and a deep learning model (LSTM) using training windows of 3-12 months and forecasting horizons of 1-6 months. Results: Our results show that future maintenance activity can be forecasted with meaningful accuracy, particularly when using aggregated representations such as bucketed scores and trend types leading to accuracies above 0.95 and 0.79. Notably, simpler machine learning models perform at least on par with deep learning approaches, suggesting that effective forecasting does not require complex architectures.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。