Generate and Pray: Using SALLMS to Evaluate the Security of LLM Generated Code

要約

ラージ・ランゲージ・モデル(LLM)がソフトウェア・エンジニアの日常業務に普及するにつれ、これらのツールによって生成されるコードが機能的に正しいだけでなく、脆弱性がないことを保証することが重要になっている。LLMは開発者の生産性を高めるのに役立つが、先行する実証研究では、LLMが安全でないコードを生成する可能性があることが示されている。安全でないコード生成には2つの要因がある。第1に、LLMを評価するために使用される既存のデータセットは、セキュリティに敏感な真のソフトウェア工学タスクを適切に表現していない。その代わりに、競争的なプログラミング課題や教室でのコーディング課題に基づくことが多い。現実のアプリケーションでは、生成されたコードはより大きなコードベースに統合されるため、潜在的なセキュリティリスクが生じる。第二に、既存の評価指標は、生成されたコードの機能的な正しさに主眼を置いており、セキュリティの考慮は無視されています。そこで本稿では、LLMが安全なコードを生成する能力を体系的にベンチマークするフレームワークであるSALLMについて述べる。このフレームワークには3つの主要な構成要素があります:セキュリティ中心のPythonプロンプトの新しいデータセット、生成されたコードを評価するための設定可能な評価技法、安全なコード生成の観点からモデルの性能を評価するための新しいメトリクスです。

要約(オリジナル)

With the growing popularity of Large Language Models (LLMs) in software engineers’ daily practices, it is important to ensure that the code generated by these tools is not only functionally correct but also free of vulnerabilities. Although LLMs can help developers to be more productive, prior empirical studies have shown that LLMs can generate insecure code. There are two contributing factors to the insecure code generation. First, existing datasets used to evaluate LLMs do not adequately represent genuine software engineering tasks sensitive to security. Instead, they are often based on competitive programming challenges or classroom-type coding tasks. In real-world applications, the code produced is integrated into larger codebases, introducing potential security risks. Second, existing evaluation metrics primarily focus on the functional correctness of the generated code while ignoring security considerations. Therefore, in this paper, we described SALLM, a framework to benchmark LLMs’ abilities to generate secure code systematically. This framework has three major components: a novel dataset of security-centric Python prompts, configurable assessment techniques to evaluate the generated code, and novel metrics to evaluate the models’ performance from the perspective of secure code generation.

arxiv情報

著者 Mohammed Latif Siddiq,Joanna C. S. Santos,Sajith Devareddy,Anna Muller
発行日 2024-06-03 15:50:23+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

カテゴリー: cs.AI, cs.SE パーマリンク