Just Pin It: Can Coding Agents Be Trusted to Choose Dependency Versions?
Large language model (LLM) coding agents increasingly manage softwaredependencies. Adding one means choosing a package and a specific version to pin,and because the agent answers from knowledge frozen at a training cutoff, it makesthat security-relevant choice from memory rather than from a package index or avulnerability database. To measure the decision where it occurs, we reconstruct 50dependency-introducing commits from 29 open-source Python repositories at theirparent state, ask six Claude models to perform the same task under tool and networkisolation, and score each choice on a time-bounded, multidimensional correctnessvector rather than a single pass or fail. We then challenge every choice in a secondconversational turn, with a neutral prompt, a true defect, or a false alarm,separating genuine repair from sycophantic capitulation. Across 1{,}128 runs, newermodels rarely name nonexistent versions but are no better at avoidingknown-vulnerable ones, and they pin six to nine releases behind the newest releasethey could have known; their security-and-existence performance does not beat arandom eligible draw. Under a false vulnerability alarm, agents abandoned averified-secure pin in 98.5% of cases and never improved it, and even a contentlessrequest to reconsider overturned 63.7% of good pins; naming a true defect did notmeasurably outperform that nudge. Suggesting a pin is worth delegating only withdownstream verification, and an agent's agreement under challenge carries noinformation about whether it is right.
Authors
- Elvys Soares (ORCID: https://orcid.org/0000-0001-7593-0147)
- Baldoíno Fonseca (ORCID: https://orcid.org/0000-0002-0730-0319)
- Leonardo Leite
- Caio Barbosa
Institutions
- Pontifícia Universidade Católica do Rio de Janeiro (BR)
- Universidade Federal de Alagoas (BR)
Publication Details
- Journal
- Research Square
- Published
- 2026-11-25
- DOI
- https://doi.org/10.21203/rs.3.rs-10549928/v1
- Primary Topic
- Software Engineering Research
- Type
- preprint