Better HN
topnewbestaskshowjobs
Log inSign up

staticassertion

13,486 karma · joined Jun 1, 2016 (10y ago) · 4,896 submissions

@insanitybit
Submissions

comment 11mo ago · link · parent

If you distribute images to your customers it is a huge benefit to not have them come back with CVEs that really don't matter but are still going to make them freak out.

comment 11mo ago · link · parent

I don't think this is the case here. The reason you want to lower your CVEs is to say "we're compliant" or "it's not our fault a bad thing happened, we use hardened images". Paying doesn't really change that - your SOC2 doesn't ask how much you spent, it asks what your patching policy is. This makes that checkbox free.

comment 11mo ago · link · parent

People are absolutely somersaulting through hoops to try to make "I don't want to do that" into "I'm going to do it" in the comments lol

comment 11mo ago · link · parent

Which package managers don't contain an equivalent feature for running code as part of the install process?

comment 11mo ago · link · parent

What language does not have a popular package manager that provides code execution?

comment 11mo ago · link · parent

It's not a false sense of security imo. Code often runs in its own environment, for example a container. We're "used to" sandboxing/ isolating runtime code. It's the package installation process that gets less attention.

comment 11mo ago · link · parent

It has nothing to do with interpreters or JIT, it has nothing to do with npm at all. All package managers have the insane security model of "arbitrary code execution with no constraints".

comment 11mo ago · link · parent

Isn't this just the same value judgment mistake? You're just presupposing that things like "smaller code base" are better in virtue of themselves the same way that "rewritten in Rust" might be as well.

The parent poster's point is seemingly to reject "this is simply the better thing" (ie: "small code is better") and instead to focus on "for what we are doing it is the better thing". Why would "basic" profiler use be better than "niche" or "advanced" profiler use if for that context basic would actually have been inferior (for whatever value of basic we choose to go with)?

It seems to me that the reality we're often confronted with is that "better" is contextual, and I would say that "basic" or "smaller" are contextual too.

comment 11mo ago · link · parent

I think you're still not getting my point. Yes, a rare event of data loss may not be a big deal. What is a big deal is being able to reason about how rare that event is. When you have durable raft you can reason by using straightforward MTBF calculations. When you don't, you can keep adding nodes but you can't use MTBF anymore because a single failure is actually sufficient to cause data loss.

comment 11mo ago · link · parent

> Logic errors always stems from lack of understanding and inattention

Really? Never from limitations of the ability to express your mental model in a way that's formally verifiable? What a strong claim to make.

> There are static tools available for C as well.

For checking the semantics of the code itself? And why discount the fact that a tool being native means it's easier to adopt?

comment 11mo ago · link · parent

> Rust doesn't prevent programs from having logic errors.

Sure, but it prevents memory safety issues, which C doesn't. As for logic bugs, what does prevent them? That's a bigger question but I'd suggest it's:

1. The ability to model your problem in a way that can be "checked". This is usually done via type systems, and Rust has an arguably good type system for this.

2. Tests that allow you to model your problem in terms of assertions. Rust has decent testing tooling but it's not amazing, and I think this is actually a strike against Rust to a degree. That said, proptest, fuzzing, debug assertions, etc, are all present and available for Rust developers.

There are other options like using external modeling tools like TLA+ but those are decoupled from your language, all you can ever do is prove that your algorithm as specified is correct, not the code you wrote - type systems are a better tool to some degree in that way.

I think that if you were to ask an LLM to write very correct code then give two languages, one with a powerful, express type system and testing utilities, and one without those, then the LLM would be far more likely to produce buggy code in the system without those features.

comment 11mo ago · link · parent

Maybe what's confusing here is "true durability" but most people want to know that when data is committed that they can reason about the durability of that data using something like a basic MTBF formula - that is, your durability is "X computers of Y total have to fail at the same time, at which point N data loss occurs". They expect that as the number Y goes up, X goes up too.

When your system doesn't do things like fsync, you can't do that at all. X is 1. That is not what people expect.

Most people probably don't require X == Y, but they may have requirements that X > 1.

comment 11mo ago · link · parent

It's not even "overcomplicated theory" it's just "commit your writes before you say you committed your writes". It's actually way, way more complicated to try to build a system that tries to be correct without doing that.

comment 11mo ago · link · parent

I don't think they were making a point. Someone suggested using an LLM for this, someone then responded by using an LLM for it.

What you draw from that seems entirely up to you. They don't seem to be making any claims or implying anything by doing so, just showing the result.

comment 11mo ago · link · parent

I don't have a "school education" and I know plenty of theory, I certainly have read the papers cited in this test.

comment 11mo ago · link · parent

Thanks, I'd misremembered that it just required --privileged. I suspect that will continue to be a requirement since unprivileged user namespaces are not viable.

comment 11mo ago · link · parent

There's a massive incentive not to share them. If I wrote a project using AI I'd be reluctant to publish it at all because of the backlash I've seen people get for it.

comment 12mo ago · link · parent

Is it copyright infringement? It's a fundamental algorithm.

comment 12mo ago · link · parent

Right, I read your comment. You still clearly state that this is a loophole and when you then follow up to say "particularly gross" the clear implication is that it's a "gross loophole".

The ability to borrow against an asset is not a loophole.

comment 12mo ago · link · parent

> You use it as collateral for a loan and just spend the laon while the asset continues to appreciate (hopefully) faster than the interest rate.

Gosh, that hopefully is doing a lot for you sentence lol. Risk based economies function on that "hopefully". To phrase this another way, "if you borrow money against an asset, invest it in the economy, and make more than the interest in returns, you can avoid selling the asset to cover the loan", which sounds a whole lot more sane. It's a bit scary to imagine a world in which borrowing against an asset could not be profitable as that would mean that all investment in the economy would halt, no?

I'm not even against this tax fwiw but you're glossing over some major details in how that tax deferral works. The major issue is how cap gains is handled on death.

comment 12mo ago · link · parent

> both cgroups and namespaces are hierarichal, so you certainly can subdivide the sandbox.

This is true, you can enter a namespace while in another namespace, but it's a privileged operation to namespace.

Docker in Docker does use socket bind mounting already afaik, and it's a trivial privesc because docker runs as root and the ability to talk to the socket means you can run `docker run --privileged --user root image_name -it bash` and get a shell as the host root user.

The solution is to allow unprivileged users to drop privileges, which is how MacOS and Windows work. On Windows you have integrity levels, tokens, etc, all of which you can drop without privileges. On MacOS you have seatbelt.

Linux almost had this with unprivileged user namespaces but that's not viable because 30 years of "root -> kernel privesc isn't a security issue" attitude proved to be problematic.

comment 12mo ago · link · parent

An explanation is just a theory that accounts for the facts. A hypothesis is a theory that accounts for the facts while also providing falsifiability and testability .

They provide an explanation, not a hypothesis.

comment 12mo ago · link · parent

It actually provides an explanation and not a hypothesis.

comment 12mo ago · link · parent

SELinux and Apparmor are typically configured by admins. They require root privileges and are designed with human interfaces. It is certainly atypical for a program to say "hey kernel, apply this apparmor profile to me" and they're not designed for incrementally dropping rights either.

On Windows and MacOS programs are free to sandbox themselves programmatically and without privileges. Linux is the odd one out, basically every way of reducing your privileges programmatically requires already being root or at least having an admin preconfigure the system in a way that would allow it.

comment 12mo ago · link · parent

> - How does this help with malware? I want to craft an environment where any program trying to read f.ex. anything inside ~/.ssh is automatically denied. I don't want a malicious build script to exfiltrate all my sensitive data!

Your package manager would specify a policy that only allows specific access by build scripts. Or you'd use a wrapper.

> - It seems that this software is well-positioned for us to write application launchers with, is that true? If so, well, I like the idea but it seems too manual.

It could be. It's for anyone who knows what their program does, basically.

comment 12mo ago · link · parent

> I'd love to see a comparison of landlock to restricted containers.

One thing to consider is that containers virtualize. You enter new "namespaces" where you aren't necessarily restricted within that namespace, but the namespace as a whole is sort of your own playground. So a PID namespace only allows you to see other processes within that namespace.

This is very distinct from a resource oriented approach like landlock. Landlock may allow you to say "you can do certain actions to certain processes" but you wouldn't get the same semantics as "I can only see specific processes to begin with". They would layer nicely.

Similarly, containers provide virtualized file systems. A write happens in a container and it's allowed, but the write is isolated from the host. Landlock would instead allow or deny that write.

They go very well together.

comment 12mo ago · link · parent

You need to be root to set those up. These are typically admin-driven policies, not dev-driven. Landlock is unprivileged, meaning that a program can set its own policy up without root.

This is massive since most ways of dropping privileges on Linux require already having significant permissions (ie: root).

comment 12mo ago · link · parent

One of the most annoying parts of being in a container is that you can't sandbox yourself further within that container. Normal approaches like namespaces, mounts, chroot, etc, are all incompatible with running in a container. Therefor, if you want to go further than what a container provides, landlock is a powerful solution.

Further, while "whole process" sandboxing like containerizing is very effective under some conditions, having more fine grained access and the ability to reduce permissions over time is incredible.

Consider that I may need to open a file in my program. The file path will be provided by an env var `CONFIG_PATH`. My program now has to have total file system read permissions if it is going to support reading arbitrary configuration file paths, even though it only has to read one file.

I can instead set my program up to read that file one time and then never again, or I can set things up to only ever need to read that single file and no others, etc. I can incrementally reduce permissions, and that's really cool. You can't do that with a container - containers get what they get.

comment 12mo ago · link · parent

> Even if they were anti-AI (which I don't think is true)

The entire site is constantly talking about how AI sucks and how it's not worth taking seriously. The AI tag was exclusively "vibecoding" despite it being extremely annoying for anyone who wanted to talk about it. Posts about AI being bad are upvoted far more, despite being very obviously low content/ uninteresting. Sentiment is very obviously anti-AI on lobsters.

I don't even think this should be contentious. The site is very openly anti-AI. When discussions about this have come up in meta posts it is overwhelmingly the case that users say "yes, we are anti AI, that's fine".

> it's not a big deal.

It stopped me from posting on there and I deleted my account because the conversations were so stupid. It comes up frequently that users want to be able to filter out "AI fluff" separately from "interesting discussion of AI". You can have a post about the internal algorithms and optimizations of an LLM and it will still be labeled "vibecoding" on the site - if that doesn't blatantly indicate a site-wide anti-AI bias I don't know how.

1
222324
164