logoalt Hacker News

DanielHBtoday at 11:51 AM5 repliesview on HN

Claude ran npm update (update all dependencies to the latest version compatible with the semver specified) in my repo without telling me when trying to fix some problems. Given that only updates the dependency lock-file I didn't notice and it caused several hours of debugging for me.

It is quite sneaky how LLM output can sometimes bypass human verification like that. No one is going around checking every single line change in auto-generated files. Someone could easily sneak a malicious dependency in there through some online tutorial that the LLM searches for.


Replies

kouteiheikatoday at 12:14 PM

> No one is going around checking every single line change in auto-generated files.

There's a simple fix for your particular case: commit your lock fine (which you should do) and always review the diff (which you should also do). (:

show 4 replies
sippeangelotoday at 3:08 PM

Worse: Claude installed packages by just typing versions into package.json instead of running `pnpm install x`, then when running `pnpm install`, discovering that the package versions are too new and incompatible due to the default `minimumReleaseAge`, then proceeding to circumvent this by disabling `minimumReleaseAge` and running a full package update :)

fg137today at 1:33 PM

I cannot tell you how much time I have saved by stopping Claude and asking, "what are you doing?"

At least 50% of the time, Claude "realizes" it already has all the information but is doing something that's unnecessary for the current work, stop, and tell me the previous step has completed.

People complain about approval prompts etc and have Claude run in fully autonomous mode. Outside small bug fixes, I just never find that useful. It helps me immensely to see what commands Claude is running to understand where the work is going.

show 1 reply
tuwtuwtuwtuwtoday at 2:49 PM

Maybe I don't understand you correctly but if your lock file isn't in Git then you have bigger security issues than LLM output, given the last years NPM worms. Unless you're a single developer and the file on disk is the primary source of truth.

YavenTeamtoday at 3:51 PM

[dead]