SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2409.15154 · 2024

RMCBench: Benchmarking Large Language Models' Resistance to Malicious Code

arXiv · PDF · Open in the Atlas

Code that ran

4 of 8 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, 2 violated it and 0 have no contract verdict; 2 failures of our instrument; 4 no recorded run), measured 2026-11-22; 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/2409.15154.json · badge: /api/ran/2409.15154.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
qing-yuan233/RMCBench canonical (classifier label)
classifier basis: census
4 ran · 4 no recorded run
FunctionStatusWhere it lives
change_LLM_name_in_prompt Ran
ran; our contract draft was wrong, not the code
qing-yuan233/RMCBench/script/run_open_llm.py
pointer only (licence: NOASSERTION) · get_code("cb8105f315b7cef4")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, qing-yuan233/RMCBench (NOASSERTION). 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.

format_prompt Ran
ran; our contract draft was wrong, not the code
qing-yuan233/RMCBench/script/run_open_llm.py
pointer only (licence: NOASSERTION) · get_code("e0e266948769ee25")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, qing-yuan233/RMCBench (NOASSERTION). 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_response Ran
ran, violated the contract we drafted
qing-yuan233/RMCBench/script/evaluate.py
pointer only (licence: NOASSERTION) · get_code("bdd86ff0c494eaec")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, qing-yuan233/RMCBench (NOASSERTION). 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_response Ran
ran, violated the contract we drafted
qing-yuan233/RMCBench/script/run_gpt_llm.py
pointer only (licence: NOASSERTION) · get_code("162109372f2d4acb")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, qing-yuan233/RMCBench (NOASSERTION). 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.

calculate_tokens Not yet run
unverified (harvested, no recorded run)
qing-yuan233/RMCBench/script/evaluate.py
pointer only (licence: NOASSERTION) · get_code("6e745847e664a1ed")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, qing-yuan233/RMCBench (NOASSERTION). 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.

get_response Not yet run
unverified (harvested, no recorded run)
qing-yuan233/RMCBench/script/run_open_llm.py
pointer only (licence: NOASSERTION) · get_code("a04cf0f788099abd")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, qing-yuan233/RMCBench (NOASSERTION). 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.

read_prompt_from_xlxs_file Not yet run
unverified (harvested, no recorded run)
qing-yuan233/RMCBench/script/evaluate.py
pointer only (licence: NOASSERTION) · get_code("e2f9c3aec6032143")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, qing-yuan233/RMCBench (NOASSERTION). 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.

read_prompt_from_xlxs_file Not yet run
unverified (harvested, no recorded run)
qing-yuan233/RMCBench/script/run_gpt_llm.py
pointer only (licence: NOASSERTION) · get_code("1634c697a3df15ea")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, qing-yuan233/RMCBench (NOASSERTION). 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 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 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.

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

The emergence of Large Language Models (LLMs) has significantly influenced various aspects of software development activities. Despite their benefits, LLMs also pose notable risks, including the potential to generate harmful content and being abused by malicious developers to create malicious code. Several previous studies have focused on the ability of LLMs to resist the generation of harmful content that violates human ethical standards, such as biased or offensive content. However, there is no research evaluating the ability of LLMs to resist malicious code generation. To fill this gap, we propose RMCBench, the first benchmark comprising 473 prompts designed to assess the ability of LLMs to resist malicious code generation. This benchmark employs two scenarios: a text-to-code scenario, where LLMs are prompted with descriptions to generate code, and a code-to-code scenario, where LLMs translate or complete existing malicious code. Based on RMCBench, we conduct an empirical study on 11 representative LLMs to assess their ability to resist malicious code generation. Our findings indicate that current LLMs have a limited ability to resist malicious code generation with an average refusal rate of 40.36% in text-to-code scenario and 11.52% in code-to-code scenario. The average refusal rate of all LLMs in RMCBench is only 28.71%; ChatGPT-4 has a refusal rate of only 35.73%. We also analyze the factors that affect LLMs' ability to resist malicious code generation and provide implications for developers to enhance model robustness.

For agents

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

get_harvested_code_for_paper("2409.15154")
get_code_for_paper("2409.15154")
have("2409.15154")

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

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

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

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

Connect an agent — have() is free.