Where are the supply chain safe programming languages?
blog.vmsplice.net
blog.vmsplice.net
This doesn't solve the problem of people pulling in huge dependencies that they can't reasonably scan, or so many dependencies that they can't scan, but surely it's a step in the right direction.
[1]: https://tutorial.ponylang.io/object-capabilities/object-capa...
I think Pony is close to a supply chain safe programming language, but it looks like it's not safe by default. I don't know enough about Pony to understand whether this is a fundamental design issue or just a question of carefully invoking the compiler to avoid unsafe features.
Edit: Pony seems to rely on restricting FFI privileges at the package level https://tutorial.ponylang.io/object-capabilities/trust-bound.... Suppose it could have been function by function ("unsafe") but this sounds fine. Not sure what else I could have meant by a capability gated FFI.
You would need installation time compilation, jittin or pure interpretation.
Or some sort of trusted compiler-as-a-service with signed binaries.
The sandbox approach works relatively well where it's applied. If you're given a lua interpreter that doesn't know how to talk to the network, you're going to have a tough time compromising the underlying kernel to gain that capability. But your performance will be grim. Web assembly is roughly what you get if you run far enough down that path trying to engineer out the inherent limitations.
I wonder if the microservices people are onto something here. Some boundary around a unit marked "database" or "hashtable" that can't talk to the internet, something RPC themed to tie the pieces together, possibly all fed into a single address space to bring the performance overheads down to something reasonable. The problem is it's a huge pain to work with and makes the dev process slower, i.e. you get outcompeted by something broken-by-design that shipped faster.
It's an interesting problem space. Agreed with the OP that it seems underserved.
If we're talking supply chain, it's great for embedded and edge devices, otherwise I look to the old wizards to provide the foundational libraries for interpreted services.
Supply chain safety is more a function of economics in my uninformed opinion. How can we reduce middlemen while preventing monopolies or bottleneck moats?
We've all heard stories of android torch applications that require filesystem access for murky reasons. Or websites with cookie banners that ask to install thousands of cookies and refuse to work without access being granted.
(b) failing that, an alternate approach to the problem of deep and wide supply chains is vertical integration: just spitballing here, but we're programmers (and these days, it's even claimed we have AI support); is it too much to ask that most of us ought to be able to code up wheels that roll?
* free market mechanisms, at least as currently implemented, seem to me much better at figuring out how to compensate people after something bad has happened than at preventing it from happening in the first place.
Let’s say I code all my own dependencies in my particular domain (Java). I still have to run my code in an environment: there’s the JVM, then Linux beneath that, the hypervisor at my cloud provider beneath that, etc. You want me to code all of that myself too? You know, frankly I would love to understand and control the stack all the way down. But that’s a life goal. It’s not something most people can or would be interested in doing. We’re all stuck blindly trusting a vast, incomprehensible software supply chain.
However, I've seen some definitely dodgy packages in NuGet. Since "bulk insert" isn't (wasn't?) widely supported in EntityFramework packages, there were some extremely dodgy copies of commercial bulk insert frameworks being made available, along which who knows what else.
I find npm/node.js the scariest package manager combo though. Including something simple that then drags in 20 or 30 other packages is inexplicable.
I feel gross even using pip in python, because the thing you use as the noun in `pip install <noun>` isn't the same as the package you are importing. Name attacks in Python are trivial to exploit.
JS is even crazier, your gonna get a disease! There is no safe JS.
I like .NET but I often feel it's safer than node.js by accident, because the range of packages you need to get something running is much smaller because the date/time classes are sane and things like networking and security are built in rather than imported. But there is no getting around the fact that you're still vulnerable to all the same supply chain attacks as Javascript.
Luckily, the standard library is so extensive you rarely find yourself reaching for an external package for a piece of basic functionality, and companies often are extremely averse to taking on third-party dependencies to a point of unreasonable (you have to go through sec dept even for otherwise popular and actively maintained packages which really doesn't help as it leads to NIH proliferation, doing more damage than good).
It is probably less prevalent in small size businesses however which has its advantages - the productivity loss and maintenance effort is highly likely outweighs whatever security benefits the above approach may bring, if any (good OSS package is usually more secure and does a better job than a particular team often unequipped with sufficient skills).
Which are languages that have a large comprehensive official standard library backed by a large corp.
Those corps have the manpower to better audit contributions.
Examples: Microsoft's .NET (C#/F#) and Google's Go.
Qt comes to mind. It includes the kitchen sink and a lot of applications can be written without third-party dependencies.
Go programs tend to have a lot of third-party package dependencies. I don't think it's a good example.
I released it today. A week ago, I released a blog post that mentioned [1] a supply chain-safe build system and language.
Despite that post and the traction it got, the 6-hour-old Show HN is already long gone, not even on the first 10 pages.
Long ago, Java had something for supply chain safety in the form of SecurityManager. It was removed.
There are no supply chain-safe languages because the industry doesn't care.
[1]: https://yzena.com/2024/03/what-computers-cannot-do-the-conse...
Edit: Also, if we're discussing https://news.ycombinator.com/item?id=39904895 - it's not even a question of length, I don't see a hook there at all. If I click into https://rigbuild.dev/ and get halfway down the page then I start to see interesting features, most of which are marked as coming soon (so... not present). But I almost certainly wouldn't click the link, because your actual post just says that it's a build system and that it's proprietary, at which point I lost interest. Some people will put up with a build tool that isn't open source, but you still have to give them some reason to be interested.
I think that is the real reason: if it's not FOSS, people dismiss it out of hand.
Also, I was hamstrung by Show HN rules.
- https://news.ycombinator.com/item?id=39904895
> Proprietary software is software that grants its creator, publisher, or other rightsholder or rightsholder partner a legal monopoly by modern copyright and intellectual property law to exclude the recipient from freely sharing the software or modifying it, and—in some cases, as is the case with some patent-encumbered and EULA-bound software—from making use of the software on their own, thereby restricting their freedoms.
> [...]
> Proprietary software may either be closed-source software or source-available software.
- https://en.wikipedia.org/wiki/Proprietary_software
It sure sounds proprietary. In any event, yes, if you prefer I can phrase that as "I'm not going to use a build system that's not Open Source without an incredibly compelling reason".
End users are not restricted from modifying it and sharing their changes, so long as it is not for a commercial purpose. Therefore, it is not a monopoly to share and modify and not proprietary.
And the fact that you and others won't is exactly why xz happened and why we might lose FOSS completely.
As opposed to your approach, which... is also not FOSS.
But this is a fun thread to pull: You wish to argue that it's necessary to force payment for commercial use of code. Fine; I disagree but that can be coherent. Are you doing that? Your project is commercial. Are you paying the authors of your compilers? Are you paying the authors of the open source code I see copied into your source tree? Or is it just your code that people have to pay for in order to avert the next xz?
Am I doing it now? No, because I can't afford to. Because people want a free lunch from my software.
Here is the Show HN post:
The difference between Rig and other build systems is that it doesn't do anything for you. Others like to magically make your build work.
I guess my problem is that I didn't emphasize the supply chain safety. That is on me. But I didn't because that part isn't ready yet.
I have heard lots of people say here that they want code upfront, so I put it near the top on the website. Turns out, not so much. Oh well.
The hook on the rig page tells me it's an alternative to make, and geared towards C code. It doesn't tell me why this is better than make or anything else, and it doesn't look easy to use. Even if you promised the moon, it's hard to imagine anyone would jump and rewrite their codebase to try a new build system.
I want a build system to take care of as much as possible for me, the package availability nixpkgs with the speed of bazel. Nix is underused because the beginner UX is atrocious, and while the package management is good, it's not as suitable as a build system. Bazel and it's offspring are underused because it requires a huge amount of up front setup, and has a half baked package management story.
Since you have clearly thought a lot about this space, I hope you don't completely drop the ideas you have here.
> An example is that a hash table lookup function should be unable to connect to the internet. That way the function can be used without fear of it becoming a liability if it contains bugs or its source code is manipulated by an attacker.
Reminds me of OpenBSD's pledge [1].
My experience with sandboxing approaches is that they are only used in the most security-critical software because they are difficult to integrate. If the programming language isolates components by default, then the majority of software should be able to benefit.
Now, sure all these things outdated, somebody have to rewrite ocean of code, add support of modern architectures, device drivers, even to teach people, as most programmers from that niches already retired, etc.
I wondered when it was going to start talking about capabilities and I was not disappointed!
Of course certain features of a language are exploited, but for a supply chain attack, I think the real vulnerability is complexity, neglect, carelessness, social pressure and (arcane) code beyond immediate comprehension. Since, before any malicious xz code was shipped, the human element was manipulated and exploited. The same pull request about the introduction of IFUNC, could have been about extending capabilities for another made-up reason. The same exploitation of trust, which allowed packing malicious scripts, would have allowed for... well, packing malicious scripts.
With the xz backdoor, the vulnerability was large chunks of infrastructure being the burden of a single human. I really don't see how this attack dynamic could have been prevented by language design alone. Sure, you wouldn't attack a compression library, if capabilities were tight. You would attack the neglected privileged code base elsewhere...
This attack wouldn't have done much if you were running fast and loose with dependencies but had proper layered network infrastructure. There should never be a single point of failure where a single supply chain attack, 0-day, insider threat, etc should be able to kill you and it's not that hard to achieve this.
Put your shit inside a VPN, secure the systems inside the VPN as if they're connected directly to the internet, vlan or even airgap systems that are hyper critical, etc.
I build satellites where we actually do some of the supply chain caching and review, but it's for very specific things that are absolutely mission critical and the risk of >0days is lower than the risk of a memory leak locking up a system.
Think critically about what it would take to access and pivot within your network.
Even if that were not true, it has absolutely nothing to do with supply chain security.
As long as there are supply chains there are attacks. reduce your dependencies to bare minimum.
Note that the distributions used by package managers such npm, pip, or cargo do not do this. So be wary of the "all old is bad and needs to be rewritten and C does not even have a proper package manager" crowd. (memory safety is a good thing though)
That being said, I am a big proponent of keeping dependencies slim, and library authors should especially aim for minimal dependencies where they can--that would help account for the deeply-nested dependency issue we see in npm and the like.