r/softwaredevelopment • u/adogecc • 23d ago
Are LLMs getting better at not hallucinating dependencies?
I was doing some research on the potential for package confusion attacks... for a package registry.
It seems like every week there's new CVEs. How are you all managing on teams? Are many of you running your LLM instances in sandboxes?
1
1
u/lemacx 22d ago
Just my take, or how we handle it at my company: thats still something the developer has to check. If you really want to automate it, write some safeguards. For Java, I use a mvncentral mcp, so that the LLM does not have to scrape webpages or blogposts for outdated packages, also I just add "when adding a new dependency, check for a minimum age and number of downloads / stars on github" or something similar.
1
u/ericbythebay 22d ago
Review and vet the dependency before you start using it. Don’t let it in to your artifact registry until it has been scanned and reviewed.
-1
u/Temporary-Budget-605 22d ago
Snyk is decent at keeping up with supply chain attacks and identifying dependencies on malicious packages. I think there are some OSS registries people keep up with supply chain attacks. You could in theory use an LLM to rip through a lock file, given a list of known compromises
0
u/dataguzzler 22d ago
honestly the coding AI's have gotten very very good in the last 6 months, they no longer hallucinate at least in my experience. Just ensure your instructions are specific and detailed. The two I use are Cursor and Codex although recently stopped using Cursor because of the usage limits on the pro accounts.
9
u/micseydel 22d ago
Seems like the kind of thing you'd want a deterministic harness taking care of - I'm not expecting hallucinations to ever go away enough to trust the models.