News for hackers. Stuff that matters.
Re:A GitHub Issue Title Compromised 4k Developer Machines by est on Friday March 06, 2026 @02:31AM (#47272071)
I don't understand, how exactly does `npm install github:cline/cline#b181e0` work?

b181e0 is literally a commit, a few deleted lines. npm could parse that as a legit script ???

Re:A GitHub Issue Title Compromised 4k Developer Machines by Kalabasa on Friday March 06, 2026 @04:48AM (#47272952)
I think it's pointing to a version of the repo, so npm installs the package.json of that version of the repo.
Re:A GitHub Issue Title Compromised 4k Developer Machines by WorldMaker on Friday March 06, 2026 @11:30AM (#47277121)
In git a commit is a full tree snapshot, even though most commit views only show the diff with the previous commit. npm is using the commit hash as a "version number" and grabbing the full git tree snapshot for that point in time. (Just like in git you can always `git checkout b181e0` to end up in a "detached HEAD" state at that commit's tree. So many developers were doing that unintentionally which is why `git switch` requires the `--detach` flag to checkout the tree at a commit, but the same thing is possible `git switch --detach b181e0`.)