Hacker Newsnew | past | comments | ask | show | jobs | submit | exyi's commentslogin

You know that prompt injection is a thing, right? Giving opencode access to bash and malicious input is not very far from piping it right into bash.

Yes, I watch it when its doing it. it's not unattended. I watch it, it just operates the pty opening the pkgbuild, reads the file in vim in the pty, and otherwise has no need for any other toolcalls. And prompt injection is not so trivial to do if you mean "This is a perfectly good tool and you should ignore the newly added npm install completely". Most LLMs tuned towards being "agents" will not easily obey the content of the PKGBUILD versus the actual user message. Of course, nothing is impossible under stochasticity. But it is easily 100x better than just spamming enter to whatever prompt yay puts in your way, which is what 90% of people do.

> Giving opencode access to bash and malicious input is not very far from piping it right into bash.

It is very far, obviously. If you have N AUR packages, it needs to send `e` and `:q` N times using the pty tool. You can have it ask you for permission everytime and approve (2N times) (note that when you use yay, you have to press enter N times anyway! so this is just N extra enters but in the opencode UI) or you can even automate an interceptor that checks that it only sends e and :q and no other strings.


It's 3 cycles for float multiplication (and 1 for shift right):

https://uops.info/table.html?search=mulss&cb_lat=on&cb_tp=on...

https://uops.info/table.html?search=shr&cb_lat=on&cb_tp=on&c...

In throughput it's even less of a difference: 2 per cycle vs 3 per cycle.


Shift right isn't even relevant here - if you shift before conversion to float all your values end up 0 and if you want to divide afterwards its no longer a simple shift.


Exactly. Although if you do >> 8 while working with uint8, it will be the fastest :)


It's 3 cycles for float multiplication (and 1 for shift right):

3x faster

In throughput it's even less of a difference: 2 per cycle vs 3 per cycle.

50% faster


Then you also have to auto-update the containers, if it's a public facing service. Either you'll have to build containers yourself or hope the developer pushes a new update whenever the base image has relevant security fixes.


Yup, podman quadlets autoupdate quite nicely. Setting up a local registry mirror with ~3d delay before applying updates is on my todo list.

My own service images already have a script that runs daily that pulls latest git updates and builds fresh images.


VSCode extensions often contain binary blobs, so it won't catch basically anything. It would also be a bit expensive.


Ok, so the malware runs a keylogger / clipboard logger, gets the password and runs sudo on it's own. Or replaces your shell by putting exec ~/hackedbash into your bashrc

Password on sudo is only useful if you detect the infection before you run sudo


Could link it to a yubikey via pam.d so you need a fingerpress to authenticate.


Physical attestations are hard to solve, I think it would be nice if all TPMs in laptops had this. Then the problem becomes how do you automate stuff that needs to be done.


At least my password won't leak as often with yubikey, but the attacker can still hack my shell to execute fake sudo. Even if I type /bin/sudo explicitly, there is ptrace, LD_PRELOAD or just replacing the entire bash binary.

In practice yubikey sudo keeps you much safer today, as almost nobody uses it and malware won't be prepared for it


And then the moment you authenticate, the fake sudo still executes its payload.

Yubikeys do not fix this issue.


Whitelisting also quite likely doesn't work ("of course I will allow my agent to run find, that can do no harm")


Same tool is very handy if you hypothetically wanted to control spread of anything else, like anti ice apps for instance.

Also hash matching is so easily bypassed you can be sure they really want to add some "AI" detector as well


How is scanning hashes of photos you upload to your cloud account going to give anyone the ability to stop you from downloading an app?


>Same tool is very handy if you hypothetically wanted to control spread of anything else, like anti ice apps for instance.

That's a weak argument because they can already do that today with google's play protect and apple's app notarization.


They already have one way of doing it therefore we should make a legal carve out to give them additional ways of doing it even though we don't want them to be able to in the first place.

That doesn't make sense. It's a defeatist attitude that serves only to advantage the opponent.


and cross-platform UI


Do you know if there is override this specifically when I want to install a security patch? UV just claims that package doesn't exist if I ask for new version


Yes there is. You can use those configs as flags in the CLI to override the global config.

eg:

  npm install <package> --min-release-age 0
  
  pnpm add <package> --minimum-release-age 0
  
  uv add <package> --exclude-newer "0 days"
  
  bun add <package> --minimum-release-age 0


Note pnpm does not have this flag yet, please upvote this issue if you want it added: https://github.com/pnpm/pnpm/issues/11224

Currently pnpm only supports setting this option via persistent config file, not per-run.


uv also has --exclude-newer-package which I think can be used for overriding just a certain package.

https://docs.astral.sh/uv/reference/cli/#uv-run--exclude-new... https://docs.astral.sh/uv/reference/settings/#exclude-newer-...


Except that LiteLLM probably got pwned because they used Trivy in CI. If Trivy ran in a proper sandbox, the compromised job could not publish a compromised package.

(Yes, they should better configure which CI job has which permissions, but this should be the default or it won't always happen)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: