SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2512.03262 · ICML · 2025

Is Vibe Coding Safe? Benchmarking Vulnerability of Agent-Generated Code in Real-World Tasks

Lei Li, Danqing Wang, Kexun Zhang, Zhuo Li, Songwen Zhao, Jiaxuan Luo, Task Desc

arXiv · PDF · Open in the Atlas

Code that ran

9 of 11 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; 7 failures of our instrument; 2 no recorded run), measured 2026-11-23; 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/2512.03262.json · badge: /api/ran/2512.03262.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
LeiLiLab/susvibes canonical (classifier label)
classifier basis: census
9 ran · 2 no recorded run
FunctionStatusWhere it lives
extract_json_object Ran
ran; our contract draft was wrong, not the code
LeiLiLab/susvibes/susvibes/core/logs.py
code served (permissive licence) · get_code("67db3fcd2134d45d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json

def extract_json_object(text: str) -> dict | None:
    """The last top-level JSON object embedded in `text`, or None if there is none. Scans past
    any prose, code fences, or stray scalars a model may wrap around the object."""
    decoder = json.JSONDecoder()
    obj, i, n = (None, 0, len(text))
    while i < n:
        if text[i] == '{':
            try:
                candidate, end = decoder.raw_decode(text, i)
            except json.JSONDecodeError:
                i += 1
                continue
            if isinstance(candidate, dict):
                obj, i = (candidate, end)
                continue
        i += 1
    return obj


ARGS = {
    "text": 'Here is some prose before the JSON object: {"key": "value", "number": 42} and some text after it.'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_agent_setting_path Ran
ran; our contract draft was wrong, not the code
LeiLiLab/susvibes/susvibes/curate/constants.py
code served (permissive licence) · get_code("860aa57230c924e2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned PosixPath. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from pathlib import Path

def get_agent_setting_path(name: str) -> Path:
    AGENT_SETTINGS_DIR = Path(__file__).parent / 'utils/agents/settings'
    return AGENT_SETTINGS_DIR / f'{name}.yaml'

ARGS = {
    'name': 'default_agent'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_dataset_path Ran
ran; our contract draft was wrong, not the code
LeiLiLab/susvibes/susvibes/core/constants.py
code served (permissive licence) · get_code("87febe0057931286")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned PosixPath. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

from pathlib import Path
import tempfile
import os

# Create a temporary directory to act as the root
temp_root = Path(tempfile.mkdtemp())

# Mock the module structure
datasets_dir = temp_root / 'datasets'
datasets_dir.mkdir(exist_ok=True)

# Create necessary subdirectories
raw_cve_dir = datasets_dir / 'raw_cve'
raw_cve_dir.mkdir(exist_ok=True)

default_run_dir = datasets_dir / 'default'
default_run_dir.mkdir(exist_ok=True)

examples_dir = default_run_dir / 'examples'
examples_dir.mkdir(exist_ok=True)

edits_dir = default_run_dir / 'edits'
edits_dir.mkdir(exist_ok=True)

# Create the files referenced in the paths dict
(datasets_dir / 'raw_cve').touch()
(default_run_dir / 'dataset.jsonl').touch()
(default_run_dir / 'stats.json').touch()
(default_run_dir / 'susvibes_dataset.jsonl').touch()

# Patch the function's DATASETS_DIR to use our temp directory
def get_dataset_path(name: str, run_id: str='default') -> Path:
    base = datasets_dir / run_id
    paths = {'raw_cve': datasets_dir / 'raw_cve', 'dataset': base / 'dataset.jsonl', 'stats': base / 'stats.json', 'susvibes_dataset': base / 'susvibes_dataset.jsonl', 'examples': base / 'examples', 'edits': base / 'edits'}
    return paths[name]

ARGS = {
    'name': 'dataset',
    'run_id': 'default'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
is_errored Ran
ran, violated the contract we drafted
LeiLiLab/susvibes/susvibes/core/report.py
code served (permissive licence) · get_code("a2cf31f1159cc7d5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function checks if report.get('error') is truthy
# So we need to create a dict that can be passed as the 'report' parameter

# Test case 1: report with an error
report_with_error = {
    'error': 'Some error occurred',
    'other_field': 'some value'
}

# Test case 2: report without an error
report_without_error = {
    'other_field': 'some value'
}

# Test case 3: report with None error (falsy)
report_with_none_error = {
    'error': None
}

# For the function execution, we'll use report_with_error
ARGS = {
    'report': report_with_error
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
is_transient_error Ran
ran, violated the contract we drafted
LeiLiLab/susvibes/susvibes/core/agents/claude.py
code served (permissive licence) · get_code("b43147f014c0715f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

# The function is_transient_error takes a single parameter: error (a string)
# It checks if any substring from TRANSIENT_ERRORS is contained in the error string
# No complex objects needed - just a string argument

ARGS = {
    'error': 'rate_limit exceeded on API call'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_file Ran
ran; our contract draft was wrong, not the code
LeiLiLab/susvibes/susvibes/core/utils.py
code served (permissive licence) · get_code("baf788c2a03567da")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import yaml
import tempfile
from pathlib import Path

# Create temporary files for testing
temp_dir = tempfile.TemporaryDirectory()
temp_path = Path(temp_dir.name)

# Create a JSON file
json_file = temp_path / "test.json"
json_file.write_text(json.dumps({"key": "value", "number": 42}))

# Create a JSONL file
jsonl_file = temp_path / "test.jsonl"
jsonl_file.write_text('{"line": 1}\n{"line": 2}\n{"line": 3}\n')

# Create a YAML file
yaml_file = temp_path / "test.yaml"
yaml_file.write_text("key: value\nnumber: 42\nlist:\n  - item1\n  - item2\n")

# Create a plain text file
text_file = temp_path / "test.txt"
text_file.write_text("This is plain text content")

# Test with JSON file
ARGS = {
    "file_path": json_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
yaml — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
push_dataset_to_hub Ran
ran; our contract draft was wrong, not the code
LeiLiLab/susvibes/susvibes/core/utils.py
code served (permissive licence) · get_code("0fe1071ca868cfee")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import json
import yaml
import tempfile
from pathlib import Path

# Mock HuggingFace API to avoid network calls
class MockHfApi:
    def __init__(self, token=None):
        self.token = token
    
    def create_repo(self, repo_id, repo_type='dataset', private=False, exist_ok=False):
        pass
    
    def upload_file(self, path_or_fileobj, path_in_repo, repo_id, repo_type='dataset', commit_message=None):
        pass

# Patch the HuggingFace import
import sys
from unittest.mock import MagicMock
mock_hub = MagicMock()
mock_hub.HfApi = MockHfApi
sys.modules['huggingface_hub'] = mock_hub

# Set required environment variable
os.environ['HF_TOKEN'] = 'mock_token_for_testing'

# Create sample dataset as list of dicts (for JSONL format)
sample_dataset = [
    {"id": 1, "text": "Hello world", "label": 0},
    {"id": 2, "text": "This is a test", "label": 1},
    {"id": 3, "text": "Sample data", "label": 0},
]

ARGS = {
    "dataset": sample_dataset,
    "repo_id": "test-org/test-dataset",
    "filename": "data.jsonl",
    "private": False,
    "commit_message": "Initial commit with test data"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
huggingface_hub, yaml — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
strip_ansi Ran
ran; our contract draft was wrong, not the code
LeiLiLab/susvibes/susvibes/core/logs.py
code served (permissive licence) · get_code("bad5d7639938f5d4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

_ANSI_RE = re.compile('\\x1b\\[[0-9;]*m')

def strip_ansi(text: str) -> str:
    """Drop terminal colour/SGR escape codes so parsing and parser-synthesis see plain text — some
    runners (e.g. pytest under a pseudo-tty) wrap the count in codes like `\\x1b[1m7 failed\\x1b[0m`."""
    return _ANSI_RE.sub('', text)


ARGS = {
    'text': '\x1b[1m7 failed\x1b[0m'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
strip_bookkeeping Ran
ran; our contract draft was wrong, not the code
LeiLiLab/susvibes/susvibes/core/report.py
code served (permissive licence) · get_code("6a7e0f6595ea0e79")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a sample report dictionary with various fields
report = {
    'meta': {'timestamp': '2024-01-01', 'version': 1},
    'reused': 5,
    'loss': 0.5,
    'accuracy': 0.95,
    'f1_score': 0.92,
    'precision': 0.89
}

# Define ARGS with all parameters for strip_bookkeeping
ARGS = {
    'report': report,
    'drop': ('f1_score',)
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
clip_tokens Not yet run
unverified (harvested, no recorded run)
LeiLiLab/susvibes/susvibes/core/logs.py
code served (permissive licence) · get_code("17560aaa17bfb40d")
How it ran

no invocation recorded.

get_log_dir Not yet run
unverified (harvested, no recorded run)
LeiLiLab/susvibes/susvibes/curate/constants.py
code served (permissive licence) · get_code("82b747bd2d678cf7")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 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 11 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-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

Vibe coding is a new software development paradigm in which human engineers prompt a large language model (LLM) agent to complete complex coding tasks with little supervision. Although vibe coding is increasingly adopted, is the generated code really safe to deploy in production? To investigate this question, we propose SUSVIBES, a benchmark consisting of 186 feature-request software engineering tasks from real-world open-source projects, for which, human programmers committed vulnerable implementations. We evaluate 12 widely used coding agentic settings with frontier models on the benchmark. Disturbingly, all agents perform poorly in terms of software security. Although 57% of the solutions from SWE-Agent with Claude 4 Sonnet are functionally correct, only 11.8% are secure. Further experiments demonstrate that preliminary security strategies, such as augmenting the feature request with vulnerability hints, cannot mitigate these security issues. Our findings raise serious concerns about the widespread adoption of vibe coding, particularly in security-sensitive applications. The code and dataset are available at https://github.com/LeiLiLab/susvibes. The leaderboard is at https://leililab.github.io/ susvibes-leaderboard.

For agents

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

get_harvested_code_for_paper("2512.03262")
get_code_for_paper("2512.03262")
have("2512.03262")

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

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

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

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

Connect an agent — have() is free.