• n2d4 20 hours ago

    [EDIT: See the response by a Cursor dev below — looks like it was not authorized by them]

    Sounds to me like Cursor internally has a private NPM registry with those packages. Because of how NPM works, it's quite easy to trick it to fetch the packages from the public registry instead, which could be used by an attacker [0].

    Assumably, this Snyk employee either found or suspected that some part of Cursor's build is misconfigured as above, and uploaded those packages as a POC. (Given the package description "for Cursor", I'd think they were hired for this purpose.)

    If that's the case, then there's not much to see here. The security researcher couldn't have used a private NPM registry to perform the POC if the point is to demonstrate a misconfiguration which skips the private registry.

    .

    [0] In particular, many proxies will choose the public over the private registry if the latest package version is higher: https://snyk.io/blog/detect-prevent-dependency-confusion-att...

    • ArVID220u 20 hours ago

      cursor dev here. reasonable assumptions, but not quite the case. the snyk packages are just the names of our bundled extensions, which we never package nor upload to any registry. (we do it just like how VS Code does it: https://github.com/microsoft/vscode/tree/main/extensions)

      we did not hire snyk, but we reached out to them after seeing this and they apologized. we did not get any confirmation of what exactly they were trying to do here (but i think your explanation that someone there suspected a dependency confusion vulnerability is plausible. though it's pretty irresponsible imo to do that on public npm and actually sending up the env variables)

      • nomilk 18 hours ago

        > "pretty irresponsible"

        Wouldn't it be more like "pretty illegal"? They could have simply used body: JSON.stringify("worked"), i.e. not sent target machines’ actual environment variables, including keys.

        • reubenmorais 15 hours ago

          It's an unfortunate incentive structure. If you're doing offensive security research, there's two ways you can go about it: you can report the potential vulnerability without exploiting it, in which case you risk the company coming back to you and saying "thanks but we don't consider this a vulnerability because it's only exploited through misconfiguration and we're too smart for that". Maybe you get some token reward of $50.

          Or you can exploit it and say here's the PoC, this many people at your company fell for it, and this is some of the valuable data I got, including some tokens you'll have to rotate. This puts you into actual bug bounty territory. Certainly the PR side of things alone will incentivize them to pay you so you don't make too much of a noise about how Cursor leaked a bunch of credentials due to a misconfiguration that surely every good programmer knows about and defends against (like so many vulnerabilities seem so dumb in hindsight).

          • xmodem 11 hours ago

            Cursor does not have a bug bounty though, and its hard to see how this constitutes anything other than a direct attack on them, their users, or both. "The incentive structure made me do it" does not justify acting like a criminal.

            • grajaganDev 10 hours ago

              Cursor asks researchers to report vulnerabilities to their GitHub security page.

              The same incentive to show impact applies even without a paid bounty.

              • px43 10 hours ago

                > Cursor does not have a bug bounty

                Shouldn't this alone be considered criminal negligence at this point? Cursor isn't some random open source project. It's a company that has funding, and subscriptions. Hell, I pay Cursor for a monthly subscription. Pretty incredible that they have no bounty program.

                • britannio 10 hours ago

                  The lack of a bug bounty program doesn't prohibit them from rewarding reported vulnerabilities.

                  • taskforcegemini 6 hours ago

                    do they though?

              • miki123211 13 hours ago

                You can also console.log those credentials as a PoC, and then show that the console.log could trivially be replaced by a fetch().

                Kind of like a lot of exploit PoCs just "pop a calc" (AKA open the Calculator app), not because opening the calculator is valuable to an attacker, but because if you can open calculator, you can do anything.

                • objectified 10 hours ago

                  The problem there though, is that with PoCs like this, as an attacker you want to have a ping back to your system so that you know the attack has been successful (in this case they probably expected/hoped someone at Cursor to install the package, that's the usual objective in a dependency confusion attack). But what they could have done, is send a less sensitive thing like just the current working directory or current effective user, instead of the whole environment.

                  • fkyoureadthedoc 8 hours ago

                    What actually changes though in your scenario? Potential bad actor gets RCE on your dev machines, it doesn't really matter what they sent home, you're rotating keys and doing your due diligence either way.

                • mistercow 14 hours ago

                  I wonder how viable it would be to find a public key your target owns and use it to encrypt the data you send back. Then you could prove to them that you exfiltrated real data without exposing it to anyone outside the company.

                  Alternatively, you could hash it and say “Look, it’s a sha of your database password hyphen “yougotpwnd””

                  • necovek 11 hours ago

                    HTTPS certificates should already have that public key for you, so it should be trivial.

                  • Szpadel 11 hours ago

                    wouldn't capturing only env names without values be ideal middle ground?

                    look we had access to your Aws tokens, we could take over your account but we didn't steal actual token, we just got proof that we could access it

                    • reubenmorais 6 hours ago

                      Yes I agree names only would have been a better approach here.

                    • 6mile 15 hours ago

                      Yeah, I agree the incentive structure is broken for bug bounty hunters. Until the BB platforms themselves create some rules for their customers and researchers, we are gonna continue to have the sh*t show that we do now. The reality is that bug bounty hunters are deploying a significant percentage of the total malicious NPM packages each month.

                      • mcherm 14 hours ago

                        > The reality is that bug bounty hunters are deploying a significant percentage of the total malicious NPM packages each month.

                        I don't actually think that is a bad thing.

                        The TSA screening at airports would be vastly better if TSA maintained a "red team" that regularly tried smuggling guns (or water bottles or whatever) into airports. The agents would be more attentive if the number of incidents they dealt with was large enough that they could practice more often. The system could improve if it had actual feedback on how accurate and effective it was. And instead of agents overreacting or underreacting they could tune their responses to an appropriate level.

                        The same applies to supply chain attacks. The REAL ones are rare, dangerous, and performed by experts; having a chance to practice catching them, to assess our detection rates, and to adjust our reactions is healthy.

                    • whimsicalism 7 hours ago

                      a prerequisite of “offensive security research” is that it is solicited, no ifs or buts.

                      what they did was absolutely wrong and frankly likely illegal

                      • peanut-walrus 14 hours ago

                        Yeah, it sucks, but that's the way it is. It is super common for bug bounty findings to be ignored or downgraded unless you show actual code exec on their machines or dump some of their creds.

                    • DigitalNoumena 13 hours ago

                      It may interest you that Guy Podjarny, one of the Snyk founders, now has an AI coding company (https://www.tessl.io/about) that looks like a competitor of yours

                    • rdegges 3 hours ago

                      Hey there! I run DevRel & SecRel @ Snyk, we just published a piece to help dispel all the rumors, etc. This provides a lot of in-depth info on the situation: https://snyk.io/blog/snyk-security-labs-testing-update-curso...

                      • arkadiyt 20 hours ago

                        > If that's the case, then there's not much to see here

                        They could have demonstrated the POC without sending data about the installing host, including all your environment variables, upstream. That seems like crossing the line

                        • nomilk 20 hours ago

                          > If that's the case, then there's not much to see here.

                          Allowing someone full access to the contents of your environment (i.e. output of env command) is a big deal to most, I suspect.

                          • LtWorf 6 hours ago

                            If /proc is mounted you can read all of that.

                          • NitpickLawyer 16 hours ago

                            Wasn't this supposed to be fixed in NPM? I remember a talk by the researcher behind portswigger (sorry blanking on his name) doing this a while back, with great success (apple,ms,meta, basically all faang were vulnerable at that time).

                          • tankster 15 hours ago

                            Also interestingly the Snyk cofounder has started a competitor to cursor https://www.tessl.io/ https://techcrunch.com/2024/11/14/tessl-raises-125m-at-at-50...

                            I hope there is no foul play.

                            • guappa 15 hours ago

                              Given how all my interactions with them have been extremely negative (see my other comment), I think it's rather likely that there is foul play.

                            • gortok 9 hours ago

                              The only part of the article I disagree with is this line:

                              > But in general, it’s a good idea not to install NPM packages blindly. If you know what to look for, there are definite signals that these packages are dodgy. All of these packages have just two files: package.json and index.js (or main.js). This is one of several flags that you can use to determine if a package is legit or not.

                              This works -- maybe OK for top-level packages. But for transitive dependencies it's nearly impossible to vet every transitive dependency.

                              If you're pulling in a package that has 400 dependencies, how the heck would you even competently check 10% of that surface area? https://gist.github.com/anvaka/8e8fa57c7ee1350e3491#top-1000...

                              • ziddoap 9 hours ago

                                >If you're pulling in a package that has 400 dependencies, how the heck would you even competently check 10% of that surface area?

                                This would be where different security advice would apply: don't pull in a package that has 400 dependencies.

                                • krainboltgreene 8 hours ago

                                  Given the nature of software development and software developers, especially given American companies decide to value shareholder profits over programmer productivity, this might as well be effectively "You don't need to get vaccines, simply don't get sick from other people."

                                  • wyldberry 6 hours ago

                                    Things like this are suppose to be provenance of an organizations security engineering teams. Helping to ensure you don't ship something like this. It's also hard for them too because no one wants to force developers to re-implement already solved functionality.

                                    • krainboltgreene 6 hours ago

                                      I also have never met a security engineer that was eager to do that.

                                      • finnthehuman an hour ago

                                        > never met a security engineer that was eager to do that

                                        Of course not. We do the fun parts, and write tickets to make the dev team do the boring parts that we will later complain are not implemented to the quality standard we would have reached, had we done the work. That's the deal.

                                    • nightpool 7 hours ago

                                      Out of curiosity, I've always meant to ask, are you related to the famous Geoguesser content creator in any way? It's a pretty distinctive last name.

                                      • krainboltgreene 6 hours ago

                                        I believe he might be a distant cousin. I've done some family tree searching myself and haven't found many things, since the Rainbolt side has mostly been scoundrels and vagabonds there aren't many details, but we do have a mountain that we named after ourselves after we stole it from natives.

                                  • chamomeal 8 hours ago

                                    Wait how in the world does a React carousel component have over 400 deps…

                                    • jbreckmckye 5 hours ago

                                      Do you mean https://www.npmjs.com/package/carousel-react? By the looks of it, this was published by someone 7 years ago as part of a personal project. Nothing uses it.

                                      Going through that list... they all look like personal projects, with no dependents, and a single release by a single person.

                                      • chamomeal 4 hours ago

                                        Ok now that I’ve actually looked at the package.json, it seems like this must be a joke or something. It’s got packages for CLI arg parsing, math expression evaluation, hashing, etc.

                                        When I’m back on my computer I may look at the source and confirm my suspicion that none of those are required for the carousel functionality lol

                                      • cloverich 6 hours ago

                                        History of "micro dependencies" where many flexible utilities are split up into separate packages, such that many npm dependencies are a single function (ie rather than a package exporting ten methods, its ten separate dependencies).

                                        Then because there is no standard library, many reinventions of similar but incompatible utilities. etc.

                                        • tristor 7 hours ago

                                          Because Javascript is a drug that makes developers stupid.

                                          It's almost trite at this point to comment on the obsession that Node has created with developers to reduce functionality to the smallest possible reusable parts, even trivial things, and publish them as packages, then to import and use those dependencies. The idea, in and of itself, is not terrible, but it's been taken to a logical extreme which is very much the definition of terrible.

                                          • jbreckmckye 5 hours ago

                                            Nearly all of these look like demo projects. You're making inferences about an entire group of developers based on a meme plus a search over the very 'worst' offenders.

                                          • KuhlMensch 7 hours ago

                                            /giphy "first time?" meme

                                            • Sohcahtoa82 7 hours ago

                                              Did you think the meme about node_modules having more gravity than a star was just a meme?

                                              It's very much based on reality. The npm ecosystem is just absolutely fucked.

                                            • XorNot 8 hours ago

                                              This is really where SELinux had the right idea overall: preclassifying files with data about their sensitivity, and denying access based on that, does adequately solve this problem (i.e. keeping npm installations away from id_rsa).

                                              • beardedwizard 7 hours ago

                                                The issue with SElinux is usability. A company called intrinsic tried a similar "allowlist" approach to javascript based on the assumption that you could never control this sprawl and had to assume every package was malicious. I never saw the technology take off because generating the allowlist was of course error prone.

                                                im not sure what has to change in UX to make these approaches more palatable, but if you have to frequently allow 'good' behaviors, my experience is it never takes off.

                                                • __MatrixMan__ 6 hours ago

                                                  I think we need to to focus on empirical consensus rather than taking as authoritative some file which makes claims about what a particular piece of software will or won't do.

                                                  So before running any code you'd hash it and ask your peers: "what do we think this does?"

                                                  If it does something surprising, you roll back its effects (or maybe it was in a sandbox in the first place) and you update your peers so that next time they're not surprised.

                                                  I keep saying "you" but this would just be part of calling a function, handled by a tool and only surfaced to the user when they ask or when the surprising thing happens.

                                                  It could be a useful dataset both for maintainers and for people who want to better understand how to use the thing.

                                              • loaph 6 hours ago

                                                > If you're pulling in a package that has 400 dependencies, how the heck would you even competently check 10% of that surface area?

                                                At my place of work we use this great security too called Snyk. Definitely check it out

                                                /s

                                              • 3eb7988a1663 20 hours ago

                                                I need to get serious about doing all development inside a virtual machine. One project per VM. There are just too many insidious ways in which I can ignorantly slip up such that I compromise my security. My only solace is that I am a nobody without secrets or a fortune to steal.

                                                IDEs, plugins, development utilities, language libraries, OS packages, etc. So much code that I take on blind faith.

                                                • redserk 20 hours ago

                                                  Vagrant’s popularity seems to have died down with Docker containers but it’s by far my favorite way to make dev environments.

                                                  Several years ago I worked somewhere that prohibited web browsers and development tools on laptops. If you needed to use a browser, you’d have to use one over Citrix. If you needed to code, you’d use a VDI or run the tools in a VM.

                                                  At the time I thought their approach was clinically insane, but I’m slowly starting to appreciate it.

                                                  • arcanemachiner 17 hours ago

                                                    I still like Vagrant. But I believe it's yet another victim of the Hashicorp license change debacle from a year or two ago.

                                                    Unlike with Terraform/OpenBao, I know of no community effort effort to keep the open-source version of this project alive. The latest open source version is still available on the Ubuntu repo, but who knows who long it will work until somefor of bit rot occurs.

                                                    • pizza234 10 hours ago

                                                      > I still like Vagrant. But I believe it's yet another victim of the Hashicorp license change debacle from a year or two ago.

                                                      The license change is irrelevant - from the licensing page:

                                                      > All non-production uses are permitted.

                                                      Devs who use Vagrant in a development environment can do it as they used to do it before.

                                                      > The latest open source version is still available on the Ubuntu repo, but who knows who long it will work until somefor of bit rot occurs.

                                                      Hashicorp products have always been intended to be downloaded from the website, since they're statically linked binaries (I don't like that they're huge, but matter of factually, they make distribution trivial).

                                                      • fancyswimtime 16 hours ago

                                                        more so a victim of speed

                                                      • hresvelgr 12 hours ago

                                                        Devcontainers[1] are the new incarnation of this pattern. We use them at work and they are a dream for onboarding new developers. The only downside is the VSCode lock-in but if that's a concern there's always DevPod[2].

                                                        [1] https://containers.dev/

                                                        [2] https://devpod.sh/

                                                        • bluehatbrit 11 hours ago

                                                          It looks like the team behind it have been moving it towards more of an open standard over the last year. There's now a CLI reference implementation, and the Jetbrains IDE's have an implementation for it.

                                                          There's also a thread for Zed about a path to implementing it there [0]. Hopefully it'll become a bit more common over 2025.

                                                          [0] - https://github.com/zed-industries/zed/issues/11473

                                                          • roland35 10 hours ago

                                                            I think vs code is the easiest way to set up dev containers, but once they are created I mostly just shell into them and use neovim!

                                                          • tacticus 19 hours ago

                                                            This is the practice in many government sites these days.

                                                            Except the vm is some old windows version without any tools on it. no shell access.

                                                            can't actually do anything useful on there at all.

                                                            VDI systems could work if implemented properly. but that's the last thing a security team actually wants to do.

                                                            • dacryn 16 hours ago

                                                              VDI is actually preferred by our security teams, because they have complete deep packet inspection on literally all traffic going in and out.

                                                              On our laptops, there are still some flows that avoid the vpn etc..

                                                            • pmontra 18 hours ago

                                                              A customer of mine still uses vagrant on a project, for local development. That project started in 2016. We are developing on a mix of Linux, Mac, Windows and it's not as straightforward as it could be. Linux is easier, Windows is messier.

                                                              A newer project fires up VMs from a Python script that calls an adapter for EC2 (with the boto library) when run on AWs and for VirtualBox (by calling VBoxManage) when running locally. That allows us to simulate EC2 locally: it's a project that has to deal with many long jobs so we start VMs for them and terminate the VMs when the jobs are done. That also runs better on our mix of development systems. WSL2 helped to ease the pains of developing on Windows. We call the native Windows VirtualBox, not the one we could have installed inside WSL2, but we keep most of the code that runs on Linux.

                                                              • spike021 16 hours ago

                                                                At my first job almost 10 years ago we had the concept of "X-in-a-box" using Vagrant + VMs and I miss that pattern so much ever since (multiple job skips later).

                                                                None of my jobs since have had any semblance of a better way to set up a local dev environment easily.

                                                                It was just way easier to encapsulate services or other things in a quickly reproducible state.

                                                                I digress..

                                                                • jsjohnst 4 hours ago

                                                                  > At the time I thought their approach was clinically insane

                                                                  Let’s be clear, it’s still clinically insane, even if marginally rationalized.

                                                                  • flyinghamster 11 hours ago

                                                                    I started using Ansible a few years back to set up VMs (or Raspberry Pis) with a consistent environment. Once I wrapped my head around it, I've found it very nice for any situation where I need to treat systems as livestock rather than pets.

                                                                    • bloopernova 6 hours ago

                                                                      I use Ansible in local only mode to install/configure macOS as a development environment.

                                                                      Works well with Homebrew, and copies all the config files that devs often don't set up.

                                                                    • buildbot 19 hours ago

                                                                      Vagrant is still kicking! But yeah not as popular as back in 2014-2016?

                                                                      A hybrid(?) alternative is enroot, which is pretty neat IMO, it converts a docker container into a squashfs file that can be mounted rw or used in an ephemeral way. https://github.com/NVIDIA/enroot

                                                                    • whitehexagon 17 hours ago

                                                                      It's horrible that trust is being eroded so much, and seeing monthly GB updates to my OS doesnt reassure me at all. I like the idea of having a stable isolated VM for each project. Are there standard open-source tools to do this?

                                                                      Specifically I'm transitioning my Go and Zig development environments from an old mac to an M1 with Asahi Linux and getting a bit lost even finding replacements for Truecrypt and Little Snitch. Do these VM tools support encrypted VM's with firewall rules? I saw Vagrant mentioned here and that sounds like it might cover the network isolation, but what else would you suggest?

                                                                      • pritambaral 16 hours ago

                                                                        I run all my dev environments under LXD. Even the IDE: full graphical Emacs (or Vim) over X11 forwarding over SSH. Host is Wayland, so security concerns with X are handled. WayPipe also works, but is jankier than X, probably because X, unlike Wayland, was designed for network transparency.

                                                                        LXD, unlike Docker, doesn't play fast-and-loose with security. It runs rootless by default, and I don't allow non-root access to the LXD socket on host. Each container is a full userspace, so it's much more convenient to configure and use than Dockerfiles.

                                                                        SSH from a container to a remote works transparently because I forward my SSH Agent. This is secure because my agent confirms each signing request with a GUI popup (on host).

                                                                        • 3eb7988a1663 15 hours ago

                                                                          Can you point to a write-up somewhere that details this setup?

                                                                          Part of the appeals of VMs is that they were built with security as a primary objective. I probably have to do something stupid to break that isolation. A custom ad hoc configuration makes me a bit nervous that I will unknowingly punch a Docker sized hole through my firewall and have less security than if I ran a stock workflow.

                                                                          • cheema33 13 hours ago

                                                                            For me, I don't use LXD, but use Proxmox containers. These are non-root Linux containers by default. Super lightweight compared to a VM. Proxmox makes managing LXC containers a little easier with a UI, compared to managing containers strictly using command line.

                                                                            If you go this route, create a container template that has everything you want in every instance. And then spin out new containers whenever you need one.

                                                                            • khimaros 11 hours ago

                                                                              you might be interested in the incus webui

                                                                        • stevage 15 hours ago

                                                                          I always used to do that, using Vagrant. Mostly because it was the only practical way to maintain independent environments for the tools I was using.

                                                                          These days I work in JavaScript and rarely have issues with project environments interfering with each other. I've gotten lazy and don't use VMs anymore.

                                                                          In theory docker type setups could work but they just seem so much effort to learn and setup.

                                                                          • smatija 15 hours ago

                                                                            Seconding vagrant - especially because it's the only reasonable way I found so far to test linux release on my windows rig (would prefer to dev on linux, but windows-only company is windows-only company).

                                                                            Basically I put a Vagrantfile in src folder, then run docker compose with db, caddy, app server and other services inside it - then I forward ports 80 and 443 from vm and use localhost.whateverdomain.igot with self-signed cert on caddy (since https is just enough different than http that I otherwise get bitten by bugs every so often).

                                                                            When I start a new project I can usually just copy the Vagrantfile with minimal changes.

                                                                        • mjl- 14 hours ago

                                                                          i develop on linux, on various projects. i'm mostly concerned with all the tools, build scripts and tests that may read sensitive data, or accidentally destroy data. so i'm limiting access to files when working on a project with linux namespaces, using bubblewrap.

                                                                          i've got a simple per-project dot file that describes the file system binds. while i'm working on a project, new terminals i open are automatically isolated to that project based on that dot file. it has very low (cognitive) overhead and integrates pretty much seamlessly. i suspect many developers have similar scripts. i looked for projects that did this some time ago, but couldn't find it. either because it's too simple to make a project about, or because i don't know how others would describe it. if anyone has pointers...

                                                                          i don't limit network access (though i did experiment with logging all traffic, and automatically setting up a mitm proxy for all traffic; it wasn't convenient enough to use as regular user). there is still a whole kernel attack surface of course. though i'm mostly concerned about files being read/destroyed.

                                                                          • arkh 15 hours ago

                                                                            Time to main Qubes OS on your development machine. https://www.qubes-os.org/

                                                                            • 3eb7988a1663 15 hours ago

                                                                              I actually did try to install Qubes over the holiday, but I repeatedly encountered installation failures and could not ever login to the system. Someone had posted an identical issue, but they were similarly stymied. I should revisit, but my initial foray tells me I am going to have to withstand quite a few papercuts in order to get the isolation I want.

                                                                              • sim7c00 14 hours ago

                                                                                never had issues with qubes like that but i did pick something tested (hw). u can check hardware compat list. it has also some good links to forums for specific hw related tweaks u might need. that being said, runing qubes fully and workin with it is something else... i decided i am uninteresting enough just to use ubuntu these days :p... maybe sometime ill have the patience again.

                                                                            • dacryn 16 hours ago

                                                                              I wonder how this is mitigated by my current workflow of running jupyter and vscode from a docker container.

                                                                              I did not start doing this because of security, but just to get something more or less self managed without any possibility to break different projects. I am tired of my team spending too much time on extensions, versions, packages, ...

                                                                              Docker compose files have saved our team many hours, even if it's extremely wasteful to have multiple vscode instances running alongside each other

                                                                              • technion 20 hours ago

                                                                                I think a lot of the issues in this particular example is the ease with which api keys, once leaked, are single factor passwords.

                                                                                If you ran a key logger on my machine you would never get into any major site with mfa. You couldn't watch me log on to the azure console with passkey and do much with it. But if you scrape a saved key with publish abilities bad things happen.

                                                                                • chrismarlow9 18 hours ago

                                                                                  What's to stop me from installing custom certs and MITM your login session proxying the info. Or an extension to harvest the data after you login. I'm pretty sure if I have root it's game over one way or another. The surface is massive.

                                                                                  • technion 16 hours ago

                                                                                    At that point you've done something much more invasive and detectable than exporting a .env file and you've walked away with a very short lived token. There's always "something more an attacker can do", I'll stand by the view that requiring further authentication to perform interactive actions and pushes is worthwhile.

                                                                                • cedws 18 hours ago

                                                                                  I started doing development under a separate non-admin user on my MacBook. I switch to another user for personal stuff, or the admin user to install stuff with Homebrew. Doesn't protect from zero days but it's better than nothing.

                                                                                  • 3eb7988a1663 15 hours ago

                                                                                    I toyed around with this a bit, and it feels like it has significant merit. User separation is about the only security boundary built into Linux from the beginning. I was not totally happy with the workflow I adopted, but it is probably going to be less burdensome than the VM approach.

                                                                                    • cedws 9 hours ago

                                                                                      With Fast User Switching on macOS it's pretty convenient too. The difficulty is remembering to switch user when changing contexts. I tried to set a different wallpaper/icon for each user to make it more obvious which user I'm on, but macOS just resets them all to be the same.

                                                                                  • weinzierl 14 hours ago

                                                                                    I know where you are coming from and I considered this myself again and again. For me and for now it is not something I want to do and not primarily because of the effort.

                                                                                    The VM might protect me, but it will not protect the users of the software I am producing. How can I ship a product to the customer and expect them to safely use it without protection when I myself only touch it when in a hazmat suit?

                                                                                    No, that is not the environment I want.

                                                                                    My current solution is to be super picky with my dependencies. More specifically I hold the opinion that we should neither trust projects nor companies but only people. This is not easy to do, but I do not see a better alternative as for now.

                                                                                    • guappa 15 hours ago

                                                                                      I just stick to using whatever is on my distribution for personal use.

                                                                                      For work use I use a work machine and if it gets compromised it's not really my own problem.

                                                                                      • Alifatisk 9 hours ago

                                                                                        > For work I use a work machine and if it gets compromised it's not really my own problem.

                                                                                        Is that really a good mindset for a organization?

                                                                                        • guappa 9 hours ago

                                                                                          I guess so… there seems to be absolutely no consequences to getting hacked, so from a business perspective it makes a lot of sense.

                                                                                          It's not up to me to decide what policy to use, and if it was I couldn't just do whatever I wanted, I'd have to justify its cost. And every company does the same…

                                                                                          I can decide the policy at my home :)

                                                                                      • pjmlp 14 hours ago

                                                                                        The security, and overall application stability attack vector, is why I now vouch for processes with OS IPC instead of shared libraries, even if it requires more resources.

                                                                                        It doesn't fully sort out the trust issue though, even if everything is sandboxed in some fashion.

                                                                                        • uticus 9 hours ago

                                                                                          I know of IPC, but it has never occurred to me to view as an alternative to shared libraries. It's an intriguing viewpoint I'm having trouble wrapping my mind around. Are there battle-tested real-life examples of IPC being used where shared libs could have been used instead?

                                                                                          • pjmlp 9 hours ago

                                                                                            VSCode would be one such example.

                                                                                            All the stuff using Android intents, out-proc COM extensions in Windows, XPS in macOS, are other relevant set of examples.

                                                                                            I assume you are kind of new to the computing world, OS IPC is how we extended applications almost 40 years before shared libraries became common feature across all major operating systems.

                                                                                            Naturally with them being around, shared memory in-process was much easier, and less resource intensive. IPC calls require processes, which take more kernel resources, and context switch.

                                                                                            Microservices isn't a new concept, rather re-branding.

                                                                                            Sun had as marketing quote, "The network is the computer", exactly because of how it used to be.

                                                                                        • XorNot 18 hours ago

                                                                                          The real problem is video performance in VMs. It still just...kind of sucks. Running Cinnamon in a VM is just about impossible to get GL acceleration working properly.

                                                                                          nvidia gates it's virtualized GPU offerings behind their enterprise cards, so we're left with ineffective command translation.

                                                                                          IMO: I can tolerate just about every other type of VM overhead, but choppy/unresponsive GUIs have a surprisingly bad ergonomic effect (and somehow leak into the performance of everything else).

                                                                                          If we could get that fixed, at least amongst Linux-on-Linux virtualization, I think virtualizing everything would be a much more tenable option.

                                                                                          • alias_neo 13 hours ago

                                                                                            There are ways around it. There is a community of people who use Nvidia enterprise cards with vGPU for gaming, performance is excellent, or PCI pass through an entire GPU.

                                                                                            If you can't do that because it's for company/corporate purposes then I can sympathise with not wanting to pay Nvidia's prices.

                                                                                            • danieldk 10 hours ago

                                                                                              But would it matter much for development? Either SSH into the VM and use vi/emacs or use an IDE/editor with remote support. VS Code even lets you use a container as a development environment (I know, not a VM by default):

                                                                                              https://code.visualstudio.com/docs/devcontainers/containers

                                                                                              • dsissitka 10 hours ago

                                                                                                I don't know about VS Code's dev containers extension but the SSH extension's README says:

                                                                                                > Using Remote-SSH opens a connection between your local machine and the remote. Only use Remote-SSH to connect to secure remote machines that you trust and that are owned by a party whom you trust. A compromised remote could use the VS Code Remote connection to execute code on your local machine.

                                                                                                https://marketplace.visualstudio.com/items?itemName=ms-vscod...

                                                                                                If you're worried about extensions there's also:

                                                                                                > When a user installs an extension, VS Code automatically installs it to the correct location based on its kind. If an extension can run as either kind, VS Code will attempt to choose the optimal one for the situation;

                                                                                                https://code.visualstudio.com/api/advanced-topics/remote-ext...

                                                                                              • z3t4 16 hours ago

                                                                                                You can get good security without virtualization, for example SeLinux and namespaces in Linux. Jails in BSD and zones in Solaris. We would have many viable and competing solutions if it wasn't for Microsoft monopoly.

                                                                                              • petesergeant 17 hours ago

                                                                                                I wonder how long until this is standard, and PFYs coming into the industry look at our current practices much like people now look at non-encrypted credentials being sent over the network.

                                                                                                • pinoy420 18 hours ago

                                                                                                  Why would you do anything but work related activities on a work machine. If you really want trust for software. Don’t use a computer.

                                                                                                  • smokel 15 hours ago

                                                                                                    It is good to wind down every now and then during work time.

                                                                                                    Also, many people here work on multiple projects for different customers. Having a security breach for one affecting the other is not something you'd be happy with.

                                                                                                    • 3eb7988a1663 15 hours ago

                                                                                                      I never said anything about personal stuff on a work machine? I want my own hardware to have isolation between my email/banking/etc and side project programming.

                                                                                                      • pinoy420 13 hours ago

                                                                                                        Then have a separate machine if you’re that paranoid. Funny how it doesn’t cause issue for the hundreds of thousands of other people in the world

                                                                                                  • guappa 15 hours ago

                                                                                                    snyk is the same company that instead of rotating oublic keys just… changes them without notice. https://github.com/snyk/cli/pull/5649

                                                                                                    They also mark projects as "abandoned" if they move to any other forge that isn't github. And they stay abandoned even if new releases appear on npm/pypi :D

                                                                                                    Their competence isn't as big as their fame, in my opinion.

                                                                                                    Also one of their sales people insulted me over email, because apparently not being interested in buying their product means you're an incompetent developer who can only write software filled with vulnerabilities.

                                                                                                    • azemetre 7 hours ago

                                                                                                      They also penalize libraries that are "done," and require minimal development.

                                                                                                      Completely backwards software that corpos only seem to buy because their insurers force them to check off some security list box.

                                                                                                      • gyoridavid 15 hours ago

                                                                                                        "insulted me over email" - whoa, that's wild, do you still have the email? would be fun to see it :D

                                                                                                        • guappa 15 hours ago

                                                                                                          Sorry, I searched, it seems all my emails from before the last company rename are gone.

                                                                                                          edit: or microsoft outlook sucks… I tried to sort in reverse my inbox to see what's the oldest email there and "the request cannot be satisfied"

                                                                                                          • unixhero 14 hours ago

                                                                                                            Ouch, I kind of trusted it.

                                                                                                            ... more than Gmail and Google

                                                                                                          • ceejayoz 12 hours ago

                                                                                                            I get surprisingly many cold emails these days with a passive aggressive “shall we schedule a call, or are you a bad person who doesn’t give a shit about security?” approach.

                                                                                                            • matwood 8 hours ago

                                                                                                              Yeah. Or 'make this change to help our processes'. Um, that's not my job.

                                                                                                          • alp1n3_eth 6 hours ago

                                                                                                            That's extremely unfortunate, especially about the "abandoned" labelling. I've been looking to move off GitHub recently as well, it feels like it's got a bit too much control.

                                                                                                            Codeberg looks interesting, and there are self-hosted ones like Forejo that also look great if you're okay with the maintenance.

                                                                                                            • bilekas 15 hours ago

                                                                                                              > hey also mark projects as "abandoned" if they move to any other forge that isn't github. And they stay abandoned even if new releases appear on npm/pypi :D

                                                                                                              Well theres a sign of a good team.. /s

                                                                                                              That's actually an interesting take, I haven't heard too much about them except that they do have an ego.

                                                                                                              • Ylpertnodi 11 hours ago

                                                                                                                I'm sure you can provide the body of the [appropriately redacted] said email?

                                                                                                                • guappa 10 hours ago

                                                                                                                  I was also sure until I found out that outlook refuses to search old emails.

                                                                                                              • woodruffw a day ago

                                                                                                                Without more context, this doesn't look great for Snyk either way: either they have an employee using NPM to live test their own services, or they have insufficient controls/processes for performing a legitimate audit of Cursor without using public resources.

                                                                                                                • tru3_power 20 hours ago

                                                                                                                  Why not? NPM behaves oddly when there is a public package named the same as one on a private repo, in some cases it’ll fetch the public one instead. I believe it’s called package squatting or something. They might have just been showing that this is possible during an assessment. No harm no foul here imo

                                                                                                                  • woodruffw 20 hours ago

                                                                                                                    > They might have just been showing that this is possible during an assessment. No harm no foul here imo

                                                                                                                    You're not supposed to leave public artifacts or test on public services during an assessment.

                                                                                                                    It's possible Cursor asked them to do so, but there's no public indication of this either. That's why I qualified my original comment. However, even if they did ask them to, it's typically not appropriate to use a separate unrelated public service (NPM) to perform the demo.

                                                                                                                    Source: I've done a handful of security assessments of public packaging indices.

                                                                                                                    • guappa 15 hours ago

                                                                                                                      Comments here seem to indicate that cursor did NOT ask them to (unless of course someone inside the company did and didn't tell the others)

                                                                                                                      • compootr 18 hours ago

                                                                                                                        if Cursor is secure it shouldn't be a problem for them! (and, according to their comments, it is)

                                                                                                                        • woodruffw 18 hours ago

                                                                                                                          It's not about being a problem or not. It's a basic responsibility when doing security research: maintaining an isolated test environment is table stakes.

                                                                                                                          • mmsc 17 hours ago

                                                                                                                            How should it have been done differently? How else is the researcher supposed to know if the attack works? "Hey random company, we have no proof it's going to work but we think maybe your system, which we can't see, is vulnerable! Go waste time and check!"

                                                                                                                            • cheema33 13 hours ago

                                                                                                                              Cursor team has already stated here that they did not ask Snyk to perform a security audit. I wonder if Snyk's actions are equivalent to me coming to your house late at night and then trying to open any and all doors and windows. In the name of security research. Without an invitation from you.

                                                                                                                              How else am I to validate that your house is secure?

                                                                                                                              • bostik 17 hours ago

                                                                                                                                Local DNS override, and two registries. One mirroring the relevant public NPM packages as they are, and one "normal" internal one. Make the mirror registry resolvable with the same name(s) as the real, public NPM registry.

                                                                                                                                Then test the behaviour.

                                                                                                                                • mmsc 16 hours ago

                                                                                                                                  I think there's an incorrect assumption that the Snyk team has any access to Cursor's systems, or their source code.

                                                                                                                        • BeefWellington 18 hours ago

                                                                                                                          "No Harm No Foul" in this case would be a simple demonstrative failure case, not functioning malware.

                                                                                                                      • nikcub a day ago

                                                                                                                        Looks like a white hat audit from Snyk testing. Got flagged because oastify.com is a default Burp Collaborator server.

                                                                                                                        They should be running a private npm repo for tests (not difficult to override locally) and also their own collaborator server.

                                                                                                                        • Cthulhu_ 13 hours ago

                                                                                                                          It's not white hat because they actively extract data; if it was just to prove it worked they could've done a console.log, cause npm install to fail, or not extract a payload.

                                                                                                                          • that_guy_iain 10 hours ago

                                                                                                                            The data they extract is nothing sensitive and this way they can see how many hits they get. The more affected the bigger the headline for them.

                                                                                                                            • __jonas 9 hours ago

                                                                                                                              In what world is "all environment variables" nothing sensitive?

                                                                                                                        • dannyallan 9 hours ago

                                                                                                                          Snyk Research Labs regularly contributes back to the community with testing and research of common software packages. This particular research into Cursor was not intended to be malicious and included Snyk Research Labs and the contact information of the researcher. We were very specifically looking at dependency confusion in some VS Code extensions. The packages would not be installed directly by a developer.

                                                                                                                          Snyk does follow a responsible disclosure policy and while no one picked this package up, had anyone done so, we would have immediately followed up with them.

                                                                                                                          • luma 9 hours ago

                                                                                                                            Spraying your attack into the public with hopes of hitting your target is the polar opposite of responsible. The only "good" part of this is that you were caught in the act before anyone else got hit in the crossfire.

                                                                                                                            In response, you suggest that you'll send a letter of apology to the funeral home of anyone that got hit. Compromising their credentials, even if you have "good intentions", still puts them into a compromised position and they have to react the same as they would for any other malevolent attacker.

                                                                                                                            This is so close to "malicious" that it's hard to perceive a difference.

                                                                                                                            edit: Let's also remind everyone that a Snyk stakeholder is currently attempting to launch a Cursor competitor, so assuming good intentions is even MORE of a stretch.

                                                                                                                            • yabones 9 hours ago

                                                                                                                              This is grey-hat at best. Intent may have been good, but the fact is that this team created and distributed software to access and exfiltrate data without permission which is very illegal. You may want to consult with the legal department before posting about this on a public forum fyi.

                                                                                                                              • senorrib 9 hours ago

                                                                                                                                Cool. Why phone home the user's environment, then? The vulnerability could very much be confirmed by simply sending a stub instead of live envs.

                                                                                                                                • etyp 9 hours ago

                                                                                                                                  Seems reasonable enough, but why would it (allegedly) send environment variables back via a POST? Even if it's entirely in good faith, I'd rather some random package not have my `env` output..

                                                                                                                                  • austinkhale 7 hours ago

                                                                                                                                    Upvoting this since presumably you're actually the CTO at Snyk and people should see your official response, but wow this feels wildly irresponsible. You could have proved the PoC without actually stealing innocent developer credentials. Furthermore, additional caution should have been taken given the conflict of interest with the competitor product to Cursor. Terrible decision making and terrible response.

                                                                                                                                    • pizzalife 7 hours ago

                                                                                                                                      What is responsible about sending the environment over in a proof of concept?

                                                                                                                                    • fintechie 10 hours ago

                                                                                                                                      Hopefully this makes the Cursor team reconsider security (which doesn't seem very good really).

                                                                                                                                      Stopped using it for serious stuff after I noticed their LLMs grabs your whole .env files and sends them to their server... even after you add them to their .cursorignore file. Bizarre stuff.

                                                                                                                                      Now imagine a bad actor exploiting this... recipe for disaster.

                                                                                                                                      • miohtama 10 hours ago

                                                                                                                                        Security often means the opposite of scalability and growth, so why should they? The business goal is to make sure Cursor grows large enough that they have economics of scale to be a viable business.

                                                                                                                                        If you want secure LLM you can use Mistral, which comes with all the EU limitations, good and bad.

                                                                                                                                        • yunwal 9 hours ago

                                                                                                                                          Mistral (an LLM company) is not really a substitute for cursor (an IDE). Tabby is probably the closest open-source alternative. https://github.com/TabbyML/tabby

                                                                                                                                      • mirkodrummer 19 hours ago

                                                                                                                                        Looks like NPM is generating jobs for those in the security field. It’s an unfixable mess, I really hope some competition like JSR will put enough pressure on the organization.

                                                                                                                                        • devjab 14 hours ago

                                                                                                                                          It's not just NPM, it's the trust in third party libraries in general. Even though it's much rarer, you'll see exploits on platforms like Nuget. You're also going to see them on JSR. You have more security because they are immutable, but you're not protected from downloading a malicious pacakge before it's outed.

                                                                                                                                          I think what we're more likely to see is that leglislation like DORA and NSIS increasinly require that you audit third party packages. This enforcing a different way of doing development in critical industries. I also think you're going to see a lot less usage of external packages in the age of LLM's. Because why would you pull an external package to generate something like your OpenAPI specification when any LLM can write a cli script that does it for you in an hour or two of configuring it to your needs? Similarily, you don't need to use LLM's directly to auto-generate "boring" parts of your code, you can have them build cli tools which does it. That way you're not relying on outside factors, and while I can almost guarantee that these cli tools will be horrible cowboy code, their output will be what you refine the tools to make.

                                                                                                                                          With languages like Go pushing everything you need in their standard packages, you're looking at a world where you can do a lot of things with nothing but the standard library very easily.

                                                                                                                                        • rdegges 3 hours ago

                                                                                                                                          Hey there! I run DevRel & SecRel @ Snyk, we just published a piece to help dispel all the rumors, etc. This provides a lot of in-depth info on the situation: https://snyk.io/blog/snyk-security-labs-testing-update-curso...

                                                                                                                                          The TL;DR is that our security research team routinely hunts for various vulnerabilities in tools developers use. In this particular case, we looked at a potential dependency confusion attack in Cursor, but found no vulnerabilities.

                                                                                                                                          There's no malicious intent or action here, but I can certainly understand how it appears when there's not a ton of information and things like this occur! As a sidenote, I use Cursor all the time and love it <3

                                                                                                                                          • rettichschnidi 20 hours ago

                                                                                                                                            OT: Has anyone ever gotten (proper) SBOMs for Snyks own tools and services? Asking because they want to sell my employee their solution (which does SBOMs).

                                                                                                                                            • KennyBlanken 20 hours ago

                                                                                                                                              Snyk is founded by people from the Israeli Army's Unit 8200.

                                                                                                                                              I wouldn't install it if you paid me to, because it feels a lot like Unit 8200 pumps out entrepreneurs and funds them so that (like the NSA) they have their foot already in the door.

                                                                                                                                              • alpb 18 hours ago

                                                                                                                                                Wiz.io (who almost sold to Google for $25bn) also had founders from IDF Unit 8200. Dozens of other companies like Waze, Palo Alto Networks were also the same.

                                                                                                                                                • sgammon 14 hours ago

                                                                                                                                                  Incredibuild is on this list (at least with regard to current leadership)

                                                                                                                                                  • woodruffw 19 hours ago

                                                                                                                                                    Conspiracies and politics aside, the reasons for the prominence of 8200 are somewhat boring: it's the largest unit in the IDF, in a relatively small country. Teenagers who demonstrate just about any degree of technical savviness get funneled into it for their mandatory service.

                                                                                                                                                    It's the equivalent of observing that SFBA startups tend to have a lot of Stanford grads at the helm.

                                                                                                                                                    (I don't have any particular love for Snyk as a product suite. I think most supply chain security products are severely over-hyped.)

                                                                                                                                                    • manquer 16 hours ago

                                                                                                                                                      Talent or skills is essential but alone is not enough. while the size and quality of the talent pool helps it is not sufficient to explain the success rate, considering that there are similar or better quality talent pools which are larger in many countries around the world, but they don't have the success rates Israeli startups and 8200 ones specifically have compared to their home market and talent pool size.

                                                                                                                                                      It is not some conspiracy either, success as founder has strong network effects and positive feedback loops, right mentorship, access to talent pool, or access to funding and people who can open doors all becomes easier when your network already has some success. Similar reason second time founders have it easier they can tap into their personal version of a network.

                                                                                                                                                      It is not unusual to Israel/8200, the valley itself benefits from this effect heavily after all.

                                                                                                                                                      • woodruffw 7 hours ago

                                                                                                                                                        Right, it's not about talent. It's the fact that it's an extremely strong network with a flywheel between defense spending and startup tech. The same things that make the US's startup industry indefatigable.

                                                                                                                                                        • ignoramous 12 hours ago

                                                                                                                                                          > benefits from this effect

                                                                                                                                                          "Benefits" from whose perspective? For instance, the Brazilians (the State apparatus, specifically) are also benefiting [0], but are their citizens [1]?

                                                                                                                                                          [0] https://www.jstor.org/stable/48595312

                                                                                                                                                          [1] https://idanlandau-com.translate.goog/2016/02/04/technologie...

                                                                                                                                                          • manquer 11 hours ago

                                                                                                                                                            benefits from the perspective of the startup, i.e. chances of its success or growth.

                                                                                                                                                            Who in turn benefits from that in terms wealth, power, influence is whole different topic for which i have no expertise, i was only talking about frequency of successes in startup clusters.

                                                                                                                                                        • ignoramous 13 hours ago

                                                                                                                                                          > Conspiracies

                                                                                                                                                          Not when the dissidents put their name to paper.

                                                                                                                                                            We, veterans of Unit 8200, reserve soldiers both past and present, declare that we refuse to take part in actions against Palestinians and refuse to continue serving as tools in deepening the military control over the Occupied Territories.
                                                                                                                                                          
                                                                                                                                                            It is commonly thought that the service in military intelligence is free of moral dilemmas and solely contributes to the reduction of violence and harm to innocent people. However, our military service has taught us that intelligence is an integral part of Israel's military occupation over the territories.
                                                                                                                                                          
                                                                                                                                                            The Palestinian population under military rule is completely exposed to espionage and surveillance by Israeli intelligence. While there are severe limitations on the surveillance of Israeli citizens, the Palestinians are not afforded this protection.
                                                                                                                                                          
                                                                                                                                                            There's no distinction between Palestinians who are, and are not, involved in violence. Information that is collected and stored harms innocent people. It is used for political persecution and to create divisions within Palestinian society by recruiting collaborators and driving parts of Palestinian society against itself. In many cases, intelligence prevents defendants from receiving a fair trial in military courts, as the evidence against them is not revealed.
                                                                                                                                                          
                                                                                                                                                            Intelligence allows for the continued control over millions of people through thorough and intrusive supervision and invasion of most areas of life. This does not allow for people to lead normal lives, and fuels more violence further distancing us from the end of the conflict.
                                                                                                                                                          
                                                                                                                                                          https://www.theguardian.com/world/2014/sep/12/israeli-intell... (and that's from 2014)
                                                                                                                                                          • woodruffw 9 hours ago

                                                                                                                                                            I don’t think this conflicts with what I’ve said. I’m not claiming Unit 8200 is moral or absolved; I’m saying only that you will run into a lot of 8200 veterans if you interact with any Israeli startup, since it’s a massive unit. Assuming that those people don’t have opinions of their own is likely incorrect, as this letter demonstrates.

                                                                                                                                                      • davedx 16 hours ago

                                                                                                                                                        Lots of false positives IME

                                                                                                                                                        • Sohcahtoa82 3 hours ago

                                                                                                                                                          That wasn't my experience when I used Snyk at my last job, depending on your definition of FP.

                                                                                                                                                          For example, if you're using a multi-protocol networking library, and it says that the version you have installed is has a vulnerability in its SMTP handling, but you don't use the SMTP functionality, is that a FP?

                                                                                                                                                          I'd argue that it's irrelevant, but not a false positive.

                                                                                                                                                          I never had it get the version of a library wrong.

                                                                                                                                                      • kittikitti 8 hours ago

                                                                                                                                                        NPM packages are the most bloated and unreadable pieces of code I've encountered. The creator of Node apparently hates all software and yet Google gave him the captain's hat and we're left with the absolute crap shoot that is web development. I feel guilty with an additional 1KB of code or 500 bytes of RAM but this is seen as an outsider opinion. I hope big tech rots and this is just a symptom. https://news.ycombinator.com/item?id=3055154

                                                                                                                                                        • zelphirkalt 8 hours ago

                                                                                                                                                          NPM packages VS Wordpress plugins ... I think it is a head to head race there.

                                                                                                                                                        • gunnarmorling 15 hours ago

                                                                                                                                                          In the Java world, you need to prove ownership of a given namespace (group id), e.g. via a TXT record for that domain. Isn't there a similar concept for NPM? The package is named sn4k-s3c/call-home, how will a victim be tricked into referencing that namespace sn4k-s3c (which I suppose is owned by the attacker, not Cursor)? I feel like I'm missing part of the picture here.

                                                                                                                                                          • hennell 13 hours ago

                                                                                                                                                            You're not really missing anything so much as adding a misguided assumption of competence to NPM.

                                                                                                                                                            Npm doesn't really do namespaces. There's just no ownership to prove as most packages are published like "call-home" with no namespace required. This gives exciting opportunities for you to register cal-home to trap users who miss type, or caII-home to innocuously add to your own or open source projects or whatever. Fun isn't it?

                                                                                                                                                            In this case the call home package is namespaced, but the real attack is the packages like "cursor-always-local" which has no namespace. Which can sometimes (?) take precedence over a private package with the same name.

                                                                                                                                                            It's not a pretty picture, you were better off missing it really.

                                                                                                                                                            • Vaguely2178 6 hours ago

                                                                                                                                                              > Npm doesn't really do namespaces.

                                                                                                                                                              Yes it really does. npm has namespaces (called scoped packages) and even explicitly encourages their use for private packages to avoid this sort of attack. From the npm docs: "A variant of this attack is when a public package is registered with the same name of a private package that an organization is using. We strongly encourage using scoped packages to ensure that a private package isn’t being substituted with one from the public registry." [1]

                                                                                                                                                              > This gives exciting opportunities for you to register cal-home to trap users who miss type, or caII-home to innocuously add to your own or open source projects or whatever. Fun isn't it?

                                                                                                                                                              npm actively blocks typo-squatting attacks during the publishing process: "Attackers may attempt to trick others into installing a malicious package by registering a package with a similar name to a popular package, in hopes that people will mistype or otherwise confuse the two. npm is able to detect typosquat attacks and block the publishing of these packages." [1]

                                                                                                                                                              This thread is full of people demonstrating the concept of confirmation bias.

                                                                                                                                                              [1] https://docs.npmjs.com/threats-and-mitigations

                                                                                                                                                            • TheRealBrianF 3 hours ago

                                                                                                                                                              You're referring to what I described previously here... ironically back when the first dependency confusion research was published: https://www.sonatype.com/blog/why-namespacing-matters-in-pub...

                                                                                                                                                            • hu3 15 hours ago

                                                                                                                                                              A colleague of mine vendors npm dependencies to diff code between third party lib changes. Those are also covered in pull request reviews.

                                                                                                                                                              Helps in cases like this.

                                                                                                                                                              • absqueued 13 hours ago

                                                                                                                                                                Could you please explain a little more. I can use such practice in my dev workflow.

                                                                                                                                                                • robszumski 5 hours ago

                                                                                                                                                                  this is an area that is top of mind for me right now. you don't have to vendor your deps to get a detailed report of what changed, and bonus, how your app calls into it. just wrote about it: https://edgebit.io/blog/code-diff-reachability/

                                                                                                                                                                  • hu3 13 hours ago

                                                                                                                                                                    Sure. They don't include "node_modules" directory in their .gitignore file.

                                                                                                                                                                    So any third party code changes end up in git commits and are easily visible and reviweable.

                                                                                                                                                                    So running npm update/upgrade includes the code that changed in the dependencies in the commit.

                                                                                                                                                                    • MortyWaves 13 hours ago

                                                                                                                                                                      Surely there has to be better ways of “vendoring” (including hosting your own package repository that doesn’t automatically pull new versions) than adding thousands or maybe tens of thousands of files to the git repo?

                                                                                                                                                                      • compootr 12 hours ago

                                                                                                                                                                        if it's dumb and it works it isn't dumb!

                                                                                                                                                                        another rather simple solution is a git mirror of each package, then point npm to a git url

                                                                                                                                                                        • xdennis 10 hours ago

                                                                                                                                                                          If my podcast memory serves, that's how Isaac (the NPM guy) said it was intended.

                                                                                                                                                                          You would `npm install` and then `git commit`. That's why npm didn't have a lock file back then. Git was the lock file.

                                                                                                                                                                        • VPenkov 12 hours ago

                                                                                                                                                                          This is an option but that makes it easier to conceal malicious code within node_modules as an internal threat actor or make super sure there's a culture of actually reviewing those changes.

                                                                                                                                                                          In cases like that it helps to do npm install on the CI and make sure you end up with identical code. Decent trade-off.

                                                                                                                                                                    • nomilk 20 hours ago

                                                                                                                                                                      > All of these packages have just two files: package.json and index.js (or main.js). This is one of several flags that you can use to determine if a package is legit or not.

                                                                                                                                                                      Wouldn't a lot of small packages consist of just these two files, meaning seeing just these two files in a package may raise an eyebrow but hardly be a smoking gun?

                                                                                                                                                                      • 6mile 15 hours ago

                                                                                                                                                                        It's not a smoking gun. It is just one of a number of signals you look for when identifying potentially malicious packages. Other things you look for are number of collaborators, how long it existed, domains it talks to, and artifacts it pulls in.

                                                                                                                                                                      • supriyo-biswas 19 hours ago

                                                                                                                                                                        Is there a link for the "githax" tool shown in the blog post, which seems to be quite useful? There's [1] but it's just a banner image.

                                                                                                                                                                        [1] https://www.githax.com/

                                                                                                                                                                        • edm0nd 18 hours ago

                                                                                                                                                                          The dev is https://github.com/6mile (same as author of the article)

                                                                                                                                                                          seems to be either a tool that isnt out yet or perhaps not available for free or the public.

                                                                                                                                                                          • 6mile 16 hours ago

                                                                                                                                                                            GitHax is a labour of love right now and is in heavy development. I'm going to create a small beta testing group soon. Hit me up if you want to be in that group. Contact deets are in my GH profile.

                                                                                                                                                                        • bugtodiffer 15 hours ago

                                                                                                                                                                          We have read this exact story before, please learn not to leak too much sensitive data with your PoCs

                                                                                                                                                                          • stuaxo 15 hours ago

                                                                                                                                                                            "It's a good idea not to use npm packages blindly"

                                                                                                                                                                            Yes, but also impractical.

                                                                                                                                                                            • lopkeny12ko 20 hours ago

                                                                                                                                                                              Why, after all these years, are we still doing this stupid thing of using a global namespace for packages? If you are a company with an internal package registry just publish all your packages as @companyname/mylib and then no one can squat the name on a public registry. I thought we collectively learned this 4 years ago when dependency confusion attacks were first disclosed.

                                                                                                                                                                              • 0xbadcafebee 19 hours ago

                                                                                                                                                                                The usual reasons: laziness, ignorance, poor design. Most package managers suck at letting you add 3rd party repos. Most package managers don't have namespaces of any kind. The ones that do have terrible design. Most of them lack a verification system or curation. Most of them have terrible search. None of them seem to have been exposed to hierarchical naming or package inheritance. And a very small number of people understand security in general, many fewer are educated about all the attack classes.

                                                                                                                                                                                But all of that is why they get popular. Lazy, crappy, easy things are more popular than intentional, complex, harder things. Shitty popular tech wins.

                                                                                                                                                                              • jdthedisciple 5 hours ago

                                                                                                                                                                                Seriously: How do we know there aren't dozens or hundreds of comprimsed npm packages installed on every other server out there at this point?

                                                                                                                                                                                Think xz-utils but even much less sophisticated exploits.

                                                                                                                                                                                I don't see any systematic protection against this?

                                                                                                                                                                                • SebFender 10 hours ago

                                                                                                                                                                                  Behind hundreds of builds Snyk has been a challenging integration that ultimately creates very low value. I recommend using a decent team that goes in for flow weaknesses as these are most responsible for significant findings...

                                                                                                                                                                                  • jijji 19 hours ago

                                                                                                                                                                                    npm is rife with this activity, its like wordpress plugins

                                                                                                                                                                                    • mrweasel 16 hours ago

                                                                                                                                                                                      As much as I don't like NPM, these issues aren't limited to NPM. It's just that NPM is getting so much attention that we're more likely to find and hear about these issues when when they target NPM.

                                                                                                                                                                                      I'm fairly concerned about the state of Python packages. It's not every week, but I frequently stumble upon packages that are not what they appear to be. Sometimes not maliciously, sometimes the author just got overly ambitious and failed to deliver, other times, someone is clearly typo-squatting or attempting to get you to install the wrong thing.

                                                                                                                                                                                    • skirge 14 hours ago

                                                                                                                                                                                      "no one can hack us" and then "you can't hack us, how dare you" game, 25 years and more

                                                                                                                                                                                      • cheema33 13 hours ago

                                                                                                                                                                                        > "no one can hack us"

                                                                                                                                                                                        Did Cursor made claims to this effect and invited public to hack them?

                                                                                                                                                                                        Or are you equating someone saying they "take security seriously" to "it's an open season, please attack our systems."?

                                                                                                                                                                                        • skirge 11 hours ago

                                                                                                                                                                                          yes it is, like independent product reviews or crash tests of cars. Anyway Kim Jong Un doesn't care.

                                                                                                                                                                                      • PoppinFreshDo 19 hours ago

                                                                                                                                                                                        I'm sure it's all part of some tiktok prank video.

                                                                                                                                                                                        • bbqfog a day ago

                                                                                                                                                                                          Just a reminder that Snyk was founded by ex-IDF Unit 8200 soldiers. I would not trust them given what we've seen Israel do to supply chains.

                                                                                                                                                                                          https://en.wikipedia.org/wiki/Snyk

                                                                                                                                                                                          • kstrauser a day ago

                                                                                                                                                                                            I don't have a dog in this hunt. I've never worked with Snyk, I've never been a customer, and I don't think I even know anyone who works there. That said, they've built their whole company around being trustworthy and doubt they'd knowingly do anything to risk their entire business. Also, I can hardly imagine someone better positioned to protect against supply chain attacks.

                                                                                                                                                                                            Your criticism sounds to me like "just a reminder that this armed bodyguard service comprises Navy SEALs and Army Rangers". Uh, great!

                                                                                                                                                                                            • xyzzy123 19 hours ago

                                                                                                                                                                                              I'd give good odds it was a mistake by a staff member (or small group) who overstepped and was not part of any formal work.

                                                                                                                                                                                              Most companies where I've worked as a security researcher, you get some time as part of your job to hack on random stuff to be able to generate interesting talks / research. This feels like that.

                                                                                                                                                                                              This isn't a special cyber spooky practice, most pentesting companies do this to generate IP (rarely, lol), buzz (reasonably often) and keep the staff happy (this is really the main thing).

                                                                                                                                                                                              It's rare for management to be fully across the scope of this.

                                                                                                                                                                                              • CuriouslyC 21 hours ago

                                                                                                                                                                                                Maybe if you change that to "armed bodyguard services employ ex KGB assassins"

                                                                                                                                                                                                • nullityrofl 21 hours ago

                                                                                                                                                                                                  I think you've missed the point: it's Americentric to assume that Navy SEALs and Army Rangers are inherently pure, good and have done nothing evil on behalf of the American government when we largely know that to be untrue.

                                                                                                                                                                                                  • kstrauser 20 hours ago

                                                                                                                                                                                                    That wasn't my point at all. The point was that often the best people to protect a resource are the ones who know how to attack it.

                                                                                                                                                                                                • manquer 16 hours ago

                                                                                                                                                                                                  I would say it is on similar to criticism of TikTok or Huwaei and China.

                                                                                                                                                                                                  It has less to do with whether it malicious intent from the start of building an organization for explicit intent of capturing core infra. It has more to do with how the Government of Israel operates and the legal requests they can make of their citizens and/or veterans.

                                                                                                                                                                                                  Perhaps concern over Israeli products should be probably higher than for China as Israel more well known incidents of exploits as a State actor like with Stuxnet, Pegasus or more recently with pagers etc.

                                                                                                                                                                                                  China no doubt has their own share of operations but they either have not used them as publicly in a large scale overt operation or been more discreet about it.

                                                                                                                                                                                                  Point is the concern is valid just as it would be valid for China.

                                                                                                                                                                                                  • kstrauser 8 hours ago

                                                                                                                                                                                                    You mean like how we found out that China attacked and pwn3d the entire US phone system? That’s not a shining example of discretion.

                                                                                                                                                                                                  • bbqfog 19 hours ago

                                                                                                                                                                                                    I have no downside to seeking alternatives. The pager incident ensured that I will always look for non-Israeli tech.

                                                                                                                                                                                                    • kstrauser 18 hours ago

                                                                                                                                                                                                      And what does that have to do with Snyk, other than that some of their employees use to work for IDF?

                                                                                                                                                                                                      I'm a US Navy veteran. Would you also stay away from my employers because they have veterans on staff?

                                                                                                                                                                                                      Seriously, I get what you're trying to say, but I don't understand the broader point you're trying to make. So Snyk has some ex-IDF employees. Find a high-profile infosec firm that doesn't. They military service they were compelled to has a reputation at being really, really good at infosec. I see no reason why companies shouldn't want to hire them afterward.

                                                                                                                                                                                                      • defrost 18 hours ago

                                                                                                                                                                                                        Without wanting to take a position here, the GP comment had a specific narrow point.

                                                                                                                                                                                                        The claim was that Snyk was founded by Unit 8200 members.

                                                                                                                                                                                                        Not that it had a few Israeli veterens, almost all Israeli's serve in the IDF after all.

                                                                                                                                                                                                        https://en.wikipedia.org/wiki/Unit_8200

                                                                                                                                                                                                        To be fair I have a former Unit 8200 member in my larger extended family who left and has since been vocal in opposition to Netanyahu so membership in an elite Cyber Unit alone doesn't define a person.

                                                                                                                                                                                                        That aside, most Governments would keep an eye on a company started by, say, former NSA employees and watch for covert activity under any overt actions.

                                                                                                                                                                                                        • dekelpilli 11 hours ago

                                                                                                                                                                                                          It would correlate strongly that 8200 alumni end up being educated and working in tech, and likely living in Tel Aviv. This is a group of people who, by and large, are not big fans of the current government.

                                                                                                                                                                                                      • dekelpilli 18 hours ago

                                                                                                                                                                                                        Based on the pager incident, I'd think you should avoid companies that don't have a publicly-known link to Israel. It's not like Hezbollah thought they were buying pagers from 8200 alumni.

                                                                                                                                                                                                        • PoppinFreshDo 19 hours ago

                                                                                                                                                                                                          What pager incident?

                                                                                                                                                                                                          • mhitza 18 hours ago
                                                                                                                                                                                                            • PoppinFreshDo 15 hours ago

                                                                                                                                                                                                              Well, if the mossad put "made in israel" on those devices I doubt they would have worked.

                                                                                                                                                                                                            • defrost 19 hours ago

                                                                                                                                                                                                              The recent one in which Israeli techs compromised pager supply chains.

                                                                                                                                                                                                              It was very widely reported across the globe.

                                                                                                                                                                                                        • weatherlite 14 hours ago

                                                                                                                                                                                                          So every Israeli is now a Mossad agent and every customer is an enemy of Israel like Hezbollah? You won't buy from Snyk because you want to boycott Israel, just own up to it it's a popular position to take.

                                                                                                                                                                                                          • bbqfog 9 hours ago

                                                                                                                                                                                                            I’d put Unit 8200 and Mossad in the same basket. I think I made it clear I’m boycotting Israeli products, I’m not hiding that.

                                                                                                                                                                                                          • Cthulhu_ 13 hours ago

                                                                                                                                                                                                            As the pager / radio terrorist attack showed, it's the Mossad involvement you don't know about that you should be worried about. Same with the CIA, they were behind "secure" radio communication in Europe for decades (https://en.wikipedia.org/wiki/Crypto_AG) and nobody had any idea.

                                                                                                                                                                                                            • krembo 15 hours ago

                                                                                                                                                                                                              That's absurd. If that's your claim, do you know how many of your daily tools and hardware you should also drop?

                                                                                                                                                                                                              • bbqfog 9 hours ago

                                                                                                                                                                                                                I’m dropping as many as I can as is my prerogative as a consumer.

                                                                                                                                                                                                                • krembo an hour ago

                                                                                                                                                                                                                  Do you need some help with that? I'll be more than happy if antisemites like you won't be using any of the advanced tech we're working hard to create .

                                                                                                                                                                                                                  • bbqfog 19 minutes ago

                                                                                                                                                                                                                    Sure, where do you work? I’ll be happy to add it to my list!

                                                                                                                                                                                                              • lolinder 19 hours ago

                                                                                                                                                                                                                Just a reminder that Unit 8200 is staffed mostly by conscripts who are serving out their mandatory military service and chose to accept an invitation to serve in the cyberwarfare arm of the IDF instead of choosing to shoot guns.

                                                                                                                                                                                                                In other words, it's staffed by Israeli kids who made the choice most of us would have made under the circumstances. It seems a bit unfair to hold that against them more than 10 years later, no?

                                                                                                                                                                                                                • lmm 16 hours ago

                                                                                                                                                                                                                  > In other words, it's staffed by Israeli kids who made the choice most of us would have made under the circumstances. It seems a bit unfair to hold that against them more than 10 years later, no?

                                                                                                                                                                                                                  You could say the same about the guy in a call center in India trying to pull a tech support scam on you over the phone. Yes, he's probably making the best choice he can for his own livelihood, probably the same thing you would do in his position. No, that doesn't mean you should trust him.

                                                                                                                                                                                                                  Just as you have to treat all Chinese companies as under control of the PRC government and all Australian companies as compromised by their security services, you have to treat all Israeli citizens as under the control of the Israeli military. Any adult can be conscripted and they have a history of disguising military operations as civilian ones. Someone might tell you they left the Israeli military 10 years ago and they're probably telling the truth, but if you make a habit of believing that statement you're going to get burned.

                                                                                                                                                                                                                  • lolinder 9 hours ago

                                                                                                                                                                                                                    > You could say the same about the guy in a call center in India trying to pull a tech support scam on you over the phone. Yes, he's probably making the best choice he can for his own livelihood, probably the same thing you would do in his position. No, that doesn't mean you should trust him.

                                                                                                                                                                                                                    No, you can't, because the scammer in the call center is choosing that over thousands of other options. Are they choosing to maximize their pay? Maybe. But for every scammer there are thousands of Indians who show a different option.

                                                                                                                                                                                                                    Choosing to dodge or resist the draft is totally different—very few people do it, and those who do get prison terms. If you sincerely believe that you'd have chosen to go to prison rather than be drafted, more power to you, but I and most others would aim to minimize the likelihood of ourselves dying and minimize the number of people I'd have to kill. For me that would have meant signing up for cyberwarfare, which in Israel would have meant Unit 8200.

                                                                                                                                                                                                                    The rest of your comment is totally irrational fear-based speculation. Anti-Israel sentiment may not be antisemitic, but it sure shares the same tendency towards irrational fear and aggression.

                                                                                                                                                                                                                    • lmm 9 hours ago

                                                                                                                                                                                                                      > the scammer in the call center is choosing that over thousands of other options.

                                                                                                                                                                                                                      No, they're the people who don't have other options (because they lack the skills and/or qualifications and/or are discriminated against). It's not malice, it's just desperation to get money to live on (or, often, to provide for people who depend on them). But of course the end result is the same.

                                                                                                                                                                                                                      > The rest of your comment is totally irrational fear-based speculation.

                                                                                                                                                                                                                      Entirely rational given the historical pattern of behaviour shown by the Israeli military, and the fact that they have no reason to change (quite the opposite).

                                                                                                                                                                                                                    • weatherlite 9 hours ago

                                                                                                                                                                                                                      > Just as you have to treat all Chinese companies as under control of the PRC government and all Australian companies as compromised by their security services, you have to treat all Israeli citizens as under the control of the Israeli military

                                                                                                                                                                                                                      Got it , and are now all American companies suspect because they are managed behind the scenes by Musk and Trump?

                                                                                                                                                                                                                      • lmm 9 hours ago

                                                                                                                                                                                                                        All American companies are suspect given the National Security Letter system yes. (Also South Korea and Kazakhstan, and obviously also any country where the "rule of law" is low enough that governments can do as they wish without formal legal powers)

                                                                                                                                                                                                                        • bbqfog 9 hours ago

                                                                                                                                                                                                                          I feel the same way about companies with CIA founders.

                                                                                                                                                                                                                      • bbqfog 9 hours ago

                                                                                                                                                                                                                        I would under no circumstance join the IDF or even live in Israel. They’re not “kids”, they are military personnel.

                                                                                                                                                                                                                        • arccy 9 hours ago

                                                                                                                                                                                                                          key word: "conscript"

                                                                                                                                                                                                                          if you're born there, you have little choice in the matter.

                                                                                                                                                                                                                          • bbqfog 8 hours ago

                                                                                                                                                                                                                            I've never met an Israeli who wasn't a dual citizen. It's a choice to stay in Israel and fight in the IDF. In fact, the Snyk founder lives in London now: https://uk.linkedin.com/in/guypo

                                                                                                                                                                                                                            • lolinder 5 hours ago

                                                                                                                                                                                                                              > I've never met an Israeli who wasn't a dual citizen.

                                                                                                                                                                                                                              Given that unless you are in Israel you're most likely to be meeting Israeli expats or at the very least people who travel, that's hardly surprising and not great evidence for anything.

                                                                                                                                                                                                                              > In fact, the Snyk founder lives in London now

                                                                                                                                                                                                                              So you're acknowledging that you're going to hold their country of origin against them even after they've moved. Got it.

                                                                                                                                                                                                                              • bbqfog 5 hours ago

                                                                                                                                                                                                                                I don’t understand your complaint. People are free to vocally denounce Zionism. These founders have not done that. Quite the opposite, Snyk has offices in Israel and has been vocal about their ties to the IDF. It’s absolutely within my agency to not use their products. Again, there’s zero downside to do that.

                                                                                                                                                                                                                                • lolinder 5 hours ago

                                                                                                                                                                                                                                  Correct, you're welcome to do that, and I'm welcome to denounce you for advocating boycotting a product because of the country of origin of its founders.

                                                                                                                                                                                                                                  People can't help where they're born, and you're wrong to hold that against them. You're welcome to work through that cognitive dissonance however you like, but in the meantime I will continue to advocate for treating individuals as individuals.

                                                                                                                                                                                                                                  • bbqfog 5 hours ago

                                                                                                                                                                                                                                    No one is entitled to my business. I have no cognitive dissonance, my business interests are aligned with my moral interests in this case. I don’t use Israeli tech whenever possible.

                                                                                                                                                                                                                                    You “denouncing” people who make a rational calculation isn’t really helping to market the firms you are supporting.

                                                                                                                                                                                                                                    • lolinder 4 hours ago

                                                                                                                                                                                                                                      I'm not supporting firms, I'm supporting the right of individuals to be seen as individuals rather than as members of a group assigned to them at birth.

                                                                                                                                                                                                                                      That said, this obviously isn't going anywhere, so have a nice day.

                                                                                                                                                                                                                      • yard2010 18 hours ago

                                                                                                                                                                                                                        Don't hate the player hate the game ;)

                                                                                                                                                                                                                      • sneak 18 hours ago

                                                                                                                                                                                                                        Side note: Snyk (founded 2015, computer and network security) has nothing to do with @sneak (hacking since 1998, computer and network security).

                                                                                                                                                                                                                        I was dismayed to learn about their choice of brand, and think it might cause confusion. :(

                                                                                                                                                                                                                        • vips7L 17 hours ago

                                                                                                                                                                                                                          I don’t even read those the same. To me snyk is read as snick and not sneak.

                                                                                                                                                                                                                          • rdegges 3 hours ago

                                                                                                                                                                                                                            The name 'snyk' is an acronym, it stands for 'so now you know' (about security vulnerabilities) =D

                                                                                                                                                                                                                          • xyst 20 hours ago

                                                                                                                                                                                                                            You either die as a white hat or live long enough to see yourself become a black hat.

                                                                                                                                                                                                                            • nathabonfim59 21 hours ago

                                                                                                                                                                                                                              Things like this could _synk_ their reputation...

                                                                                                                                                                                                                              • guappa 15 hours ago

                                                                                                                                                                                                                                They're terrible already. If you invest enough in marketing nothing matters.

                                                                                                                                                                                                                              • dalton_zk 20 hours ago

                                                                                                                                                                                                                                Literally a test in production. The dev commit their work go to home thinking "not will happen"

                                                                                                                                                                                                                                • Sophira 18 hours ago

                                                                                                                                                                                                                                  If it was really a test, then why would it be sending environment variables via HTTP POST? There are many better ways to do this if you're legitimately deploying code remotely.