Skip to content

CodeLMSec benchmark: systematically evaluating and discovering security vulnerabilities in black-box code language modelsCodeLMSec Benchmark: Systematically Evaluating and Finding Security Vulnerabilities in Black-Box Code Language Models

arXiv· arXiv:2302.04012· SaTML 2024· Hossein Hajipour, Keno Hassler, Thorsten Holz, Lea Schönherr, Mario Fritz·Indexed by this site · 26 days ago· Originally publishedEvaluation
AI summary

The researchers propose the CodeLMSec benchmark for systematically evaluating the tendency of black-box code language models to generate code containing security vulnerabilities. The training data of such models is mostly drawn from open-source repositories on the internet, and the models may learn and propagate the vulnerabilities therein; the authors state that this is the first method to automatically discover vulnerable code generated by black-box code generation models, approximately inverting the models based on few-shot prompting. The paper evaluates the generation of high-risk security weaknesses by each model and constructs a dataset of non-secure prompts covering multiple vulnerability scenarios, as a benchmark for evaluating and comparing the security weaknesses of code models.

Read originalSaTML 2024