LLMSecEval: A Dataset of Natural Language Prompts for Security Evaluations

要約

Codex のような大規模言語モデル (LLM) は、公開されているソースからの数十億行のコードでトレーニングされているため、コード補完およびコード生成タスクを実行するための強力なツールです。
さらに、これらのモデルは、パブリック GitHub リポジトリから言語とプログラミング手法を学習することにより、自然言語 (NL) 記述からコード スニペットを生成することができます。
LLM は、ソフトウェア アプリケーションの簡単な NL 主導の展開を約束しますが、LLM が生成するコードのセキュリティは、広範囲に調査されたり、文書化されたりしていません。
この作業では、そのようなモデルのセキュリティ パフォーマンスを評価するために活用できる 150 の NL プロンプトを含むデータセットである LLMSecEval を提示します。
このようなプロンプトは、MITRE の Top 25 Common Weakness Enumeration (CWE) ランキングにリストされているさまざまなセキュリティ脆弱性が発生しやすいコード スニペットの NL 記述です。
データセットの各プロンプトには、LLM によって生成されたコードに対する比較評価を容易にするための安全な実装例が付属しています。
実際のアプリケーションとして、NL 記述から自動的に生成されたスニペットのセキュリティを評価するために LLMSecEval を使用する方法を示します。

要約(オリジナル)

Large Language Models (LLMs) like Codex are powerful tools for performing code completion and code generation tasks as they are trained on billions of lines of code from publicly available sources. Moreover, these models are capable of generating code snippets from Natural Language (NL) descriptions by learning languages and programming practices from public GitHub repositories. Although LLMs promise an effortless NL-driven deployment of software applications, the security of the code they generate has not been extensively investigated nor documented. In this work, we present LLMSecEval, a dataset containing 150 NL prompts that can be leveraged for assessing the security performance of such models. Such prompts are NL descriptions of code snippets prone to various security vulnerabilities listed in MITRE’s Top 25 Common Weakness Enumeration (CWE) ranking. Each prompt in our dataset comes with a secure implementation example to facilitate comparative evaluations against code produced by LLMs. As a practical application, we show how LLMSecEval can be used for evaluating the security of snippets automatically generated from NL descriptions.

arxiv情報

著者 Catherine Tony,Markus Mutas,Nicolás E. Díaz Ferreyra,Riccardo Scandariato
発行日 2023-03-16 15:13:58+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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