Case · DiggingBeagle record

NameTrap induced vulnerable code from identifier-only source changes

Controlled identifier renaming steered coding agents toward insecure implementations even when the starting code was not vulnerable.

Scope

The measurements are benchmark outcomes with a particular model and task design, not a rate of insecure commits across all software engineering.

Assessment profile

Assessment method
Setting
evaluation
Exploitation
demonstrated
Evidence
Grade B
Remediation
mitigation available
AI role
AGAINST AI
Basis and provenance

Attacker-controlled source identifiers are changed without inserting an existing vulnerable program. Later agent-generated edits introduce tested CWE weaknesses in controlled coding tasks, with success rates dependent on agent and model. Live malicious pull requests are not established. Impact is left ungraded because a calibrated 0-to-4 impact basis for actual affected targets is unavailable from these Claims.

Assessed Oct 28, 2026 using diggingbeagle.assessment/1.

At a glance

Claims & evidence

CLM-CP22-008-AAcross six coding agents under the study’s matched setup, overall attack success ranged from 22.5% to 56.0% for identifier-based bait in selected CWE categories.supported

Basis: reported finding

Link to claim
CLM-CP22-008-BThe test covers selected command injection, XSS, cryptographic and deserialization weakness classes; malicious semantics were introduced in later agent output.supported

Basis: reported finding

Link to claim

Controls and mitigations

  • Verify generated security-sensitive actions and data flows independently from the source variables or natural-language identifiers that suggested them.

Unknowns and contradictions

  • How easily the identifier bait survives ordinary code review and differs across real repositories remains unmeasured.

Sources and citation

Material revision history

  1. Oct 28, 2026 · Canonical change recorded · new in release · revision 199