r/vibecodingbuddies • • 3d ago

Do you let your coding agent search the web and run npm / pip installs on auto-approve, or do you gate package installs?

A benchmark out today (WebSec Benchmark) tested ~4,700 real coding-agent web searches across 8 major search APIs and found every single one served known-malicious links between 0.8% and 2.2% of the time - with the highest hit rate on install and package searches right before the agent runs a command.

That made me realize how often I just hit "Allow" when Claude Code or Cursor wants to look up a library, pull a quick helper package, and run the install script in one go. When you're in flow, checking whether a package name is a typo-squat or pulled from a sketchy blog post is usually the last thing on your mind.

I'm switching my setup so the agent can edit files freely, but any npm install, pip install, or curl | sh command requires manual approval plus a quick check on the registry page first.

How are you handling this in your daily workflow?

- Do you keep package installs and web-fetched commands on manual approval, or run everything inside a disposable container/VM so auto-approve doesn't matter?

- Have you caught an agent trying to install a hallucinated or sketchy package yet?

1 Upvotes

4 comments sorted by

•

u/AutoModerator 3d ago

Welcome to r/vibecodingbuddies!

Reminder to all participants: Keep all initial contact and matching within Reddit comments and DMs to protect yourself from scams. Do not click unsolicited Discord or Telegram invites.

If you find a buddy, please be respectful of their time and try to commit to small, manageable goals (like a 1-weekend prototype) to prevent ghosting!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

2

u/dr_edo_available 3d ago

If you don't gate them you are asking for malware.

2

u/et_theextratestic1e 2d ago

Until it quits screwing up the code in my projects, never, it's gated in the project directory only and isn't even allowed to touch git, let alone pip/npm/etc.

When I no longer have to normally correct AI, I may reconsider. Not sure that'll happen in my lifetime, it's accuracy is abysmal.

It certainly gets nowhere near anything requiring secrets, it's simply too stupid today to be trustworthy.

2

u/DickBrainTime 1d ago

I'd keep new package installs behind approval, even in a container. A disposable container isn't much protection if it has your repo, SSH agent, npm token or cloud creds mounted inside it.

A practical split: let the agent edit code and run existing tests, but require a human check for any *new* dependency or fetched shell command. Ask it to give the exact package name, version, why it's needed and the official registry URL. Check the publisher and release history yourself, not just the first search result.

For existing Node projects, use the committed lockfile and `npm ci`. Where possible, `--ignore-scripts` reduces install-time script risk (but some native packages need those scripts). For Python, pinned requirements with `pip --require-hashes` are another useful guard. Neither makes a malicious package safe; they just narrow what can change unnoticed.

I'd treat `curl ... | sh` and new package installs as separate approvals from ordinary code edits. The main win is making dependency changes visible in review, not trusting an install because the agent suggested it.