Grok CLI uploaded the whole home directory to GCS

3 days ago (twitter.com)

https://xcancel.com/a_green_being/status/2076598897779020159

Important to clarify that this was not the Grok agent deciding to read the files.

I don't think the LLM had anything to do with this decision at all. It looks like the Grok tool starts a session by deterministically kicking off a full upload of the user's current repository (and maybe their directory if not version tracked? Not clear if this user had previously run "git init" in their home directory) to Grok's servers.

One possible "innocent" explanation could be that xAI then run vector embedding on every file to help later provide the right context. I don't think thats a worthwhile tradeoff here, especially since other popular coding agents get by just using grep/ripgrep run locally.

So many of the replies are saying that they should've restricted access using .md files and whatnot. Is really any guarantee that they even follow those? It seems like even if you ask pretty please don't touch those files, there's a chance they will. So many people have just willingly installed spyware on their computers and big tech calls this the next big thing.

  • I will keep banging this drum until people listen:

    Trying to use markdown files to limit access should never be treated as a security guarantee at all.

    This is a form of in-band signalling that goes into a machine that, among other things, tries to read between the lines of your requests, extrapolate user desires, and please the user.

    The only sane way to address this is using a control plane. A well-built harness can do this; a sandbox can do this; hell, a carefully-chosen `umask` can do this; but both of those are liable to introduce notification fatigue in the user.

    • It's wild that we've known for decades to use ACLs to make sure people don't have access to files we don't want them to have access to, but somehow a computer pretending to be a person doesn't get that same treatment.

      10 replies →

    • The easiest, most guaranteed way to isolate it is to run it in a VM or container where it literally can't do the wrong thing without some kind of full container or VM exit exploit.

      It's not hard, it's trivial. Most folks here are constantly working with containers. You know how to run a container with a local directory mounted in it.

      For myself, I've been using Lima (https://lima-vm.io/) to reduce even that little bit of extra work. Lima works cross-platform leveraging native virtualisation or containerisation, and has some useful capabilities for using agents.

      6 replies →

    • Especially when I find that, when I ask an agent not to do something, the mere mention seems to put the "idea" in its "head," making it more likely to ultimately do that thing.

      1 reply →

    • > Trying to use markdown files to limit access should never be treated as a security guarantee at all.

      This is akin to politely asking guests to to steal your jewels. If your jewels are in the living room, and your guests have unfettered access to the living room, this technique will only work for the most trustworthy of guests.

      2 replies →

    • If you're not using a sandbox, something like this will inevitably happen to you. It's really not that hard to set up and should be a standard recommendation.

    • I always run harnesses using devcontainers, gives me much needed flexibility and peace of mind with regards to data separation guarantees

    • 1000%. I'm experimenting with running my agent (Claude Code) inside a docker container, so I can have a control plane and then YOLO within that limited access. The agent could still mangle my local dev setup, but I consider that an acceptable risk since everything the agent has access to is under version control outside the local machine.

      This is a new pattern for me, I'm curious what others are doing.

      1 reply →

    • It's like making directories called 'only for jack' etc. and expecting everyone to follow the rules

    • One cannot pound that particular drum enough. "Guardrails" in instructions (and all MD files are just instructions) are like price lists at an unattended farm stand. It'll usually work! There will be some money in the basket at the end of the day! People paid for the bagels[0]! But one cannot never assert that it _will_ work; things that _must_ work have to managed out-of-band

      [0] https://pubs.aeaweb.org/doi/pdfplus/10.1257/0002828067772121...

  • I don't understand these people. Agent instructions in markdown is barely a suggestion. I have one which says "All code in this repository is executed in docker containers, run the services with `docker compose run --rm php-cli "$@"`. Gemini and Claude more often than not refuse to abide and will try to execute the environment using /opt/homebrew/bin/php on my host…

    • A frightening amount of people have no idea how AI tools work, even those that should know better. I have seen senior software developers fall for the mistake of believing an LLM output when it spews bullshit about how its own memory or restrictions work.

      LLMs will listen to you and follow your instructions and restrictions most of the time, which seems to be enough for people to believe that they will every time. I've come to terms with the impact slop coding will have on most software jobs in the future, but seeing seemingly intelligent people fall for lies and fantasies concocted by an LLM is making me more and more uncomfortable with the direction we're all heading in.

      4 replies →

    • I've seen claude check the Event Log in Windows and produce powershell scripts to alter firewall rules. This is what makes (something like) T3 Code appealing to me. The computer I'm working on is not the computer where the AI has agency.

  • I don't understand why the AI world does this. We don't need new security. We have security at home. It starts with

        sudo -u restricteduser myagent
    

    Your OS knows how to restrict access to things, you don't have to trust a pinkey promise from a vendor.

    • You will want at least a separate session for the `restricteduser`: E.g. with X11, a process in the same session can do almost anything with your input/output. And most Linux distributions make it really hard to disable external device access for individual users...

      3 replies →

    • Users do not want the agent to be restricted. They want the agent to read the user's mind and resolving the user's cognitive dissonance and contradictory preferences.

      1 reply →

    • Does this have the affordances to work well with a pretty standard agentic coding setup (e.g. claude code/codex) on macos?

      I don't really have a good mental model of how ports/files/etc get exposed/permissioned across users. Containers and sandboxing seem much more common than agent-user accounts. Networking seems a little more complicated in the general case.

      I roughly went the route of running apple's container-cli (separate vm/kernel per instance I believe) and mount the relevant home directory/projects and bind ports. Seatbelt/linux sandboxing seems simpler sometimes, but has its complications too.

      1 reply →

    • Why would you give a non-deterministic text generator a user account? It’s not a person, it’s barely a tool at the software level. Restrict at the right level, in this case, a complete sandbox around it given its propensity to hallucinate and be steered by anybody.

      28 replies →

  • You are correct.

    You can't trust the agent, let alone its harness, to oberve any particular directive you give it, so "md files" provide no meaningful protection for anything important.

    But users are broadly reckless and naive and commercial vendors are exploitative and irresponsonsible, so the vendors take advantage of what they can get away with for as long as they can get away with it.

    Use a tight sandbox, and join the chorus loudly when others press on vendors to be make user safety an earnest and hard-to-abandon priority.

  • That's the whole reason I refuse to install Google Drive or Dropbox's desktop applications. I only use the web interface so I know exactly what gets uploaded and when. I assume that anything running on my computer gets access to everything.

    • Sounds like a very wise decision to me. I found found out on my phone that the google photos application uploaded everything in my gallery to their servers without asking me, regardless that I had explicitly disabled all backup to my google accounts on the settings of the phone. I only figured it out when they sent me emails saying that my storage was full.

      1 reply →

    • I would go further and not upload anything that isn't encrypted to cloud storage services. It is extremely likely that those "services" inspect your files.

      1 reply →

  • This was posted on HN yesterday: https://gist.github.com/cereblab/dc9a40bc26120f4540e4e09b75f...

    If it’s to be trusted, it has nothing to do with the “agent” or what’s sent to the LLM. The harness will just straight up package the folder it’s run from and upload it to Google Cloud Storage.

    • > If it’s to be trusted, it has nothing to do with the “agent” or what’s sent to the LLM. The harness will just straight up package the folder it’s run from and upload it to Google Cloud Storage.

      Even if there is a misunderstanding who is really uploading the directory, the TUI/CLI itself by actual code, or if the model decided to do so in the session, if you apply the recommendations from the replies to parent, and it no longer matter who did it, neither the software nor the model will be able to upload all your ssh keys.

      1 reply →

  • Only guarantee that you can get is the sandbox in which it operates. The model itself is a slot machine and can result in anything, and if its sandbox is nonexistent... here's one possibility.

  • I guess the downside of the lower barrier to entry to use these tools is the lack of basic understanding of exactly this sort of concept.

    This sort of thing is why I'm hopeful I'll continue to have employment going forward. Some expertise is hard won and there's just no replacing learning through experience.

    • I think you're right in principle but I just hope I can hold out long enough for my experience to become appreciated and whose corresponding hourly rate isn't something which is suddenly being scoffed at (i.e. markets can remain irrational longer than I can remain solvent).

  • What happened here is not related to agentic behavior or instructions in .md files. It's a binary a user runs, it scoops up their files and sends them to a third-party.

    And the user even paid $99/month or more for having their data leaked.

  • Yeah, I absolutely understand the allure of agentic AI, but I am absolutely not going to give shell access or data access to any agent. Certainly not with my permissions level. Until we can get something set up that gives strict schema-only access I'm going to copy and paste definitions for context. Yes that sucks, but it's my responsibility to protect the system just as much as it is to develop scripts and queries for it.

    • > ... I am absolutely not going to give shell access or data access to any agent. Certainly not with my permissions level.

      Of course not.

      To me it's on a server, in a VM. And they're not seeing the real data/databases from the actual projects: they're seeing fake infos used only while in the dev environment. There's no way I'm dumping, even for tests, the real or part of the real DB somewhere an AI can see it.

      To find bugs (for example), AIs are useful but honestly for code generated by LLMs, I'm thinking about going back to the early copy/paste from the ChatGPT days: because I see so many horrors in the code output by the latest SOTA LLMs that every single line of code they spew has to be checked by someone who does know better.

      It's not just an issue of protecting confidential data / preventing spying: we're all discovering that we've got serious sloppy-pasta code problems now.

  • Claude definitely do not respect all my rules, it often ventures into other folders, most often other projects on the same machine that was greenlit before but not from the current projects' side. One other anomaly I had in the last month: I have two linux users on my laptop, one for work, one for personal. On my work account, it asked me if I wanted to continue with project x, which is in my personal account and not present at all in my home directory with work stuff. So somehow the memory system is keeping context where it shouldn't. Interesting I used this learning to improve the agent framework/harness I have running at work: it now creates a new linux user for each agent which have much stricter rules on how it can read/write to the system, and it is also no longer running as root. Much safer now. Still don't trust it 100% though.

  • I built a docker container that volume mounts the project directory

  • Sometimes you can't even rely on harness not allowing ai to access certain files. "Oh, user doesn't want me to use `read_file` on .env? Well how about I run `cat .env` then?"

    That's scary. Really should run it under different user with carefully assigned permissions.

  • > Is really any guarantee that they even follow those?

    No, there isn't. I just don't understand how naive (or imbecile) people are. The most valuable thing for these companies is people's data used for training, so giving unrestricted access to a tool from them and believing they will never take advantage of it to gobble up whatever they want from your computer, just because they told you they'll never do that, swearsies, is naive, or incredibly stupid.

    Insulate yourself, or better yet, go local whenever possible, and there isn't much you can't do local if you have enough patience.

  • In what universe would a sane person allow any LLM or remote calling software access to their user folder with sensitive data in it?

    I swear, people hear the word LLM and their brain resets when it comes to good software practices.

    Did VMs suddenly stop existing? Kata containers? An RHEL box with SEL?

    It's like there's a new technology and everyone suddenly decided to shutoff their brain when it comes to basic security.

  • Sandboxing is not difficult, and harnesses like Claude Code have it built-in + other protection with auto mode.

    • Is that built in protection really a filter, on code level, that sits between the LLM session and the shell or is it just some pleading in the bootstrap prompt? "Pretty please don't do xyz this is important!!!11"?

      The latter can seem to be as good as the former for any amount of time. No outside observation can really prove reliability, only the negative result ("it does occasionally break the rules we expect") would be proof. So it's difficult to trust any claims that it's the former.

      And even if it does have some of the former, chances are that the protection you experience is only partially provided on code level, while an unknown amount is still just bootstrap prompting that just works until does not.

      1 reply →

  • If you've not realized your agents ignore MD files from time to time, you've not used your agents enough.

    The real enforcement has to be done via methods that YOU can't easily bypass, or they will bypass (OS-level prohibitions, etc).

  • Devcontainers are a much better solution, super easy to setup with VSCode and ensures the AI can't access your main machine.

  • "IMPORTANT: Before entering the leopard pen, don't forget to put on the leopard safety jacket that reads 'UNDER NOT CIRCUMSTANCES SHOULD YOU EAT MY FACE'"

  • > So many of the replies are saying that they should've restricted access using .md files and whatnot.

    What? No, but the random 3rd party software you run on your computer, must be limited by you in some way, haven't we learned this even after the AUR, npm and LLM shenanigans we've dealt with for decades at this point?

    No, don't ask the model "Please don't go outside this directory", you limit the runtime (via VMs, containers, unix permissions, whatever) so it only has access to what it should, not more.

    Same goes for any software, not just agents or chat clients or whatever. Any 3rd party software you don't want to have access to your entire computer, you need to run in this way.

  • Yeah that advice is smoking crack. I have no idea what people are thinking these days? We seem to have lost any sensible security understanding recently.

    You can't gaslight something into not doing something bad. There has to be a hard security control that prevents it doing something bad. And if you don't know what it's capable of because it's non-deterministic then you have to start with a default block everything. This should have never been possible with any sensible design.

    On my first point again, ethics and engineering both went out of the window when fast and shiny came along. This is disgraceful.

Though I'm in the camp "people should really know to sandbox by now and be careful", I'd say we should also be mindful of how far from everyone has deep knowledge of the systems and tools they use. This behaviour of a tool is just malicious. You have to take into account the human factor, of how people likely end up using a system. And in this case, the consequences of exfiltrating so many secrets this way are really quite unacceptable.

  • These tools are explicitly marketed as a way for non-technical people to code. If we expect those same people to understand sandboxing we're dreaming.

    • This is a fight I deal with every day. We have folks in the technology group at work who use AI to write code and do so without issue. But now folks in supply chain or in the executive suite are using it to generate web pages that they want published or apps they want on the internet, and while Claude can generate an HTML file how that gets published, how authentication works, etc is just glossed completely over, and generates a ton of work for the IT team to build up around this stuff as it comes in

  • True, but that's a fantasy happy path. It will never happen, for most people. Only HN people will do that.

    It needs to be baked into the OS.

    At that point, HN users start screeching about it, so it's lose/lose, really.

    • macOS largely _does_ bake this into the OS, and it is annoying. They also provide a way to turn it off for specific applications (including, for example, Terminal.app).

      1 reply →

  • We should also be mindful of how much these tools break down the "be careful and thoughtful" barriers in favor of more and more convenience.

    • Not to mention the very wide push to "Use AI NOW, for EVERYTHING!" in marketing ans many companies, with hardly any though given to safety or where does all the data end up.

  • Given the long history of even the most egregious data breaches with millions of affected people never having the slightest consequences, what level of care are you expecting here?

I am genuinely fascinated by this.

I don’t like piling on especially with security vulnerabilities, but man how many red flags do you need to ignore?

They won’t stop abusing us until we stop using their products.

  • I think my first clue was when their CEO hired a bunch of teenage hackers to sack the government and exfiltrate all our data.

    I didn't really need a second clue.

    • My first clue was when he libelled the diver during the Thailand thing in 2018; it was all downhill from there.

      ...it was quite the sting because I bought a Tesla car only 2 weeks prior to that.

    • The first clue should have been when all the Silicon Valley CEO’s lined up to kiss the ring after the second Trump victory. Remember it wasn’t that long before that “woke” tech companies were derided and accused by the same factions they suddenly found themselves in good standing with. There were entire pushes regarding section 230, etc. to go against social media companies, constant complaints about “Facebook” jails and shadow banning. Now they’re all buddy buddy.

      Anyway, ghouls like Thiel are now a well known name among populist left and right as an enemy, so maybe some good may come from this.

      5 replies →

    • Most people don’t know about that because they live in an information bubble handcrafted by the oligarchs.

  • Lazy or incapable people will do almost anything once it is normalized behavior, which vibe coding has become, to avoid having to do actual work. Even if there were cryptominers running, eating up 80% of their cores and stealing electricity, they would still let it happen. It's not their money or hardware being spent.

  • > They won’t stop abusing us until we stop using their products.

    I don't use AI at all in my daily life.

    Work however will demand you use it.

    AI is not here to help people.

    • Not gonna argue about the utility of AI, but isn't the statement "AI is not here to help people" completely meaningless? AI itself is not "here" for anything; the problem is big tech doing big tech shit as always, not the current technology they're doing it with.

      2 replies →

    • > AI is not here to help people.

      True, but it isn't here to not help people, either.

      It's a spanner. Who wields the spanner, makes all the difference.

      We've spent the last couple of decades, cultivating a huge crop of ultimate scumbag billionaires, with comically exaggerated sociopathy, and that has filtered down to almost every level of society. They are treated as gods, these days (they certainly think of themselves that way).

      It still shocks me (but really shouldn't), on a daily basis, to encounter regular folks, interacting in stores and restaurants, or driving on roads, that mirror the values systems exemplified by our billionaires. Our politicians act that way, and one of their biggest selling points, is normalizing sociopathy (not just the US, either).

      6 replies →

The real solution to these kind of problems is sandboxing. I use podman through a bash script to launch a container whenever I want an agent to work on one of my repos. When done I just generate git patches and port back everything generated.

In this way I'm not afraid of letting the agents totally lose on my computer.

  • That's pretty much the flow I formalized here: https://github.com/nvidia/rumpelpod

    Instead of generating patches, this exposes the agent's checkout as a git remote though.

    Most similar tools (and I believe your tooling as well?) bind-mount the repository checkout from the host into the container. This was always a source of user and permission errors for me, since you have to align the user ids inside and outside the container. Also, some build tools don't like it when the repo is on a different filesystem (bind mount vs container root) than the rest of the system. So I made rumpelpod just bake the repo checkout into the base image that the container is launched from, and since then I haven't had any issues like this.

    For giving the agent access to a docker daemon I found sysbox to work very well. Usually the advice for nested containers is to pass in the host's docker socket into the container. But that would break the outer container isolation completely, since access to the docker daemon is equivalent to root access on the host. With sysbox it's trivial to run a nested docker instance inside the outer container. I haven't tried it with podman yet though. In theory sysbox is just another OCI runtime, but there's probably some tinkering required to get it to work.

    • I followed a similar strat to yours. I rsync my repo into the sandbox/repo directory then mount it inside the container as /workspace. Not baking the checkout in an image allows for very fast initialization since no need to regenerate images everytime your code changes.

      I explain a bit more over here: https://news.ycombinator.com/item?id=48893874

  • Quick Alpine container with the current directory mounted as the current directory:

        docker run --rm -it -v $(pwd):/src -w /src alpine sh
    

    Replace alpine with your favourite Linux distro or image.

    Note entirely perfect, but will be enough against anyone not actively exploiting kernel privilege escalation bugs.

    • Neither podman nor docker will help you when the current directory is your home directory, though. It sounds like that's the root problem here- someone handed the keys to the kingdom to grok, and grok did what grok does, which is look at everything it can for context.

      3 replies →

  • I'm experimenting with OpenShell / NemoClaw.

    It brings some extra sandboxing features compared to just a docker container.

    For instance it also maps the secrets that the agent harness has access to. And has an allow list for outgoing http connections. And there's a way for agents to request extra access. And once approved by the user from an external cli the policy is updated and hot reloaded.

    It's pretty recent. So time will tell how robust it is / will become. What its longevity will be. After all; in a time of LLMs one off experiments are cheap. Longtime nurturing not so much.

  • Are you doing something more advanced with Podman than just mounting the files? How is the access for relevant files given? How is the authentication shared across multiple uses? Just curious to streamline the process.

    • Just a little bit, I want coding agents to work their own disposable copy of a git repo. Here is a quick rundown of what it does:

      It copies the current Git repo into the sandboxes dir, mounts that copy at /workspace in the container. The original repo is never mounted writable, so I don't care if the agent goes to town/wild in there (peace of mind).

      It also builds cached Debian/mise/Elixir/Phoenix images, can start a private Postgres container, publishes selected localhost ports, reuses dependency/build caches, and prints commands on exit for reviewing diffs, exporting patches, applying them back to the real repo, or reopening the same sandbox later. Pi, and OpenCode are configured with proper LLM access keys (derived from my own).

      So spinning a new sandbox is a matter of cding into a project directory and run something like: `ai-sandbox --port 4000 --postgres somedbname` or `ai-sandbox --port 4001` if I don't need DB support. Then when running the server in the container I can access it from the host machine to review in my browser.

    • I work on a sandbox which has similar isolation level to Podman (rootless Linux user namespaces), but with UX optimized for local development work. Take a look: https://github.com/wrr/drop Basically, you don't enter a separate container in which you install a new distro, but you run on top of your current distro. You have environment specific home dirs which isolate your original home, but can have some files, such as configs, mounted from your original home (mostly in read-only mode).

      2 replies →

  • Yeah, I'd expect this approach to be almost universal, with the caveat that of the few who don't, many still don't get bitten.

    But it turns out even in the container, there are footguns that have occasionally made the news by being fired: few projects don't have any external resources and when credentials with any form of write access happen to make it into the container (even if it's just a session cookie) agents might jump at the opportunity.

  • Intricate sandboxing is a real solution in the same way bulletproof backpacks are a real solution to school shootings.

    • It’s not that intricate. A very simple docker and alias setup will get you an ephemeral container with your Claude (or whatever) config and the current wd bind mounted in. That’s a pretty good start.

      Or, the internal sandboxing.

      1 reply →

A bot will do what a bot can do whether malicious or accidental. One should assume they are giving DOGE shell access on their computer and adapt accordingly. I am trying to imagine the SELinux rules required to make a bot play nice and the more I think about it such rule complexity may even befuddle the NSA. Alternate methodology:

- Give the bot it's own machine and only copy to it that which one would want DOGE having access to. Not a virtual machine, the bot will eventually escape. This applies to all bots or agents of all LLM's. Name the node DOGE to remind anyone using it not to share their crown jewels. Come up with a silly name for the agent. Elonious?

- Give it a little RasPi or mini-PC with maximum power savings enabled and no default network gateway.

- Install a self signed CA cert on the DOGE node and force it's traffic through a Squid SSL Bump MitM proxy on the same private LAN to another node with bandwidth limits enabled so that one can monitor what URL's it goes to and what data it is transferring. Configure Squid Access Control Lists to only permit specific domains and optionally URL's, mime-types, sizes, etc...

- Enable custom AuditD rules to watch anything it touches outside of it's sandbox. Send these events to a remote syslog daemon on the Squid server.

- Install Unbound DNS on the squid proxy and enable the DoH (DNS over HTTPS) listener and force all bot DNS queries to use Unbound with query logging enabled.

When the bot attempts to misbehave there will be forensic data to share with the world.

  • Sounds like a lot of work just for it to maybe not work anyways

    • Absolutely. Quite a bit of work one time by one person willing to document the steps or even better create automation scripts for Ansible, Docker, Podman, Systemd, etc... and then automation for everyone using agents. As to success I would suggest it may be better than zero visibility or trusting what the agent says it did. Due diligence and a repeatable standard as apposed to running with scissors.

      This is probably most important for anyone operating agents on corporate systems. I would suggest corporate security should take interest in this idea so they have a good answer for auditors, insurance companies, investors and customers. A full audit trail of what every agent had access to and ingested.

I use a separate user for all development tasks, its home folder contains all repositories I work on, and nothing else, and that is all the IDE and the AI assistants have access to. Create the user once, start the IDE from a shell using that user, and that's it. In Linux it's a pretty seamless experience.

It's simple sandboxing based solely on unix file permissions. Albeit weak, I find the isolation sufficient. Until I'm shown otherwise it seems like a good compromise given how easy it is.

You can also create iptables rules matching on the user, so this technique is useful for applications where you want to restrict network traffic as well, and don't need stronger or more fine-grained isolation mechanisms.

  • A limitation with this setup is you can't let your agent/Linux user run containers with docker. Adding a user to the `docker` group effectively grants the user full root privileges [1], so the secure way is to setup docker in rootless mode. It's doable, but in my experience it's hard to setup (I find it complex with podman as well).

    > Until I'm shown otherwise it seems like a good compromise

    Agreed. In my case I went a long way running the Pi harness in a (simple, rootfull) docker container. As the project I worked on relied on a standardized docker compose stack for local dev and testing, I realized I could automate more if only my agent could use docker. Ultimately, the need for docker for my agent grew when testcontainer [2] was introduced in the project. That's when I finally took the time to setup a VM with incus [3], and now I can let the agent go wild with docker inside the VM.

    This is at least one example where more isolation is required. Otherwise, the dedicated Linux user, if it works for you, is by far the easiest and most pragmatic solution IMO.

    [1] https://docs.docker.com/engine/install/linux-postinstall/#ma... ; https://wiki.debian.org/Docker

    [2] https://testcontainers.com/getting-started/

    [3] https://linuxcontainers.org/incus/docs/main/

You should assume by default for any AI agent that it will read anything. Even if you manually allow/deny and "restrict" it to a subdirectory I would still hold that assumption. Claude reads your ~/.bash_history too so when you ran something it can use that same command.

  • Indeed. I use a spare laptop that has no accounts other than (1) the AI themselves, (2) a secondary GitHub account which has "untrusted devices" in the name to emphasise the point.

    If I recall correctly, I did a full system reset before setting it up this way. It's certainly not logged into iCloud etc.

So is X going to claim the user disabled something the second before everything went south? That's what the owner's other company does.

  • the user literally added their home directory as a trusted directory. there's nothing to "claim"

    • The question "do you trust this directory?" is a world away from "do you consent to upload this directory and all of its contents to a third party?".

      My assumption when asked "do you trust this directory?" is that I am being asked if I am certain I understand what is in the directory and that it won't include some sort of prompt injecting attack. I would never dream that I was consenting to the complete exfiltration of that directory.

    • I don't know that I've ever worked with any software where "trust" means "full upload to vendor"

And this is why so many people run these inside of VMs. Still baffles me how these tools became so accepted when tossing out a `curl -o example.com/script.sh | bash` would be met with (rightful) skepticism until that script was examined.

  • > Still baffles me how these tools became so accepted when tossing out a `curl -o example.com/script.sh | bash` would be met with (rightful) skepticism until that script was examined.

    I've heard it said that piping curl into your shell is no different to running any other program you've downloaded from the Internet (binary, or otherwise): the maximum possible damage that `example.com/script.sh` could do is exactly the same as `githubusercontent.com/someone/releases/myprogram.exe`. At least with `script.sh` you can easily inspect what the script actually does instead of busting out Ghidra.

    It comes down to trust: do you trust Example.com to not serve-up a malicious program (shell script or executable binary)?

    Now we take that principle and apply it to Mr. Musk's "MechaHitler" LLM vendor xAI: they have a well-documented history of unnecessary risk-taking - and outright criminal behaviour (child-porn generators are a good thing that everyone should have, apparently?). Would I trust Grok with anything? Absolutely not.

"The "S" in AI stands for security" strikes again.

Run any cloud-based AI agents in VM/container and map your host's local folders to guest OS as needed.

Takes more effort that default way, I know.

Well, it looks like he was running the agent in his home directory to begin with considering the `repo_path` field is exactly that.

  • Sure, but it's easy to accidentally start up the agent in the wrong directory, like when you open a new terminal. I've done it before when I was distracted (albeit with Claude, not Grok).

    • But isn't that user error? If you want to run a program that can read your current directory's contents and possibly upload that to the cloud, would you run that in a directory with your private keys?

I am running all these clis in containered environments. How can you ever trust LLM to respect the bounderies provided by these magical, non-deterministic intructions files...

  • > How can you ever trust LLM to respect the bounderies provided by these magical, non-deterministic intructions files..

    Putting it in ALL CAPS!

We all know the dangers of running agents with no permissions on our laptop.

The good news is its now just as easy to spin up a sandbox in the cloud for an experiment or coding session than it is on your laptop. Possibly easier since laptop sandboxes aren't as cut and dry as a new cloud VM.

exe.dev is my sandbox infra of choice. You get a new sandbox in literally a second with SSH and a coding agent (Shelley) built in.

I generally drop in in my own binary with toolkit so I can connect Claude or Codex subscription and use their harness.

https://github.com/housecat-inc/scratch

If I was working with newer agents like Grok I'd absolutely experiment on a cloud sandbox before running on my laptop bypassing permissions.

  • > We all know the dangers of running agents with no permissions on our laptop.

    Some/maybe most of the HN crowd, sure, but as a rule ... definitely not. People are generally happy to take whatever the path of least resistance is.

    I know quite a few civilians (even C-level people) who "heard openclaw was cool" (or whatever) and downloaded the first installer they found and hit enter/run without thinking twice.

    • No question most folks will simply take the path of least resistance.

      We need to make it easier (and faster and cheaper) to get a secure cloud agent computer than it is to YOLO it on your own computer.

  • How would it mitigate this issue? Presumably you'd need all the code for a given project inside the sandbox anyways, so the agent will still be able to upload everything. The only thing it might mitigate is you accidentally uploading your home directory.

    • The home directory is the scariest thing to me. The agent needs the code to code, but it doesn't need your personal files or secrets.

      Personally I'm not worried about sharing business code with the model providers. The value of code and IP is decreasing to zero, the only thing that matters is execution on the business front. If they want to steal your business they can do so by rebuilding the idea from scratch.

  • Or if you're on Linux or macOS, learn how Unix permissions work and can be used for, create a new restricted user locally, use that. No need to go all remote with all its drawbacks just to limit a little local process on your computer.

  • Even better: you can fork the exeuntu image & make it immediately more relevant to the things you do in addition to just dropping in your programs and such.

Lots of people responding about LLM but this sound like it’s their coding software („grok build“). Which is approx 100x worse.

LLMs going rogue is a thing and shit happens but publishing software that is uploading user directories including ssh keys is insane behaviour on xAIs part (alledgedly)

There are a distressing number of people in this thread who think that the agent should just be expected to do this. Yes, it is good to be paranoid, but also, the agent should never do this. Indicates horrific engineering practices at xAI.

  • Technology where the entire selling point is stochasticity should be expected to do anything (everything) eventually surely?

  • How could it possibly work without something effectively the same as this happening? Either you run the LLM locally or you send it your files. Am I missing something?

  • It’s not really paranoia that makes me expect this will happen. It’s more like, well, the model weights and the files I want the model to work on have to be inside the same GPU for the agent to actually work, right? So step 1 has to be either “they send me a server rack of GPUs”, or “I send them the files I want the model to work on”. I’m not sure I could reasonably expect anything except this to happen.

  • Engineering? What's that? Modern development best practice is to have the AI make some changes, then have another AI review the changes, and finally "ship it".

  • What should it do then?

    The whole point of LLMs is that you can stop writing rigorous rules in a programming or config language with hard-to-learn syntax, and can resort to natural language instead. You pay for that with the chance for misunderstandings rising to similar levels as in human interaction. That's the tradeoff. Always has been, always will be.

    • Have the comments been combined with another story? Because this isn't about a LLM reading and sending contents of the file to be processed, but the agent framework uploading every single file in /home/user to a random server.

      1 reply →

  • curious what all these people say now that xai admits they were wrong.

Copied this from discord:

    https://gist.github.com/cereblab/dc9a40bc26120f4540e4e09b75ffb547

    Elon did this horrible thing, so I made grok build available for omp with it's own endpoint; Without sending your private repos and secret keys to them.

    -

    oh-my-pi-plugin-grok-build
    Standalone oh-my-pi extension for the xAI Grok Build subscription provider. It adds OAuth login, authoritative model discovery, and OpenAI Responses streaming with the request identity expected by Grok Build.

    Install (No-spywares):

    omp plugin install oh-my-pi-plugin-grok-build

    -

    https://github.com/metaphorics/oh-my-pi-plugin-grok-build

    Star me if you like it or if you hate spywares, lol.

I built yoloAI for this kind of nightmare scenario (among others).

- The sandboxed agent has no access to your homedir, or ANY dir on your machine except what you explicitly give it access to.

- Even with your workdir, it honors .gitignore and refuses to copy in any ignored paths to the sandbox copy.

- The sandboxed agent doesn't have access to your ENV (unless you explicitly pass things through one-by-one).

- Networking can be restricted any way you like.

- Credentials are proxied (currently Claude only), so the agent has access to NO secrets at all.

- You pick the security backend to match your needs (containers, VMs, etc).

- It's FOSS.

https://github.com/kstenerud/yoloai

This sort of stuff is precisely why running local models has to be the future. It's absolutely insane that we just send our code to the cloud like this, and we basically have to trust these companies with it.

My first thought would be their server side extentions, code excecutoon sandboxes and document RAG search, being on by default? Probably should be an opt-in instead of an opt-out.

Why do people run and install these agents locally? No container nothing. I am running Opencode in WSL2 with the windows mounts disabled.

  • So the idea is that these should be treated as programs in an extremely low trust environment, akin to running malware in a VM?

  • If the agent you are running really wanted to it could easily find a way to mount the windows folders and read them all. WSL isn't a security boundary, you are only barely more protected than people running grok in their home directory.

I made a tool to solve this problem (at least on Linux, though I believe there's a way to achieve something similar on MacOS):

https://github.com/swelljoe/flar

It uses bubblewrap to instantly construct a container around just the agent config, auth and history and the project path. The agent or any command it runs can't reach outside of it even if you tell it to (or, more dangerously, a random prompt injection from the web or some third party library or script that the agent runs).

I was using VMs to solve this problem but the temptation to start an agent to work directly on my machine for GUI apps and the like was motivation enough to find an alternative to VMs.

I wouldn't use Grok, became I really don't trust Musk, but even the models I do kinda trust to have good judgement I don't trust enough to let them have unrestricted access to my personal machines and all my credentials.

Don't store any secrets in your repo. Don't store them in env vars. Strong long passphrase on your SSH keys, stop using unencrypted SSH keys. Everything in a keychain.

The practice of storing secrets in a .gitignore'd .env.local.json or whatever is a really bad idea and I can't believe that it has become a normalized, acceptable practice in the industry.

why do people give these LLMs full access to everything and then complain when it does somethign stupid? that is what sandboxes are for.

  • This wasn't the LLM, it was Grok CLI preemptively uploading the entire CWD, regardless of where that CWD is, to its own server.

    I don't think it is reasonable to expect every user (including those just starting out with the tools - maybe experimenting, maybe younger/less experienced in general) to think that the tool they're running for the very first time is going to automatically exfiltrate all of their data.

    It's a pretty serious fuck-up. This guy tweeted about it, who knows how many didn't even notice. It should have been opt-in, it should give user an indication that it's about to do this, etc.

    • I think there are arguments on both sides. People should look for guidance on how to use complex tools, but we know people will not.

      Whose fault is it if someone drives a car without learning how to and injures themselves? On the other hand if the manufacturer has promoted it as one you can drive without learning how to, then whose fault is it?

      A lot of users are fine with everything being uploaded. Most people's primary computing device is now a phone that backs up everything to cloud and using apps that are thin front ends over cloud services.

      4 replies →

  • If your immediate reaction to a new piece of software siphoning up someone’s entire system full of highly personal data is, “you’re holding it wrong”, it might help to take a beat and remember that software was developed by a multi-trillion dollar company’s entire business model revolves around siphoning up as much highly personal data as possible

    • Well said. I hope one day it becomes possible for users who choose to install and run said software to also be able to remember this.

  • Not everyone is a software professional. How many non developers know what a “sandbox” is?

This is why it's going to be a long time before companies will trust AI to scan their networks or apps for security vulnerabilities.

Our company audited a few AI-based pentesting companies and requested logs. In more than one case, it was sending drop tables for sql query injection checking and other destructive operations.

Copied this from discord:

    https://gist.github.com/cereblab/dc9a40bc26120f4540e4e09b75ffb547

    Elon did this horrible thing, so I made grok build available for omp with it's own endpoint; Without sending your private repos and secret keys to them.

    -

    oh-my-pi-plugin-grok-build
    Standalone oh-my-pi extension for the xAI Grok Build subscription provider. It adds OAuth login, authoritative model discovery, and OpenAI Responses streaming with the request identity expected by Grok Build.

    Install (No-spywares):

    omp plugin install oh-my-pi-plugin-grok-build

    -

    https://github.com/metaphorics/oh-my-pi-plugin-grok-build

    Star me if you like it or if you hate spywares, lol.

You shouldn’t run any AI cli (codex, claude code, open code, whatever) locally outside of a vm. It’s like “you shouldn’t run a .exe you downloaded from the internet if you don’t trust the source”. We will learn

Closed source coding agents are just complete info stealing malware. Both Claude and Grok were caught stealing info from your own machines.

This is why it is important to use open source harnesses instead of shady closed ones.

  • All of them are going to read your secrets, OpenCode does it too.

    Reality is, I have seen agents read .env, bash history, keychain (if you let them), etc.

    There is quite literally no way you are going to save off just your little secret somewhere it won't be able to read it, all software needs to read it ~eventually~

    So it's best to sandbox and reset credentials frequently.

I commented not so long ago to people very invested in AI, agents and tokens that are very enthusiast that I would not use an agent for security reasons and loss of control (besides suboptimal output).

It seems I was not wrong.

Not that I do not use AI. I do: fenced, always pasting my snippets and NEVER giving access to my code. Always from the browser. I know what it can do well and which workflows accelerates for me. But I do not want to think that my whole project ends up somewhere else.

the 'upload your home directory to our servers' feature is the kind of thing that used to require a warrant and now it's just a Tuesday afternoon bug report

Not bad, but I think it should also encrypt the local files, to make sure you don't make conflicting edits in the local and remote copies.

So bubblewrap is the community medicine to this issue. But isn't it funny that we're now trusting a single GH user (although allegedly a RH employee) for the supply chain security? Imagine bubblewrap itself being compromised.

Now you trust a single GH user rather than a company. Fair enough. I just think it's very paradoxical.

One of the reasons I never run any agent on my home machine. Containment is mandatory, even more with proprietary harnesses.

I remember a time when we were told not to run obscure software from questionable websites on our computers. And yet, people are suddenly fully vibing with an uncontrollable character generating machine with who-knows-what-behind-the-scene harness. Crazy.

Devcontainers are so useful when working with AI. Not only for rogue agents but rogue scripts/libraries they may download that try and exfiltrate your credentials.

So all the smart people are letting a script being executed on their machines where the execution of the script is controlled/managed by a remote machine. Wait, isnt that a definition of a malware??

The reports of copilot running amok when Microsoft integrated it into Windows 11 should have been enough of a warning. You either ensure proper sandboxing, or you'll be in for a bad surprise eventually.

If quality training data is the most important piece regarding to AI, expect everything to be collected and analyzed. Don't even trust OS containers but run AI on separate hardware

I understand what happened to you could happen to anyone else with Claude or Gemini ... but ... Grok? That is the least trusted AI i would think of.

Friends do not let friends use Grok...

Running LLM outside of the repo directory (home directory in this case) is a big no-no. Beyond that, this is highly concerning behavior of Grok.

Genie lamp "engineering." If I only ask the right question in the correct precise way the genie will obey my wishes and solve all of my problems.

I feel like a lot of people here are understating this issue.

This is a stupid stupid thing to "allow," for every party involved here.

You're a stupid programmer if you're letting these things touch your files.

You're a stupid company if you're letting Grok run wild.

We're a stupid industry if we're not warning everybody about how ridiculous this all is.

  • > You're a stupid programmer if you're letting these things touch your files.

    > We're a stupid industry if we're not warning everybody

    Hmm. Annoy everybody just to warn the stupid few?

    I prefer the current solution. Leave the targetting to the chatbots.

This needs to stop as users do not always read the policies, which end like this person. You use AI, you agreed, they do what ever policies say.

Hard to have sympathy for someone that chose to use Grok. The entire XAI team has been gutted and replaced how many times now?

relying on a markdown file that says "don't access x" as a security boundary seems insane. i couldn't find any grok build-specific policy on this, but if the analysis is right, silently uploading and storing the entire repo is at the very least something users should be explicitly told about.

If you are running these agents outside of something like Coder or Codespaces I think you are doing it wrong.

It's a matter of time when ppl realize AI CLIs == RCE endpoint, technically.

That's some batsh*t craziness. No way I'm touching Grok now. What a big security hole...

Alex Karp was right, AI Compagnies are stealing people code while making them pay for unproductive tokens

  • Karp is right in this instance, sure, but he is just upset Palantir doesn’t have that kind of surveillance tech, and the in-house skills required to keep their edge in the age of LLM-assisted software engineering. Their true “moat" has never been superior tech, it's just the pool of amoral engineers willing to build what others won't.

The question is why would it not? Don’t people know that these AI agents run in the cloud?

You should ALWAYS run your agent as separate, unprivileged, UNIX user, never in your main account.

If you absolutely need to run it as your own user, you should bubblewrap it. I do this for things like Steam, games, or other "blackbox" closed source programs that cannot be reasonably trusted.

  • You should also check that mountpoints like external disks and network resources aren't publicly accessible to other users than your own.

guess they already ran out of fresh context huh Coming up next: You harness takes daily backups of your entire disk and restores.

Maybe I'm just too risk adverse to run with scissors with Grok? I can't imagine ever trusting their harness.

I'll just add this to the list of things an AI company could do to guarantee I'd never use them. You know, like the AI referring to itself as Mecha Hitler, making non-consensual porn (even of minors), or deferring to Elon's tweets as authoritative references on topics.

Guy infiltrates the U.S. government and steals personal information about everyone from federal databases in broad daylight (not to mention cutting aid to poor children with preventable diseases). Average tech bro: “Sure, I’ll use his AI!”

Same tech bro: “Wow I can’t believe they would steal my anime girls!”

Why are people using Musk's LLM when there are plenty of alternatives? You know what he's like. This is like touching water and getting wet.

Welp wasn’t going to use Nazi porn bar guy’s LLM before even more reasons to not use it now.

I feel this is worse than running rm -rf on a root directory. Just saying.

  • Much worse, instead of the data gone it's a data leak.

    Those ssh keys can be used to access private servers

    • SSH keys can be limited by IP in authorized hosts.

      The SSH port itself can be limited by IP in firewalls.

      Finally, the SSH private key can be encrypted with a password.

      Defense in depth is needed. Storing a ssh private key in plain text with no IP restriction is no different to having a password manager store your passwords in plain text on your HD.

      5 replies →

  • I once ran rm -rf on a live NFS mount that the live operations of a major brokerage depended upon.

    I challenge any agent to do worse than an intern with root access.

    • The point is to know better than to let the intern hurt themselves.

      I once saw an engineer try to place the blame on his intern for taking down prod. I was sitting in a meeting with the VP of engineering and someone asked if it was ok for some to blame their intern for the SEV, and I remember the VP saying "I'll talk to $director_for_the_interns_mentor". Interns can't take down prod. An intern's mentor willingly watching an intern take down prod is the closest you can get.

FAFO when you run software that has no problem creating CSAM and is owned by a literal fascist lmao

TLDR: Ran grok in $HOME. Surprised agent read content of folder.

On the other hand, I specifically had grok try hard NOT to read a known key in the project dir (it only saw the first part using a tool, to verify it was present). So there's that.

  • No. Ran `grok` in `$HOME` and the CLI uploaded the whole home content. This is not the LLM going rogue or reading all files.

  • Yeah, this is a lesson about learning how to use tools safely, not about tools abusing the user. The person that posted this probably blames the hammer when he hits his thumb.

  • > TLDR: Ran grok in $HOME. Surprised agent read content of folder.

    Did it really need to read all of $HOME and everything under it?

  • Not only files it wanted to access, but uploaded the whole directory.

    Relevant read: https://news.ycombinator.com/item?id=48877371

    > The practical takeaway for users: your entire codebase leaves (uploaded) your machine unencrypted on each Grok Build invocation, not just files you ask it to read, and no visible setting stops it.

To perform a stupid action is one thing. We all make mistakes.

But to write about it publicly, manifesting our ignorance and lack of critical thinking skill? It's an entirely different matter.

I'm dying to have proper sandboxing in macOS. I installed ChatGPT, I asked it to list files in my user directory and it did. I never gave it permission, how could it? My terminal has access and honestly it shouldn't either.

  • your terminal shouldn't have access to your user directory? As in the files owned by you?

    • It was only like 1 year ago that the loudest complaint about macOS were complaining about needing to click Allow in a new dialog when they use Terminal (or various other apps).

      There are so many comments in here that are calling for nerfing something widely revered for giving us superpowers. Whether these are bots or not, they’re giving off NPC energy.

      If they don’t want to use power tools because they accidentally cut off their finger, then they should just unplug their own power tools and stop clamoring for everybody else’s to be unplugged, too.

      3 replies →

    • I run Claude in that terminal. No, it shouldn't. Not without a prompt. This is how you get worms stealing your keys via some build tool you just run.

  • This is purely a /you/ problem and it’s /you’re/ responsibility to put up the infinite number of arbitrary guardrails you require. Use a container.

Is the Grok CLI a 2 terabyte install? Did Elon dropship you an 8U rack of B200s?

No?

Well the model weights, the GPUs, and the context obviously all have to be in the same place, so “sending your project to them” is literally the only thing that could possibly happen, unless you think agents work by fucking magic.

This is the biggest case of PEBKAC in history, maybe ever.

This is the kind of confusion that Charles Babbage could not rightly comprehend, except at those politicians at least had the excuse that computers had only been invented five minutes prior.

  • Haha so just send over your entire home directory including password managers and home videos every time you need some python code rewritten.

    Only a buffoon would be confused by the straightforward logic.

    • If you decide that your entire home directory is the project, as the OP did by setting the repo_path to ~/, then, well… I mean, if you ask me, I don’t recommend it, but it’s your computer and your free will.

      2 replies →

  • that‘s … not really how it works. Agents get your code into their context via tool calls, not by uploading the entire file to a server „where the weights live and thus the code has to be too“. Small but crucial difference. Aside from that: LLM providers have to be the ones that facilitate your privacy and security by default. That‘s not on the user. They‘re tool providers and they can‘t compromise you and your org by default.

    • What do you think a tool call is? What is this small but crucial difference between a `read_file` tool call and `scp`?

      If your contention is just that this should upload files one by one instead of all at once, what you want is for providers to facilitate the illusion of privacy.

  • It's fascinating how many people in this conversation think that LLMs need to have all of the files in your $CWD on the model provider's servers to be able to do anything.

  • That's not how any other coding harness/agent works. Why confidently comment on stuff you know nothing about?