SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2411.12882 · 2024

ProSec: Fortifying Code LLMs with Proactive Security Alignment

arXiv · PDF · Open in the Atlas

Code that ran

6 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; 3 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 4 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2411.12882.json · badge: /api/ran/2411.12882.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
PurCL/ProSec canonical (classifier label)
classifier basis: census
6 ran · 4 no recorded run
FunctionStatusWhere it lives
encode_oneturn_llama2 Ran
ran, honoured the contract we drafted
PurCL/ProSec/influence_score/data_utils.py
pointer only (licence: NONE) · get_code("03f8cf10066a6cc9")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, PurCL/ProSec 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.

encode_oneturn_phi3 Ran
ran, honoured the contract we drafted
PurCL/ProSec/influence_score/data_utils.py
pointer only (licence: NONE) · get_code("b9d5da7cab2c11d2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, PurCL/ProSec 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_max_saved_index Ran
ran, honoured the contract we drafted
PurCL/ProSec/influence_score/collect_grad_reps.py
pointer only (licence: NONE); the stored copy get_code serves, from FanZT6/OptimSyn, is pointer only (licence: NONE) · get_code("ed43dd7816626e87")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, PurCL/ProSec 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_output Ran
ran; our contract draft was wrong, not the code
PurCL/ProSec/influence_score/collect_grad_reps.py
pointer only (licence: NONE); the stored copy get_code serves, from FanZT6/OptimSyn, is pointer only (licence: NONE) · get_code("808c09bce5840bb9")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, PurCL/ProSec 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.

query_claude Ran
ran; our contract draft was wrong, not the code
PurCL/ProSec/src/claude_utils.py
pointer only (licence: NONE) · get_code("ea83b2394c29c3a7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, PurCL/ProSec 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.

query_claude_wrap Ran
ran; our contract draft was wrong, not the code
PurCL/ProSec/src/claude_utils.py
pointer only (licence: NONE) · get_code("33cff3ac8bb3e11a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, PurCL/ProSec 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_sequence_logps Not yet run
unverified (harvested, no recorded run)
PurCL/ProSec/influence_score/scores.py
pointer only (licence: NONE) · get_code("169eaac296278af6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, PurCL/ProSec 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.

load_model_and_optimizer Not yet run
unverified (harvested, no recorded run)
PurCL/ProSec/influence_score/training_dynamics_refactored.py
pointer only (licence: NONE) · get_code("0f70820a9ff7a1a5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, PurCL/ProSec 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.

preprocess_function Not yet run
unverified (harvested, no recorded run)
PurCL/ProSec/influence_score/data_utils.py
pointer only (licence: NONE) · get_code("f07dfce1992d2a42")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, PurCL/ProSec 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.

td_sample_plus Not yet run
unverified (harvested, no recorded run)
PurCL/ProSec/influence_score/sample_refactored.py
pointer only (licence: NONE) · get_code("bc9b71a2e0cc661f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, PurCL/ProSec 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, 2 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
get_max_saved_index 4 other papers
2 dated earlier, 2 later
2402.04333 (2024-02)
LESS: Selecting Influential Data for Targeted Instruction Tuning
2407.15235 (2024-07)
TAGCOS: Task-agnostic Gradient Clustered Coreset Selection for Instruction Tuning Data
2602.08351 (2026-02)
The Chicken and Egg Dilemma: Co-optimizing Data and Model Configurations for LLMs
and 1 more not named here
get_output 4 other papers
2 dated earlier, 2 later
2402.04333 (2024-02)
LESS: Selecting Influential Data for Targeted Instruction Tuning
2407.15235 (2024-07)
TAGCOS: Task-agnostic Gradient Clustered Coreset Selection for Instruction Tuning Data
2602.08351 (2026-02)
The Chicken and Egg Dilemma: Co-optimizing Data and Model Configurations for LLMs
and 1 more not named here

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-23.

Repositories linked to this paper

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

Abstract

While recent code-specific large language models (LLMs) have greatly enhanced their code generation capabilities, the safety of these models remains under-explored, posing potential risks as insecure code generated by these models may introduce vulnerabilities into real-world systems. Existing methods collect security-focused datasets from real-world vulnerabilities for instruction tuning in order to mitigate such issues. However, they are largely constrained by the data sparsity of vulnerable code, and have limited applicability in the multi-stage post-training workflows of modern LLMs. In this paper, we propose ProSec, a novel proactive security alignment approach designed to align code LLMs with secure coding practices. ProSec systematically exposes the vulnerabilities in a code LLM by synthesizing vulnerability-inducing coding scenarios from Common Weakness Enumerations (CWEs) and generates fixes to vulnerable code snippets, allowing the model to learn secure practices through preference learning objectives. The scenarios synthesized by ProSec trigger 25x more vulnerable code than a normal instruction-tuning dataset, resulting in a security-focused alignment dataset 7x larger than the previous work. Experiments show that models trained with ProSec are 25.2% to 35.4% more secure compared to previous work without degrading models' utility.

For agents

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

get_harvested_code_for_paper("2411.12882")
get_code_for_paper("2411.12882")
have("2411.12882")

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

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

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

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

Connect an agent — have() is free.