SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2602.07422 · 2026

Secure Code Generation via Online Reinforcement Learning with Vulnerability Reward Model

Yue Liu, Tianyi Wu, See-Kiong Ng, Mingzhe Du, Chengran Yang, Jiaheng Zhang, Yue Zhuo, Sft Grpo

arXiv · PDF · Open in the Atlas

Code that ran

8 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 8 failures of our instrument; 2 no recorded run), measured 2026-11-22; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2602.07422.json · badge: /api/ran/2602.07422.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
AndrewWTY/SecCoderX canonical (classifier label)
classifier basis: census
8 ran · 2 no recorded run
FunctionStatusWhere it lives
complete_code Ran
ran; our contract draft was wrong, not the code
AndrewWTY/SecCoderX/CWEval/cweval/commons.py
pointer only (licence: NONE) · get_code("f17a43f998cfc7df")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, AndrewWTY/SecCoderX when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

extract_code_from_response Ran
ran; our contract draft was wrong, not the code
AndrewWTY/SecCoderX/vul_induce_prompt_pipeline/inference_instructions_with_vllm.py
pointer only (licence: NONE) · get_code("560e4c81c5b22a2b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, AndrewWTY/SecCoderX when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_code_from Ran
ran; our contract draft was wrong, not the code
AndrewWTY/SecCoderX/CWEval/cweval/commons.py
pointer only (licence: NONE) · get_code("988cd7d58d646380")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, AndrewWTY/SecCoderX when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_history_filename Ran
ran; our contract draft was wrong, not the code
AndrewWTY/SecCoderX/vul_induce_prompt_pipeline/generate_instructions_batch.py
pointer only (licence: NONE) · get_code("d2080e4b1d70bf91")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, AndrewWTY/SecCoderX when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_history_filename Ran
ran; our contract draft was wrong, not the code
AndrewWTY/SecCoderX/vul_induce_prompt_pipeline/generate_scenarios_batch.py
pointer only (licence: NONE) · get_code("ce1a7bb8eeeff782")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, AndrewWTY/SecCoderX when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_jsonl Ran
ran; our contract draft was wrong, not the code
AndrewWTY/SecCoderX/vul_induce_prompt_pipeline/inference_instructions_with_vllm.py
pointer only (licence: NONE) · get_code("0348ea9288baf003")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, AndrewWTY/SecCoderX when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_prompt_template Ran
ran; our contract draft was wrong, not the code
AndrewWTY/SecCoderX/vul_induce_prompt_pipeline/inference_instructions_with_vllm.py
pointer only (licence: NONE) · get_code("95e7a771b99223f2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, AndrewWTY/SecCoderX when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_prompts Ran
ran; our contract draft was wrong, not the code
AndrewWTY/SecCoderX/vul_induce_prompt_pipeline/generate_instructions_batch.py
pointer only (licence: NONE) · get_code("075ea2984064fe95")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, AndrewWTY/SecCoderX when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_config Not yet run
unverified (harvested, no recorded run)
AndrewWTY/SecCoderX/vul_induce_prompt_pipeline/generate_instructions_batch.py
pointer only (licence: NONE) · get_code("eaa7df33cf177361")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, AndrewWTY/SecCoderX when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

run_in_subprocess Not yet run
unverified (harvested, no recorded run)
AndrewWTY/SecCoderX/CWEval/cweval/commons.py
pointer only (licence: NONE) · get_code("1d423fe6d1bcc35a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, AndrewWTY/SecCoderX when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 0 later) and 8 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
complete_code 1 other paper
1 dated earlier
2501.08200 (2025-01)
CWEval: Outcome-driven Evaluation on Functionality and Security of LLM Code Generation
run_in_subprocess 1 other paper
1 dated earlier
2501.08200 (2025-01)
CWEval: Outcome-driven Evaluation on Functionality and Security of LLM Code Generation

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Large language models (LLMs) are increasingly used in software development, yet their tendency to generate insecure code remains a major barrier to real-world deployment. Existing secure code alignment methods often suffer from a functionality-security paradox, improving security at the cost of substantial utility degradation. We propose SecCoderX, an online reinforcement learning framework for functionalitypreserving secure code generation. SecCoderX first bridges vulnerability detection and secure code generation by repurposing mature detection resources in two ways: (i) synthesizing diverse, reality-grounded vulnerability-inducing coding tasks for online RL rollouts, and (ii) training a reasoning-based vulnerability reward model that provides scalable and reliable security supervision. Together, these components are unified in an online RL loop to align code LLMs to generate secure and functional code. Extensive experiments demonstrate that SecCoderX achieves state-of-the-art performance, improving Effective Safety Rate (ESR) by approximately 10% over unaligned models, whereas prior methods often degrade ESR by 14-54%. We release our code, dataset and model checkpoints at https: //github.com/AndrewWTY/SecCoderX.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2602.07422")
get_code_for_paper("2602.07422")
have("2602.07422")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2602.07422.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2602.07422.svg)](https://syntology.ai/paper/2602.07422)

Connect an agent — have() is free.