13,486 karma · joined Jun 1, 2016 (10y ago) · 4,896 submissions
comment 4y ago · link · parent
I think you can probably split the two areas of interest into:
1. A package maintainer's credentials are compromised
2. A package repository is compromised
And the two attack vectors into:
1. The build script(s)
2. The runtime library
You can cut off the "repository is compromised" path with signing. An attacker doesn't have the maintainer's private key so even if they can modify source/packages on the server they can't "trick" the client into verifying it.
(1) is harder. Let's assume we have package signing, we know that any package we have was signed with a key that we hope only the maintainer has access to. At this point, either the maintainer is compromised or malicious. We can make compromise harder in a few ways, but should ultimately assume compromise.
One way to reduce compromise is to have the signing key stored on a hardware token that requires proof-of-presence for signatures.
Still, at this point we have "build script bad" and "library bad". Both are much harder problems, with solutions that you've alluded to to some extent - that is, sandboxing behaviors.
What this requires is a way to say "this code can do these things". This is how browser extensions / mobile apps work - they have to declare their permissions and you have to ack them any time they change.
Doing this for build scripts isn't too hard. You can run the scripts in a "hermetic" build system and have each script execute serially in a restricted environment - if one needs networking, give it networking, etc. There's no native support for this but imo it wouldn't be that hard to add it in.
Doing this for libraries is much harder. You'd need a native capabilities system in the language, and changes to capabilities would break the API. But sandboxing entire processes isn't that hard. The vast majority of services don't require egress to the public internet, meaning that an attacker is already going to have a hell of a time if they just get a shell into some box that they can't even communicate with. So I'd say start there - limit processes to what they can do and that limits the impact of a compromised library.
So altogether, none of these approaches seem super hard. We have signing, sandboxed builds (they can be pretty loosely sandboxed tbh - do a 'fetch', and then cut off internet for build scripts/ limit fs access), sandboxed services.
It'd be nice to have something more robust, but today you can do everything above without a ton of effort.
comment 4y ago · link · parent
It's a work laptop, although I use it almost exclusively these days since I can easily use a "personal" profile. It's very easy to manage things like SSO/device policies on Chromebooks because of the GSuite integration.
There's pretty much nothing that it's "worse" at, other than in some niche scenarios - like there's a bug where the VM will return an invalid code for a specific CPUID, and it doesn't support nested virtualization, etc. Pretty niche stuff.
Otherwise... it works. Funny enough I'm now in quite a pickle with my Ubuntu laptop, which updated to a new kernel, failed, and now I can't roll back to the previous kernel. Because of this, virtually no drivers are working, so I can't connect to the internet... making it really really fun to deal with! Stuff like this doesn't really happen on my Chromebook.
comment 4y ago · link · parent
I'd be very happy to see 16 core Chromebooks tbh, I definitely make heavy use of all 8 of mine today.
comment 4y ago · link · parent
Glad to see Github pushing this, I hope package repositories follow suit!
comment 4y ago · link · parent
Confusing, obviously incorrect.
> No reason 2FA can't be just two passwords.
Maybe somewhat less obviously incorrect, but still incorrect. Passwords can be phished easily, are managed by users, etc.
comment 4y ago · link · parent
It's not really relevant.
Besides, none of those have to do with software engineers. Compliance doesn't imply any individual responsibility.
comment 4y ago · link · parent
None of what you said is even true, all of those patterns are trivial, except "back-references" which are very slightly non-trivial.
And none of it is relevant. We don't need another memory unsafe language. It's fine if it's a toy, but this obviously isn't. It causes real harm.