logoalt Hacker News

cobbalyesterday at 3:49 PM2 repliesview on HN

That's funny. It told me that blocking "npm run build" was the wrong answer. Maybe it doesn't really under The threat model.


Replies

dns_snekyesterday at 4:47 PM

That's a great example of how dangerous actions are perceived as innocent. The entire model of approving specific commands is absolutely bonkers.

npm run build = run an arbitrary shell command written in package.json

Meanwhile the agent could have done any of the following without approval:

- edited `package.json` to contain any arbitrary build command

- planted malicious code in `build.js` (called by `npm run build`)

- planted malicious code in `node_modules/xyz/index.js` (imported by `build.js`)

show 3 replies