| ▲ | sph 7 hours ago |
| It's not "node" or "Javascript" the problem, it's this convenient packaging model. This is gonna ruffle some feathers, but it's only a matter of time until it'll happen on the Rust ecosystem which loves to depend on a billion subpackages, and it won't be fault of the language itself. The more I think about it, the more I believe that C, C++ or Odin's decision not to have a convenient package manager that fosters a cambrian explosion of dependencies to be a very good idea security-wise. Ambivalent about Go: they have a semblance of packaging system, but nothing so reckless like allowing third-party tarballs uploaded in the cloud to effectively run code on the dev's machine. |
|
| ▲ | TheFlyingFish 7 hours ago | parent | next [-] |
| I've worried about this for a while with Rust packages. The total size of a "big" Rust project's dependency graph is pretty similar to a lot of JS projects. E.g. Tauri, last I checked, introduces about 600 dependencies just on its own. Like another commenter said, I do think it's partially just because dependency management is so easy in Rust compared to e.g. C or C++, but I also suspect that it has to do with the size of the standard library. Rust and JS are both famous for having minimal standard libraries, and what do you know, they tend to have crazy-deep dependency graphs. On the other hand, Python is famous for being "batteries included", and if you look at Python project dependency graphs, they're much less crazy than JS or Rust. E.g. even a higher-level framework like FastAPI, that itself depends on lower-level frameworks, has only a dozen or so dependencies. A Python app that I maintain for work, which has over 20 top-level dependencies, only expands to ~100 once those 20 are fully resolved. I really think a lot of it comes down to the standard library backstopping the most common things that everybody needs. So maybe it would improve the situation to just expand the standard library a bit? Maybe this would be hiding the problem more than solving it, since all that code would still have to be maintained and would still be vulnerable to getting pwned, but other languages manage somehow. |
| |
| ▲ | QuiEgo 3 hours ago | parent | next [-] | | It's already happening: https://cyberpress.org/malicious-rust-packages/ My personal experience (YMMV): Rust code takes 2x or 3x longer to write than what came before it (C in my case), but in the end you usually get something much more likely to work, so overall it's kind of a wash, and the product you get is better for customers - you basically front load the cost of development. This is terrible for people working in commercial projects that are obsessed with time to market. Rust developers on commercial projects are under incredible schedule pressure from day 0, where they are compared to expectations from their previous projects, and are strongly motivated to pull in anything and everything they can to save time, because re-rolling anything themselves is so damn expensive. | | |
| ▲ | windward 2 hours ago | parent [-] | | In my experience Rust development is no slower than C development (in a different environment) or C++ development (in a comparable project) | | |
| ▲ | ghurtado 39 minutes ago | parent [-] | | I think they were using "writing Rust" in the most strict sense: the part of the development cycle that involves typing the majority of the code, before you really start debugging in earnest and really make things work. But their point is that "developing Rust" (as in, the entire process) ends up being a similar total effort to C, only with more up front "writing" and less work on the debugging phase. |
|
| |
| ▲ | wongarsu 7 hours ago | parent | prev | next [-] | | I wouldn't call the Rust stdlib "small". "Limited" I could agree with. On the topics it does cover, Rust's stdlib offers a lot. At least on the same level as Python, at times surpassing it. But because the stdlib isn't versioned it stays away from everything that isn't considered "settled", especially in matters where the best interface isn't clear yet. So no http library, no date handling, no helpers for writing macros, etc. You can absolutely write pretty substantial zero-dependency rust if you stay away from the network and async Whether that's a good tradeoff is an open question. None of the options look really great | | |
| ▲ | WD-42 3 hours ago | parent | next [-] | | Rand, uuid, and no built in logging implementation are three examples that require crates but probably shouldn’t. | | | |
| ▲ | SAI_Peregrinus 3 hours ago | parent | prev | next [-] | | > But because the stdlib isn't versioned I honestly feel like that's one of Rust's biggest failings. In my ideal world libstd would be versioned, and done in such a way that different dependencies could call different versions of libstd, and all (sound/secure) versions would always be provided. E.g. reserve the "std" module prefix (and "core", and "alloc"), have `cargo new` default to adding the current std version in `cargo.toml`, have the prelude import that current std version, and make the module name explicitly versioned a la `std1::fs::File`, `std2::fs::File`. Then you'd be able to type `use std1::fs::File` like normal, but if you wanted a different version you could explicitly qualify it or add a different `use` statement. And older libraries would be using older versions, so no conflicts. | | |
| ▲ | Zettroke 2 hours ago | parent [-] | | I'm afraid it won't work. The point of std lib is to be universal connection for all the libraries. But with versioned std I just can't see how can you have DateTime in std1, DateTime in std2 and use them interchangeably, for example being able to pass std2::DateTime to library depending on std1 etc. Maybe conversion methods, but it get really complicated really quickly |
| |
| ▲ | galangalalgol 5 hours ago | parent | prev | next [-] | | Network without async works fine in std. However, rand, serde, and num_traits always seem to be present. Not sure why clap isn't std at this point. | | |
| ▲ | wongarsu 5 hours ago | parent | next [-] | | Clap went through some major redesigns with the 4.0 release just three years ago. That wouldn't have been possible if clap 2.0 or 3.0 had been added to the stdlib. It's almost a poster child for things where libraries where being outside the stdlib allows interface improvements (date/time handling would be the other obvious example). Rand has the issue of platform support for securely seeding a secure rng, and having just an unsecure rng might cause people to use it when they really shouldn't. And serde is near-universal but has some very vocal opponents because it's such a heavy library. I have however often wished that num_traits would be in the stdlib, it really feels like something that belongs in there. | | | |
| ▲ | TheDong 4 hours ago | parent | prev | next [-] | | > Not sure why clap isn't std at this point. The std has stability promises, so it's prudent to not add things prematurely. Go has the official "flag" package as part of the stdlib, and it's so absolutely terrible that everyone uses pflag, cobra, or urfave/cli instead. Go's stdlib is a wonderful example of why you shouldn't add things willy-nilly to the stdlib since it's full of weird warts and things you simply shouldn't use. | | |
| ▲ | geodel 2 hours ago | parent | next [-] | | > and it's so absolutely terrible that everyone uses pflag, ../ This is just social media speak for inconvenient in some cases. I have used flag package in lot of applications. It gets job done and I have had no problem with it. > since it's full of weird warts and things you simply shouldn't use. The only software that does not have problem is thats not written yet. This is the standard one should follow then. | |
| ▲ | poly2it 2 hours ago | parent | prev [-] | | Go is also famous for encouraging a culture of keeping down dependency count while exposing a simple to use package manager and ecosystem. | | |
| |
| ▲ | Ygg2 5 hours ago | parent | prev [-] | | > why clap isn't std at this point. Too big for many cases, there is also a lot of discussion around whether to use clap, or something smaller. | | |
| ▲ | 0cf8612b2e1e 17 minutes ago | parent [-] | | Clap is enormous and seems way too clever for everything I do. Last I looked it added 10+ seconds to compile time and hundreds of kbs to binary size. Maybe something like ffmpeg requires that complexity, but if I am writing a CLI that takes three arguments, it is a heavy cost. |
|
| |
| ▲ | ghurtado 37 minutes ago | parent | prev | next [-] | | > if you stay away from the network and async That's some "small print" right there. | |
| ▲ | atherton94027 2 hours ago | parent | prev | next [-] | | > On the topics it does cover, Rust's stdlib offers a lot. At least on the same level as Python, at times surpassing it. Curious, do you have specific examples of that? | |
| ▲ | 6 hours ago | parent | prev [-] | | [deleted] |
| |
| ▲ | kibwen 6 hours ago | parent | prev | next [-] | | > Rust and JS are both famous for having minimal standard libraries I'm all in favor of embiggening the Rust stdlib, but Rust and JS aren't remotely in the same ballpark when it comes to stdlib size. Rust's stdlib is decidedly not minimal; it's narrow, but very deep for what it provides. | |
| ▲ | mx7zysuj4xew 2 hours ago | parent | prev | next [-] | | It won't, it's a culture issue Most rust programmers are mediocre at best and really need the memory safety training wheels that rust provides. Years of nodejs mindrot has somehow made pulling into random dependencies irregular release schedules to become the norm for these people. They'll just shrug it off come up with some "security initiative* and continue the madness | |
| ▲ | skydhash 6 hours ago | parent | prev | next [-] | | C standard library is also very small. The issue is not the standard library. The issue is adding libraries for snippets of code, and in the name of convenience, let those libraries run code on the dev machine. | | |
| ▲ | api 6 hours ago | parent [-] | | The issue is that our machines run 1970s OSes with a very basic security model, and are themselves so complex that they’re likely loaded with local privilege escalation attack vectors. Doing dev in a VM can help, but isn’t totally foolproof. | | |
| ▲ | skydhash 5 hours ago | parent [-] | | It’s a good security model because everyone has the decency to follow a pull model. Like “hey, I have this thing, you can get it if you’re interested”. You decide the amount of trust you give to someone. But NPM is more like “you’ve added me to your contact list, then it’s totally fine for me to enter your bedroom at night and wear your lingerie because we’re already BFF”. It’s “I’m doing whatever I want on your computer because I know best and you’re dumb” mentality that is very prevalent. It’s like how zed (the editor) wants to install node.js and whatever just because they want to enable LSP. The sensible approach would have been to have a default config that relies on $PATH to find the language server. | | |
| ▲ | ghurtado 36 minutes ago | parent [-] | | > “you’ve added me to your contact list, then it’s totally fine for me to enter your bedroom at night and wear your lingerie because we’re already BFF” I don't know if everyone will appreciate this, but I am in stitches right now... lol |
|
|
| |
| ▲ | metaltyphoon 5 hours ago | parent | prev | next [-] | | This is a reason why so many enterprises use C#. Most of the time you just use Microsoft made libraries and rarely brings in 3rd party. | | |
| ▲ | latentsea 4 hours ago | parent | next [-] | | Having worked on four different enterprise grade C# codebases, they most certainly have plenty of 3rd party dependencies. It would absolutely be the exception to not have 3rd party dependencies. | | |
| ▲ | HighGoldstein 2 hours ago | parent [-] | | Yes, but the 3rd party dependencies tend to be conveniences rather than foundational. Easier mapping, easier mocking, easier test assertions, so a more security minded company can very easily just disallow their use without major impact. If it's something foundational to your project then what you're doing is probably somewhat niche. Most of the time there's some dependency from Microsoft that's rarely worse enough to justify using the 3rd party one. |
| |
| ▲ | pasc1878 5 hours ago | parent | prev [-] | | Or purchase third party libraries.
This does two things - limits what you drag in and also if you drag it in you can sue someone for errors. | | |
| ▲ | skeeter2020 4 hours ago | parent [-] | | This definitely not why enterprise "chooses" C# and neither of these were design decisions like implied. MS would have loved to have the explosive, viral ecosystem of Node earlier in .NET's life. Regardless a lot of companies using C# still use node-based solutions on the web so a insular development environment for one tier doesn't protect them. | | |
| ▲ | exceptione 3 hours ago | parent | next [-] | | I am not so sure about that. .net core is the moment they opened up, making it cross platform, going against the grain of owning it as a platform. If they see a gap in .net, which is filled in by a third party, they would have no problem qualms about implementing their own solution in .net that meets their quality requirements. And to be fair, .net delivers on that.
This might anger some, but the philosophy is that it should be a batteries included one-stop shop, maybe driven by the culture of quite some ms shops that wouldn't eat anything unless ms feeds it them. This has a consequence that the third-party ecosystem is a lot smaller, but I doubt MS regrets that.
If you compare that to F#, things are quite different wrt filling in the gaps, as MS does not focus on F#. A lot of good stuff for F# comes from the community. | |
| ▲ | jjkaczor 3 hours ago | parent | prev [-] | | They actually had a pretty active community on CodePlex - I used and contributed to many projects there... they killed that in ... checks the web... 2017, replaced with GitHub, and it just isn't the same... |
|
|
| |
| ▲ | gorgoiler 5 hours ago | parent | prev | next [-] | | And yet of course the world and their spouse import requests to fetch a URL and view the body of the response. It would be lovely if Python shipped with even more things built in. I’d like cryptography, tabulate/rich, and some more featureful datetime bells and whistles a la arrow. And of course the reason why requests is so popular is that it does actually have a few more things and ergonomic improvements over the builtin HTTP machinery. Something like a Debian Project model would have been cool: third party projects get adopted into the main software product by a sworn-in project member who who acts as quality control / a release manager. Each piece of software stays up to date but also doesn’t just get its main branch upstreamed directly onto everyone’s laps without a second pair of eyes going over what changed. The downside is it slows everything down, but that’s a side-effect of, or rather a synonym for stability, which is the problem we have with npm. (This looks sort of like what HelixGuard do, in the original article, though I’ve not heard of them before today.) | | |
| ▲ | TheFlyingFish 4 hours ago | parent [-] | | Requests is a great example of my point, actually. Creating a brand-new Python venv and running `uv add requests` tells me that a total of 5 packages were added. By contrast, creating a new Rust project and running `cargo add reqwest` (which is morally equivalent to Python's `requests`) results in adding 160 packages, literally 30x as many. I don't think languages should try to include _everything_ in their stdlib, and indeed trying to do so tends to result in a lot of legacy cruft clogging up the stdlib. But I think there's a sweet spot between having a _very narrow_ stdlib and having to depend on 160 different 3rd-party packages just to make a HTTP request, and having a stdlib with 10 different ways of doing everything because it took a bunch of tries to get it right. (cf. PHP and hacks like `mysql_real_escape_string`, for example.) Maybe Python also has a historical advantage here. Since the Internet was still pretty nascent when Python got its start, it wasn't the default solution any time you needed a bit of code to solve a well-known problem (I imagine, at least; I was barely alive at that point). So Python could afford to wait and see what would actually make good additions to the stdlib before implementing them. Compare to Rust which _immediately_ had to run gauntles like "what to do about async", with thousands of people clamoring for a solution _right now_ because they wanted to do async Rust. I can definitely sympathize with Rust's leadership wanted to do the absolute minimum required for async support while they waited for the paradigm to stabilize. And even so, they still get a lot of flak for the design being rushed, e.g. with `Pin`. So it's obviously a difficult balance to strike, and maybe the solution isn't as simple as "do more in the stdlib". But I'd be curious to see it tried, at least. | | |
| ▲ | Chris_Newton 3 hours ago | parent | next [-] | | IMHO, the ideal for package management in a programming language ecosystem might recognise multiple levels of “standardisation”. At the top, you have the true standard library for the language. This has very strong stability guarantees. Its purpose is twofold: to provide universal implementations of essentials and to define standard/baseline interfaces for common needs like abstract data types, relational databases, networking and filesystems to encourage compatibility and portability. Next, you have a tier of recognised but not yet fully standardised libraries. These might be contributed by third parties, but they have requirements for identifying maintainers, appropriate licensing and mandatory peer review of all contributions. They have a clear versioning policy and can make breaking changes in new major releases, but they also provide some stability guarantees along the lines of semver and older releases are normally available indefinitely. The purpose of this tier is to provide a wider range of functionality and/or alternative implementations, but in a relatively stable way and implementing standard interfaces where applicable to improve portability. Finally, you have the free-for-all, anyone-can-contribute tier. This should still have a sane security model where people can’t just upload malware scripts that run automatically just because someone installed a package. However, it comes with few guarantees about stability or compatibility, except that releases of published packages will be available indefinitely unless there’s a very good reason to pull them where you obviously wouldn’t want to use one anyway. A package you like might be written by a single contributor who no longer maintains it, but if someone does write something useful that simply doesn’t need any further maintenance once it’s finished and does its job, there is still a place to share it. | | |
| ▲ | x0x0 an hour ago | parent [-] | | Or maybe just get comfortable with adding versions and deprecation. eg optparse to argparse (though tbf, I would have just preferred it was optparse2). Or maybe the problem is excessive stability commitments. I think I prefer languages that realize things can improve and are willing to say if you want to run 10 year old code, use a 10 year old compiler/runtime. |
| |
| ▲ | ghurtado 33 minutes ago | parent | prev | next [-] | | > (cf. PHP and hacks like `mysql_real_escape_string`, for example.) PHP is a fantastic resource to learn how to do proper backward compatibility and package management. By doing the exact opposite of whatever PHP does, mostly. | |
| ▲ | afdbcreid 3 hours ago | parent | prev [-] | | That's not an apple-to-apple comparison, since Rust is a low-level language, and also because `reqwest` builds on top of `tokio`, an async runtime, and `hyper`, which is also a HTTP server, not just a HTTP client. If you check `ureq`, a synchronous HTTP client, it only adds 43 packages. Still more, but much less. | | |
| ▲ | auxiliarymoose 2 hours ago | parent [-] | | And in Go I can build a production-ready HTTPS (not just HTTP) server with just the standard library and a few lines of code. (0 packages). That Rust does not have standard implementations of commonly-used features (such as an async runtime) is problematic for supply chain security, since then everyone is pulling in dozens (or hundreds) of fragmented 3rd-party packages instead of working with a bulletproof standard library. | | |
|
|
| |
| ▲ | moomin 4 hours ago | parent | prev [-] | | It might solve the problem, in as much as the problem is that not only can it be done, but it’s profitable to do so. This is why there’s no Rust problem (yet). |
|
|
| ▲ | parliament32 4 minutes ago | parent | prev | next [-] |
| Agreed, rust's cargo model is basically the worst part of that ecosystem right now. I've had developers submit pretty simple cli tools with hundreds and hundreds of dependencies. I guess there wasn't any lessons learned from the state of NPM. |
|
| ▲ | larusso 7 hours ago | parent | prev | next [-] |
| I agree partly. I love cargo and can’t understand why certain things like package namespaces and proof of ownership isn’t added at a minimum. I was mega annoyed when I had to move all our Java packages from jcenter, which was a mega easy setup and forget affair, to maven central. There I suddenly needed to register a group name (namespace mostly reverse domain) and proof that with a DNS entry. Then all packages have to be signed etc. In the end it was for this time way ahead. I know that these measures won’t help for all cases. But the fact that at least on npm it was possible that someone else grabs a package ID after an author pulled its packages is kind of alarming. Dependency confusion attacks are still possible on cargo because the whole - vs _ as delimiter wasn’t settled in the beginning.
But I don’t want to go away from package managers or easy to use/sharable packages either. |
| |
| ▲ | kibwen 7 hours ago | parent [-] | | > But the fact that at least on npm it was possible that someone else grabs a package ID after an author pulled its packages is kind of alarming. Since your comment starts with commentary on crates.io, I'll note that this has never been possible crates.io. > Dependency confusion attacks are still possible on cargo because the whole - vs _ as delimiter wasn’t settled in the beginning. I don't think this has ever been true. AFAIK crates.io has always prevented registering two different crates whose names differ only in the use of dashes vs underscores. > package namespaces See https://github.com/rust-lang/rust/issues/122349 > proof of ownership See https://github.com/rust-lang/rfcs/pull/3724 and https://blog.rust-lang.org/2025/07/11/crates-io-development-... | | |
| ▲ | larusso 3 hours ago | parent | next [-] | | You are right. I remembered it wrong. https://rust-lang.github.io/rfcs/0940-hyphens-considered-har... Was from 2015 and the other discussions I remember were around default style and that cargo already blocks a crate when normalized name is equal. | |
| ▲ | larusso 3 hours ago | parent | prev [-] | | The trusted publishing is rather new or? Awesome to see that they implemented it. Just saying that maven central required it already years ago. | | |
| ▲ | di 3 hours ago | parent [-] | | Maven Central does not currently support OIDC-based authentication (commonly called "Trusted Publishing"). | | |
| ▲ | larusso an hour ago | parent [-] | | Didn’t know this term. After reading I wonder why short lived tokens get this monocle. But yeah I prefer OIDC over token based access as well. Only small downside I see is the setup needed for a custom OIDC provider. Don’t know the right terms out of my head but we had quite the fun to register our internal Jenkins to become a create valid oidc tokens for AWS. GitHub and GitHub Actions come with batteries included. I mean the downside that a huge vendor can easily provide this and a custom rolled CI needs extra steps / infrastructure. |
|
|
|
|
|
| ▲ | gnfargbl 7 hours ago | parent | prev | next [-] |
| I'm a huge Go proponent but I don't know if I can see much about Go's module system which would really prevent supply-chain attacks in practice. The Go maintainers point [1] at the strong dependency pinning approach, the sumdb system and the module proxy as mitigations, and yes, those are good. However, I can't see what those features do to defend against an attack vector that we have certainly seen elsewhere: project gets compromised, releases a malicious version, and then everyone picks it up when they next run `go get -u ./...` without doing any further checking. Which I would say is the workflow for a good chunk of actual users. The lack of package install hooks does feel somewhat effective, but what's really to stop an attacker putting their malicious code in `func init() {}`? Compromising a popular and important project in this way would likely be noticed pretty quickly. But compromising something widely-used but boring? I feel like attackers would get away with that for a period of time that could be weeks. This isn't really a criticism of Go so much as an observation that depending on random strangers for code (and code updates) is fundamentally risky. Anyone got any good strategies for enforcing dependency cooldown? [1] https://go.dev/blog/supply-chain |
| |
| ▲ | devttyeu 5 hours ago | parent | next [-] | | In Go you know exactly what code you’re building thanks to gosum, and it’s much easier to audit changed code after upgrading - just create vendor dirs before and after updating packages and diff them; send to AI for basic screening if the diff is >100k loc and/or review manually. My projects are massive codebases with 1000s of deps and >200MB stripped binaries of literally just code, and this is perfectly feasible. (And yes I do catch stuff occasionally, tho nothing actively adversarial so far) I don’t believe I can do the same with Rust. | | | |
| ▲ | MatthiasDev 2 hours ago | parent | prev | next [-] | | A big thing is that Go does not install the latest version of transitive dependencies. Instead it uses Minimal version selection (MVS), see https://go.dev/ref/mod#minimal-version-selection. I highly recommend reading the article by Russ Cox mentioned in the ref. This greatly decreases your chances of being hit by malware released after a package is taken over. In Go, access to the os and exec require certain imports, imports that must occur at the beginning of the file, this helps when scanning for malicious code. Compare this JavaScript where one could require("child_process") or import() at any time. Personally, I started to vendor my dependencies using go mod vendor and diff after dependency updates. In the end, you are responsible for the effect of your dependencies. | |
| ▲ | PunchyHamster 4 hours ago | parent | prev | next [-] | | > However, I can't see what those features do to defend against an attack vector that we have certainly seen elsewhere: project gets compromised, releases a malicious version, and then everyone picks it up when they next run `go get -u ./...` without doing any further checking. Which I would say is the workflow for a good chunk of actual users. You can't, really, aside from full on code audits. By definition, if you trust a maintainer and they get compromised, you get compromised too. Requiring GPG signing of releases (even by just git commit signing) would help but that's more work for people to distribute their stuff, and inevitably someone will make insecure but convenient way to automate that away from the developer | |
| ▲ | asmor 6 hours ago | parent | prev [-] | | The Go standard library is a lot more comprehensive and usable than Node, so you need less dependencies to begin with. |
|
|
| ▲ | SkiFire13 22 minutes ago | parent | prev | next [-] |
| Not having a convenient package manager doesn't mean you don't need the functionality that's otherwise offered by third-party packages, it just means that you either need other means to obtain those third-party packages (usually reducing the visibility this dependency!) or implement them yourself (sometimes this is good, but sometimes this can also be very bad for security. Your DYI code won't get as many eyes and audits as the popular third party package!). Must read: https://wiki.alopex.li/LetsBeRealAboutDependencies |
|
| ▲ | chuckadams 4 hours ago | parent | prev | next [-] |
| > It's not "node" or "Javascript" the problem, it's this convenient packaging model. That and the package runtime runs with all the same privileges and capabilities as the thing you're building, which is pretty insane when you think about it. Why should npm know anything outside of the project root even exists, or be given the full set of environment variables without so much as a deny list, let alone an allow list? Of course if such restrictions are available, why limit them to npm? The real problem is that the security model hasn't moved substantially since 1970. We already have all the tools to make things better, but they're still unportable and cumbersome to use, so hardly anything does. |
| |
| ▲ | pas 3 hours ago | parent [-] | | pnpm (maybe yarn too?) requires explicit allowlisting of build scripts, hopefully npm will do the same eventually > security model yep, some kind of seccomp or other kind of permission system for modules would help a lot. (eg. if the 3rd party library is parsing something and its API only requires a Buffer as input and returns some object then it could be marked "pure", if it supports logging then that could be also specified, and so on) | | |
| ▲ | chuckadams 2 hours ago | parent | next [-] | | For all the other things I like about yarn, it still executes build scripts willy-nilly, so I am looking at switching to pnpm. I'm sure my $work is going to love me changing up the build toolchain again... PHP's composer on the other hand requires an allowlist in the project's composer.json. I never would have thought PHP would be the one to be getting stuff like this right. Still, I think the "allow-scripts" section or whatever it's called should be named "allow-unrestricted-access-to-everything". Or maybe just stick "dangerously-" in front, I dunno, and drop it when the mechanism is capable of fine-grained privileges. | |
| ▲ | WorldMaker an hour ago | parent | prev [-] | | Deno also requires allowlisting npm scripts. It also has a deeper permissions model in general. |
|
|
|
| ▲ | dotancohen 7 hours ago | parent | prev | next [-] |
| Historically, arguments of "it's popular so that's why it's attacked" have not held up. Notable among them was addressing Windows desktop security vulnerabilities. As Linux and Mac machines became more popular, not to mention Android, the security vulnerabilities in those burgeoning platforms never manifested to the extent that they were in Windows. Nor does cargo or pip seem to be infected with these problems to the extent that npm is. |
| |
| ▲ | whizzter 4 hours ago | parent | next [-] | | Compared to the JS ecosystem and number of users both Python and Rust are puny, also the the NPM ecosystem also allowed by default for a lot of post-install actions since they wanted to enable a smooth experience with compiling and installing native modules (Not entirely sure how Cargo and PIP handles native library dependencies). As for Windows vs the other OS's, yes even the Windows NT family grew out of DOS and Win9x and tried to maintain compatiblity for users over security up until it became untenable. So yes, the base _was_ bad when Windows was dominant but it's far less bad today (why people target high value targets via NPM,etc since it's an easier entry-point). Android/iOS is young enough that they did have plenty of hindsight when it comes to security and could make better decisions (Remember that MS tried to move to UWP/Appx distribution but the ecosystem was too reliant on newer features for it to displace the regular ecosystem). Remember that we've had plenty of annoyed discourse about "Apple locking down computers" here and on other tech forums when they've pushed notarization. I guess my point is that, people love to bash on MS but at the same time complain about how security is affecting their "freedoms" when it comes to other systems (and partly MS), MS is better at the basics today than they were 20-25 years ago and we should be happy about that. | | |
| ▲ | dotancohen 3 hours ago | parent | next [-] | | This comment seems to address users intentionally installing malware. I mean to address cracking, the situation where an attacker gains root or installs software that the user does not know about. Preventing the user from installing something that they want to install is another issue completely. I'm hesitant to call it exactly security, though I agree that it falls under the auspices of security. | |
| ▲ | skydhash 4 hours ago | parent | prev [-] | | You can have security without having a walled garden. By trusting the user with the key of their own property. |
| |
| ▲ | mschuster91 7 hours ago | parent | prev [-] | | > Nor does cargo or pip seem to be infected with these problems to the extent that npm is. Easy reason. The target for malware injections is almost always cryptocurrency wallets and cloud credentials (again, mostly to mine cryptocurrencies). And the utter utter majority of stuff interacting with crypto and cloud, combined with a lot of inexperienced juniors who likely won't have the skill to spot they got compromised, is written in NodeJS. |
|
|
| ▲ | dwroberts 6 hours ago | parent | prev | next [-] |
| I think this is right about Rust and Cargo, but I would say that Rust has a major advantage in that it implements frozen + offline mode really well (which if you use, obviously significantly decreases the risks). Any time I ever did the equivalent with NPM/node world it was basically unusable or completely impractical |
| |
|
| ▲ | JD557 5 hours ago | parent | prev | next [-] |
| I have a similar opinion but I think Java's model with maven and friends hits the sweet spot: - Packages are always namespaced, so typosquating is harder
- Registries like Sonatype require you to validate your domain
- Versions are usually locked by default My professional life has been tied to JVM languages, though, so I might be a bit biased. I get that there are some issues with the model, especially when it comes to eviction, but it has been "good enough" for me. Curious on what other people think about it. |
| |
| ▲ | oftenwrong 4 hours ago | parent [-] | | Maven does not support "scripts" as NPM does, such as the pre-install script used for this exploit. With scripts enabled, the mere act of downloading a dependency requires a high degree of trust in it. | | |
| ▲ | 15155 3 hours ago | parent [-] | | Downloading a dependency also requires a high degree of trust in whatever transitive dependencies that a trusted dependency decides to pull in. |
|
|
|
| ▲ | rafaelmn 7 hours ago | parent | prev | next [-] |
| There are ecosystems that have package managers but also well developed first party packages. In .NET you can cover a lot of use cases simply using Microsoft libraries and even a lot of OSS not directly a part of Microsoft org maintained by Microsoft employees. |
| |
| ▲ | CharlieDigital 6 hours ago | parent [-] | | 2020 State of the Octoverse security report showed that .NET ecosystem has on average the lowest number of transitive dependencies. Big part of that is the breadth and depth of the BCL, standard libraries, and first party libraries. | | |
| ▲ | CodesInChaos 6 hours ago | parent [-] | | The .NET ecosystem has been moving towards a higher number of dependencies since the introduction of .NET Core. Though many of them are still maintained by Microsoft. | | |
| ▲ | WorldMaker 43 minutes ago | parent [-] | | The "SDK project model" did a lot to reduce that back down. They did break the BCL up into a lot of smaller packages to make .NET 4.x maintenance/compatibility easier, and if you are still supporting .NET 4.x (and/or .NET Standard), for whatever reason, your dependency list (esp. transitive dependencies) is huge, but if you are targeting .NET 5+ only that list shrinks back down and the BCL doesn't show up in your dependency lists again. Even some of the Microsoft.* namespaces have properly moved into the BCL SDKs and no longer show up in dependency lists, even though Microsoft.* namespaces originally meant non-BCL first-party. |
|
|
|
|
| ▲ | alextingle 4 hours ago | parent | prev | next [-] |
| Every time I look at a new project, my face falls when it's written in Rust. I simply don't trust a system that pulls in gigabytes of god-knows-what off the cloud, and compiles it on my box. It's a real barrier to entry, for me. When I download a C project, I know that it only depends on my system libraries - which I trust because I trust my distro. Rust seems to expect me to take a leap in the dark, trusting hundreds of packagers and their developers. That might be fine if you're already familiar with the Rust ecosystem, but for someone who just wants to try out a new program - it's intimidating. |
| |
| ▲ | cyphar 4 hours ago | parent [-] | | On Debian you can use the local registry for Rust which is backed by packages. Though I will say, even as someone who works at a company that sells Linux distributions (SUSE), while the fact we have an additional review step is nice, I think the actual auditing you get in practice is quite minimal. For instance, quite recently[1] the Debian package for a StarDict plugin was configured automatically upload all text selected in X11 to some Chinese servers if you installed it. This is the kind of thing you'd hope distro maintainers to catch. Though, having build scripts be executed in distribution infrastructure and shipped to everyone mitigates the risk of targeted and "dumb" attacks. C build scripts can attack your system just as easily as Rust or JavaScript ones can (in fact it's probably even easier -- look at how the xz backdoor took advantage of the inscrutability of autoconf). [1]: https://www.openwall.com/lists/oss-security/2025/08/04/1 |
|
|
| ▲ | hyperpape 6 hours ago | parent | prev | next [-] |
| Supply chain attacks are scary because you do everything "right", but the ecosystem still compromises you. But realistically, I think the sum total of compromises via package managers attacks is much smaller than the sum total of compromises caused by people rolling their own libraries in C and C++. It's hard to separate from C/C++'s lack of memory safety, which causes a lot of attacks, but the fact that code reuse is harder is a real source of vulnerabilities. Maybe if you're Firefox/Chromium, and you have a huge team and invest massive efforts to be safe, you're better off with the low-dependency model. But for the median project? Rolling your own is much more dangerous than NPM/Cargo. |
|
| ▲ | PunchyHamster 4 hours ago | parent | prev | next [-] |
| Rust (and really, any but JS) ecosystem have a bit more "due dilligence" applied everywhere; I don't doubt someone will try to namesquat but chance of success are far smaller > The more I think about it, the more I believe that C, C++ or Odin's decision not to have a convenient package manager that fosters a cambrian explosion of dependencies to be a very good idea security-wise. There was no decision in case of C/C++; it was just not a thing languages had at the time so the language itself (especially C) isn't written in a way to accommodate it nicely > Ambivalent about Go: they have a semblance of packaging system, but nothing so reckless like allowing third-party tarballs uploaded in the cloud to effectively run code on the dev's machine. Any code you download and compile is running code on dev machine; and Go does have tools to do that in compile process too. I do however like the by default namespacing by domain, there is no central repository to compromise, and forks of any defunct libs are easier to manage. |
| |
| ▲ | JeremyNT 4 hours ago | parent [-] | | > Rust (and really, any but JS) ecosystem have a bit more "due dilligence" applied everywhere; I don't doubt someone will try to namesquat but chance of success are far smaller I really agree, and I feel like it's a culture difference. Javascript was (and remains) an appealing programming language for tinkerers and hobbyists, people who don't really have a lot of engineering experience. Node and npm rose to prominence as a wild west with lots of new developers unfamiliar with good practices, stuck with a programming environment that had few "batteries included," and at a time when supply chain attacks weren't yet on everybody's minds. The barriers to entry were low and, well, the ecosystem sort of reflected that. You can't wash that legacy away overnight. Rust in contrast attracts a different audience because of the language's own design objectives. Obviously none of this makes it immune, and you can YOLO install random dependencies in any programming language, but I don't think any language is ever going to suffer from this in quite the same way and to the same extent that JS has simply due to when and how the ecosystem evolved. And really, even JS today is not JS of yesteryear. Sure there are lots of bad actors and these bad NPM packages sneak in, but also... how widely are all of them used? The maturation of and standardization on certain "batteries included" frameworks rather than ad hoc piecing stuff together has reduced the liklihood of going astray. |
|
|
| ▲ | newpavlov 5 hours ago | parent | prev | next [-] |
| While I agree that dependency tree size can be sometimes a problem in Rust, I think it often gets overblown. Sure, having hundreds of dependencies in a "simple" project can be scary, but: 1) No one forces you to use dependencies with large number of transitive dependencies. For example, feel free to use `ureq` instead of `reqwest` pulling the async kitchen sink with it. If you see an unnecessary dependency, you could also ask maintainers to potentially remove it. 2) Are you sure that your project is as simple as you think? 3) What matters is not number of dependencies, but number of groups who maintain them. On the last point, if your dependency tree has 20 dependencies maintained by the Rust lang team (such as `serde` or `libc`), your supply chain risks are not multiplied by 20, they stay at one and almost the same as using just `std`. |
| |
| ▲ | galangalalgol 5 hours ago | parent | next [-] | | On your last note, I wish they would get on that signed crate subset. Having the same dependency tree as cargo, clippy, and rustc isn't increasing my risk. Rust has already had a supply chain attack propagating via build.rs some years ago. It was noticed quickly, so staying pinned to the oldest thing that worked and had no cve pop in cargo audit is a decent strategy. The remaining risk is that some more niche dependency you use is and always has been compromised. | |
| ▲ | assbuttbuttass 4 hours ago | parent | prev [-] | | Is serde maintained by the Rust team? I thought it was basically a one-man show owned by dtolnay |
|
|
| ▲ | poulpy123 3 hours ago | parent | prev | next [-] |
| > The more I think about it, the more I believe that C, C++ or Odin's decision not to have a convenient package manager that fosters a cambrian explosion of dependencies to be a very good idea security-wise. The safest code is the code that is not run. There is no lack of attacks targeting C/C++ code, and odin is just a hobby language for now. |
|
| ▲ | rock_artist 5 hours ago | parent | prev | next [-] |
| Using C++ daily, whenever I do js/ts are some javascript variant, since I don't use it daily, and update becomes a very complex task. frameworks and deps change APIs very frequently. It's also very confusing (and I think those attack vectors benefit exactly from that), since you have a dependency but the dep itself dependent on another dep version. Building basic CapacitorJS / Svelte app as an example, results many deps. It might be a newbie question, but,
Is there any solution or workflow where you don't end up with this dependency hell? |
| |
| ▲ | threetonesun 3 hours ago | parent | next [-] | | Don't use a framework? Loading a JS script on a page that says "when a update b" hasn't changed much in about 20 years. Maybe I'm being a bit trite but the world of JavaScript is not some mysterious place separate from all other web programming, you can make bad decisions on either side of the stack. These comments always read like devs suddenly realizing the world of user interactions is more complicated and has more edge cases than they think. | |
| ▲ | smt88 5 hours ago | parent | prev [-] | | There's no solution. The JS world is just nonstop build and dependency hell. Being incredibly strict with TS compiler and linter helps a bit. |
|
|
| ▲ | Davidbrcz 6 hours ago | parent | prev | next [-] |
| Don't worry about C or C++, we create the vulnerabilities ourselves ! |
| |
| ▲ | GuB-42 4 hours ago | parent [-] | | I get the joke, but that makes me think. What is worse between writing potentially vulnerable code yourself and having too many dependencies. Finding vulnerabilities and writing exploits is costly, and hackers will most likely target popular libraries over your particular software, much higher impact, and it pays better. Dependencies also tend to do more than you need, increasing the attack surface. So your C code may be worse in theory, but it is a smaller, thus harder to hit target. It is probably an advantage against undiscriminating attacks like bots and a downside against targeted attacks by motivated groups. |
|
|
| ▲ | moritonal 7 hours ago | parent | prev | next [-] |
| Not knowing that much about apt, isn't _any_ package system vulnerable, and purely a question of what guards are in place and what rights are software given upon install? |
| |
| ▲ | viraptor 7 hours ago | parent [-] | | It's not the packaging tech. Apt will typically mean a Debian-based distro. That means the packages are chosen by the maintainers and updated only during specific time periods and tested before release. Even if the underlying software gets owned and replaced, the distro package is very unlikely to be affected. (Unless someone spent months building trust, like xz) But the basic takeover... no, it usually won't affect any Debian style distro package, due to the release process. | | |
| ▲ | trollbridge 6 hours ago | parent [-] | | Given the years (or decades) it takes updates to happen in Debian stable, it’s immune to supply chain attacks. You do get to enjoy vulnerabilities that have been out for years, though. | | |
| ▲ | alt227 4 hours ago | parent | next [-] | | > it’s immune to supply chain attacks Thats a strong statement that I can see aging very badly. | |
| ▲ | FergusArgyll 5 hours ago | parent | prev [-] | | Security updates are basically immediate, even on stable flavors |
|
|
|
|
| ▲ | progbits 7 hours ago | parent | prev | next [-] |
| Agreed with the first half, but giving up on convenient packaging isn't the answer. Things like cargo-vet help as does enforcing non-token auth, scanning and required cooldown periods. |
|
| ▲ | kunley 2 hours ago | parent | prev | next [-] |
| Why the word "semblance" with regard to Go modules? Are you trying to say this system is lacking something? |
|
| ▲ | vintagedave 7 hours ago | parent | prev | next [-] |
| I believe you, in that package management with dependencies without security mitigation is both convenient and dangerous. And I certainly agree this could happen for other package managers as well. My real worry, for myself re the parent comment is, it's just a web frontend. There are a million other ways to develop it. Sober, cold risk assessment is: should we, or should we have, and should anyone else, choose something npm-based for new development? Ie not a question about potential risk for other technologies, but a question about risk and impact for this specific technology. |
|
| ▲ | dijit 3 hours ago | parent | prev | next [-] |
| > but it's only a matter of time until it'll happen on the Rust ecosystem Totally 100% agree, though tools like cargo tree make it more of a tractable problem, and running vendored dependencies is first class at least. The one I am genuinely most concerned of is Golang. The way Dependencies are handled leaves much to be desired, I'm really surprised that there haven't been issues honestly. |
|
| ▲ | randomint64 6 hours ago | parent | prev | next [-] |
| Indeed, Rust's supply chains story is an absolute horror, and there are countless articles explaining what should be done instead (e.g. https://kerkour.com/rust-stdx) TL;DR: ditch crates.io and copy Go with decentralized packages based directly on and an extended standard library. Centralized package managers only add a layer of obfuscation that attackers can use to their advantage. On the other hand, C / C++ style dependency management is even worse than Rust's... Both in terms of development velocity and dependencies that never get updated. |
| |
| ▲ | Ygg2 5 hours ago | parent [-] | | > countless articles explaining what should be done instead (e.g. https://kerkour.com/rust-stdx) Don't make me tap the sign: https://news.ycombinator.com/item?id=41727085#41727410 > Centralized package managers only add a layer of obfuscation that attackers can use to their advantage. They add a layer of convenience. C/C++ are missing that convenience because they aren't as composable and have a long tail of pre-package manager projects. Java didn't start with packages, but today we have packages. Same with JS, etc. |
|
|
| ▲ | fouronnes3 7 hours ago | parent | prev | next [-] |
| Surely in this case the problem is a technical one, and with more work towards a better security model and practices we can have the best of both worlds, no? |
|
| ▲ | woodruffw 5 hours ago | parent | prev | next [-] |
| It’ll probably happen eventually with Rust, but ecosystem volume and informal packaging processes / a low barrier to entry seem to be significant driver in the npm world. (These are arguably good things in other contexts.) |
|
| ▲ | zenmac 6 hours ago | parent | prev | next [-] |
| Just a last month someone was trying to figure the cargo tree on which Rust package got imported implicitly via which package. This will totally happen in rust as well as long as you use some kind of package manager. Go for zero or less decencies. |
| |
|
| ▲ | riffraff 3 hours ago | parent | prev | next [-] |
| maybe the solution is what linux & co used for many years: have a team of people who vet and package dependencies. |
|
| ▲ | vachina 7 hours ago | parent | prev | next [-] |
| Node is the embodiment of move and break things. Probably will not build anything that should last more than a few months on node. |
|
| ▲ | agumonkey 4 hours ago | parent | prev | next [-] |
| do they follow the same process ? or is it harder to submit a package and vet it on rust/cargo ? |
|
| ▲ | mschuster91 7 hours ago | parent | prev | next [-] |
| > The more I think about it, the more I believe that C, C++ or Odin's decision not to have a convenient package manager that fosters a cambrian explosion of dependencies to be a very good idea security-wise. Ambivalent about Go: they have a semblance of packaging system, but nothing so reckless like allowing third-party tarballs uploaded in the cloud to effectively run code on the dev's machine. The alternative that C/C++/Java end up with is that each and every project brings in their own Util, StringUtil, Helper or whatever class that acts as a "de-facto" standard library. I personally had the misfortune of having to deal with MySQL [1], Commons [2], Spring [3] and indirectly also ATG's [4] variants. One particularly unpleasant project I came across utilized all four of them, on top of the project's own "Utils" class that got copy-and-paste'd from the last project and extended for this project's needs. And of course each of these Utils classes has their own semantics, their own methods, their own edge cases and, for the "organically grown" domestic class that barely had tests, bugs. So it's either a billion "small gear" packages with dependency hell and supply chain issues, or it's an amalgamation of many many different "big gear" libraries that make updating them truly a hell on its own. [1] https://jar-download.com/artifacts/mysql/mysql-connector-jav... [2] https://commons.apache.org/proper/commons-lang/apidocs/org/a... [3] https://docs.spring.io/spring-framework/docs/current/javadoc... [4] https://docs.oracle.com/cd/E55783_02/Platform.11-2/apidoc/at... |
| |
| ▲ | sph 6 hours ago | parent [-] | | That is true, but the hand-rolled StringUtil won't steal your credentials and infect your machine, which is the problem here. And what is wrong with writing your own util library that fits your use case anyway? In C/C++ world, if it takes less than a couple hours to write, you might as well do it yourself rather than introduce a new dependency. No one sane will add a third-party git submodule, wire it to the main Makefile, just to left-pad a string. | | |
| ▲ | mschuster91 6 hours ago | parent [-] | | > That is true, but the hand-rolled StringUtil won't steal your credentials and infect your machine, which is the problem here. Yeah, that's why I said that this is the other end of the pendulum. > In C/C++ world, if it takes less than a couple hours to write, you might as well do it yourself rather than introduce a new dependency. Oh I'm aware of that. My point still stands - that comes at a serious maintenance cost as well, and I'd also say a safety cost because you're probably not wrapping your homebrew StringUtils with a bunch of sanity checks and asserts, meaning there will be an opportunity for someone looking for a cheap source of exploits. | | |
| ▲ | skydhash 6 hours ago | parent [-] | | Wait what? That’s just fearmongering, how hard is it to add a few methods that split a string or pad it? It’s not rocket science. | | |
| ▲ | inejge 5 hours ago | parent | next [-] | | > how hard is it to add a few methods that split a string or pad it? In full generality, pretty hard. If you're just dealing with ASCII or Latin-1, no problem. Then add basic Unicode. Then combining characters. Then emojis. It won't be trivial anymore. | | |
| ▲ | skydhash 4 hours ago | parent [-] | | Full generality is not a practical target. You select your subset of the problem and you solve it. Supporting everything in a project is usually a fever dream. |
| |
| ▲ | mschuster91 3 hours ago | parent | prev [-] | | > how hard is it to add a few methods that split a string or pad it? Well, if you're in C/C++, you always risk dealing with null pointers, buffer overruns, or you end up with use-after-free issues. Particularly everything working with strings is nasty and error-prone if one does not take care of proper testing - which many "homegrown" libraries don't. And that's before taking the subtleties of character set encodings between platforms into account. Or locale. Or any other of the myriad ways that C/C++ and even Java offer you to shoot yourself in the foot with a shotgun. And no, hoping for the best and saying "my users won't ever use Unicode" or similar falls apart on the first person copying something from Outlook into a multi-line paste box. Or someone typing in their non-Latin name. Oh, and right-to-left languages, don't forget about these. What does "pad from left" even mean there? Is the intent of the user still "at the beginning of the string itself?" Or does the user rather want "pad at the beginning of the word/sentence", which in turn means padding at the end of the string? There's so much stuff that can go horribly horribly wrong when dealing with strings, and I've seen more than my fair share just reading e-mail templates from supposed "enterprise" software. |
|
|
|
|
|
| ▲ | trollbridge 6 hours ago | parent | prev | next [-] |
| An open question is why PyPI doesn’t have the same problem. |
| |
| ▲ | pxc 6 hours ago | parent [-] | | PyPI is also subject to supply chain attacks. What do you mean? |
|
|
| ▲ | eptcyka 6 hours ago | parent | prev | next [-] |
| Go is just as bad. |
|
| ▲ | aa-jv 4 hours ago | parent | prev | next [-] |
| > C/C++ .. a convenient package manager Every time I fire up "cmake" I chant a little spell that protects me from the goblins that live on the other side of FetchContent to promise to the Gods of the Repo that I will, eventually, review everything to make sure I'm not shipping poop nuggets .. just as soon as I get the build done, tested .. and shipped, of course .. but I never, ever do. |
|
| ▲ | tjpnz 7 hours ago | parent | prev | next [-] |
| In the early days the Node ecosystem adopted (from Unix) the notion that everything has to be its own micro package. Not only was there a failure to understand what it was actually talking about, but it was never a good fit for package management to begin with. I understand that there's been some course correction recently (zero dependency and minimal dependency libs), but there are still many devs who think that the only answer to their problem is another package, or that they have to split a perfectly fine package into five more. You don't find this pattern of behavior outside of Node. |
| |
| ▲ | sph 6 hours ago | parent [-] | | > In the early days the Node ecosystem adopted (from Unix) the notion that everything has to be its own micro package. The medium is the message. If a language creates a very convenient package manager that completely eliminates the friction of sharing code, practically any permutation of code will be shared as a library. As productivity is the most important metric for most companies, devs will prefer the conveniently-shared third-party library instead of implementing something from scratch. And this is the result. I don't believe you can have packaging convenience and avoiding dependency hell. You need some amount of friction. | | |
| ▲ | skydhash 6 hours ago | parent [-] | | It’s not even the convenience. It’s about trust. Npm makes it so that as soon as you add something to the dependency list, you trust the third party so completely you’re willing to run their code on your system as soon as they push an update. It’s essentially remote execution a la carte. |
|
|
|
| ▲ | testdelacc1 7 hours ago | parent | prev [-] |
| I hate to be the guy saying AI will solve it, but this is a case where AI can help. I think in the next couple of years we’ll see people writing small functions with Claude/codex/whatever instead of pulling in a dependency. We might or might not like the quality of software we see, but it will be more resistant to supply chain attacks. |
| |
| ▲ | elondaits an hour ago | parent | next [-] | | I don’t think I’ll live long enough to trust AI coding assistants with something like schema validation, just to name one thing I use dependencies for. | |
| ▲ | jeromegv 4 hours ago | parent | prev | next [-] | | When there's a depedency, it's typically not for a small function. If you want to replace a full dependency package by your own generated code, you'll need to review hundreds of even thousands of line of code. Now will you trust that AI didn't include its own set of security issues and will you have the ability to review so much code? | |
| ▲ | delaminator 4 hours ago | parent | prev | next [-] | | For sure. I don't think the software ecosystem has come to terms with how things are going to change. Libraries will be providing raw tools like - Sockets, Regex Engine, Cryptography, Syscalls, specific file format libraries LLMs will be building the next layer. I have build successful running projects now in Erlang, Scheme, Rust - I know the basic syntax of two of those but I couldn't write my deployed software in any of them in the couple of hours of prompting. The scheme it had to do a lot of code from first principles and warned me how laborious it would be - "I don't care, you are doing it." I have tools now I could not have imagined I could build in a reasonable time. | |
| ▲ | viraptor 6 hours ago | parent | prev | next [-] | | I wonder what the actual result will be. LLMs can generate functions quickly, but they're also keen to include packages without asking. I've had to add a "don't add new dependencies unless explicitly asked" to a few project configs. | |
| ▲ | short_sells_poo 6 hours ago | parent | prev | next [-] | | How is this going to solve the supply chain attack problem at all though? It just obfuscates things even more, because once an LLM gets "infected" with malicious code, it'll become much more difficult to trace where it came from. If anything, blind reliance on LLMs will make this problem much worse. | |
| ▲ | scotty79 3 hours ago | parent | prev | next [-] | | Then your dependency will be "AI getting it right every single time". | |
| ▲ | brigandish 6 hours ago | parent | prev [-] | | An approach I learnt from a talk posted to HN (I forget the talk, not the lesson) is to not depend on the outside project for its code, just lift that code directly in to your project, but to rely on it for the tests, requiring/importing it etc when running your own tests. That protects you from a lot of things (this kind of attack was not mentioned, afaic recall) but doesn’t allow bugs found by the other project to be missed either. |
|