要約
インターネットにさらされたWebアプリケーションとAPIエンドポイントの数が増加し続けるにつれて、悪用可能な脆弱性の数も増加します。
そのような脆弱性を手動で識別することは退屈です。
一方、静的セキュリティスキャナーは多くの誤検知を生成する傾向があります。
機械学習ベースのアプローチは有望ですが、通常、トレーニングとテストデータが密接に関連しているシナリオでのみうまく機能します。
MLベースの脆弱性検出の重要な課題は、過度に長いコンテキストが機械学習モデル、特に小さいモデルのコード理解能力に悪影響を与えるため、適切な簡潔なコードコンテキストを提供することです。
この作業では、非関連コードを削除してコードコンテキストを最小化する新しいコード表現であるTraceガジェットを紹介します。
トレースガジェットは、脆弱性へのパスをカバーするステートメントを正確にキャプチャします。
MLモデルの入力として、Traceガジェットは最小限であるが完全なコンテキストを提供し、それにより検出性能が向上します。
さらに、MLベースの脆弱性検出器のパフォーマンスをさらに向上させるために、手動でキュレーションされたラベルを使用して、実世界のアプリケーションから生成された大規模なデータセットを収集します。
私たちの結果は、TRACEガジェットを使用する場合、以前のコード表現と比較してトレースガジェットを使用する場合に最適なパフォーマンスを示し、GitHubのCodeQLなどの業界標準の静的スキャナーの検出機能を上回り、完全に見えないデータセットで少なくとも4%上回っています。
フレームワークを実際のアプリケーションに適用することにより、広く展開されたソフトウェアで以前は未知の脆弱性を特定して報告します。
要約(オリジナル)
As the number of web applications and API endpoints exposed to the Internet continues to grow, so does the number of exploitable vulnerabilities. Manually identifying such vulnerabilities is tedious. Meanwhile, static security scanners tend to produce many false positives. While machine learning-based approaches are promising, they typically perform well only in scenarios where training and test data are closely related. A key challenge for ML-based vulnerability detection is providing suitable and concise code context, as excessively long contexts negatively affect the code comprehension capabilities of machine learning models, particularly smaller ones. This work introduces Trace Gadgets, a novel code representation that minimizes code context by removing non-related code. Trace Gadgets precisely capture the statements that cover the path to the vulnerability. As input for ML models, Trace Gadgets provide a minimal but complete context, thereby improving the detection performance. Moreover, we collect a large-scale dataset generated from real-world applications with manually curated labels to further improve the performance of ML-based vulnerability detectors. Our results show that state-of-the-art machine learning models perform best when using Trace Gadgets compared to previous code representations, surpassing the detection capabilities of industry-standard static scanners such as GitHub’s CodeQL by at least 4% on a fully unseen dataset. By applying our framework to real-world applications, we identify and report previously unknown vulnerabilities in widely deployed software.
arxiv情報
著者 | Felix Mächtle,Nils Loose,Tim Schulz,Florian Sieck,Jan-Niclas Serr,Ralf Möller,Thomas Eisenbarth |
発行日 | 2025-04-18 13:13:39+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google