The study presents CodeSecEval, a benchmark containing 255 Python programming tasks covering 77 categories of software weakness. Each task includes insecure and secure versions, along with executable tests for both program behavior and the targeted security problem.

Using this benchmark, the researchers developed SecAwareCoder. The system identifies security-sensitive parts of a task, proposes likely weaknesses, uses them to guide code generation and security-test creation, and then uses test results to refine the code. Experiments across multiple language-model backbones found improvements over prompting and analyzer-based baselines.