News for hackers. Stuff that matters.
Re:macOS Nix setup: an alternative to Homebrew (2020) by numbsafari on Tuesday July 13, 2021 @04:19PM (#27825783)
It's really not weird at all, IMHO.

If you look at ChromeOS, it's actually relatively mainstream.

Most of us need a locked down desktop environment more than we realize. The UNIX/POSIX shell environment works really well for our specific kind of work (writing software), but it's full of security holes and gotchas. A lot of people talk about Apple as wanting to "own" everything, but the trend in securing consumer OS environments is clearly trending in this direction. Starting with research examples like Qubes, and all the mainstream security efforts in Windows, and ChromeOS.

Working with a VM that you can torch and rebuild is ultimately the best of both worlds.

What would be really cool is a Mac OS app for managing Vagrant... Basically a competitor for Docker Desktop for Mac that used VMs instead of Docker.

Re:macOS Nix setup: an alternative to Homebrew (2020) by heavyset_go on Tuesday July 13, 2021 @04:36PM (#27825987)
> A lot of people talk about Apple as wanting to "own" everything, but the trend in securing consumer OS environments is clearly trending in this direction. Starting with research examples like Qubes, and all the mainstream security efforts in Windows, and ChromeOS.

This is because Google and Microsoft want to own everything, as well. It's not a coincidence that Apple, Google and Microsoft's security implementations enshrine each of them as ultimate gatekeeper and single source of truth for security on their respective operating systems.

It is interesting that you bring up Qubes OS, because its security model doesn't depend on Invisible Things Lab, the Qubes developer[1], deciding what can or can't run on Qubes OS.

In fact, if a security model that depended on a company like Red Hat authorizing what can or can't run on Linux, it would be rightly criticized as Red Hat trying to "own" everything instead of developing a secure system at the OS level. Yet Apple, Google and Microsoft are doing just that.

[1] https://invisiblethingslab.com/

Re:macOS Nix setup: an alternative to Homebrew (2020) by numbsafari on Tuesday July 13, 2021 @05:03PM (#27826291)
I think we are really conflating "app store distribution" and "the POSIX userland isn't workable in a modern security environment for end-users". POSIX apps run as the user, when they really need to be run with their own identity. Most often we should use the identity of the "developer".

Do I want Firefox to have access to my Contacts? My Photos? Do I want Facebook to have that access? To all of them, or just ones that I select? Should my disk utility have the ability to send data over the network? My IDE? My IDE plugins?

This has nothing to do with "stores", and everything to do with the security model and the UI needed to make it work. e.g., when I run `grep -e "Something" -r ~/src`, I assume grep is going to read all of the files in ~/src. But in the basic POSIX environment it can access anything I can (including, say, ~/.ssh) and open up any old socket it wants and send data wherever it chooses. Have you read every line of code of every package you've installed? Rather than relying on 'trust', 2021 requires that we actually have some security model that doesn't rely on trust, but explicit permissions and grants, and workable UI for defining that. Wouldn't it be nice if bash arranged a read-only capability granted to the grep process for all files under ~/src based on the above command, and if the grep executable itself had no inherent permissions at all?

Re:macOS Nix setup: an alternative to Homebrew (2020) by heavyset_go on Tuesday July 13, 2021 @08:34PM (#27828016)
> Do I want Firefox to have access to my Contacts? My Photos? Do I want Facebook to have that access? To all of them, or just ones that I select? Should my disk utility have the ability to send data over the network? My IDE? My IDE plugins?

Modern security on Linux is hardly dependent on the POSIX security model.

Linux just got the Landlock feature[1] in the kernel[2] that does just this. Along with Landlock, features like cgroups, seccomp, AppArmor, Firejail and other sandboxing features go far beyond the traditional POSIX security model. Even parts of the ChromeOS security model are based on modern Linux sandboxing features, and don't rely on POSIX security.

To address your Firefox example, I use these features to sandbox Firefox so that it runs in a container, and limit its ability to run code or make certain syscalls, and it's only allowed to touch its profile and a dedicated Downloads folder. D-Bus can't even reach it.

> This has nothing to do with "stores"

I didn't say anything about stores. It has everything to do with Apple, Microsoft and (slowly) Google forgoing OS-level security for centralized control of what can and cannot run on their operating systems. This is not just enforced with "stores", but with certificate systems like Apple's Notarization and Gatekeeper programs and Microsoft's certificate program.

Instead of relying on the system to provide security, we're relying on Apple, Google and Microsoft to decide what we can run, or can't run, even though Apple is responsible for distributing 500 million copies of Xcodeghost[3], and Google's Play Store is the #1 vector for malware on Android[4].

[1] https://lwn.net/Articles/703876/

[2] https://lwn.net/Articles/700607/

[3] https://www.vice.com/en/article/n7bbmz/the-fortnite-trial-is...

[4] https://www.zdnet.com/article/play-store-identified-as-main-...

Re:macOS Nix setup: an alternative to Homebrew (2020) by an_opabinia on Wednesday July 14, 2021 @01:56AM (#27830111)
> Instead of relying on the system to provide security, we're relying on Apple, Google and Microsoft to decide what we can run, or can't run, even though Apple is responsible for distributing 500 million copies of Xcodeghost[3], and Google's Play Store is the #1 vector for malware on Android[4].

The security stuff is a huge red herring.

The security model is all about limiting self publishing and directly reaching consumers by the biggest players in IP, Disney, Netflix, Nintendo and Tencent. 90% of App Store revenue is games. Most remaining revenue is to subscription entertainment services. Security as engineers talk about it basically never affects the bottom line.

Re:macOS Nix setup: an alternative to Homebrew (2020) by jolux on Tuesday July 13, 2021 @09:19PM (#27828396)
> Instead of relying on the system to provide security, we're relying on Apple, Google and Microsoft to decide what we can run, or can't run

This is highly misleading. System-level hardening is complementary to cryptographic trust, not a replacement forit. Hardening features do their best to prevent arbitrary malicious processes from controlling the system, and the certificate systems make it possible to revoke the ability of specific known-malicious authors to distribute software. In macOS, you can look at the entitlements system, sandboxing, and system integrity protection for examples of hardening.

Not to mention, at least on macOS and Windows, all the certificate verification features can be turned off.

Re:macOS Nix setup: an alternative to Homebrew (2020) by heavyset_go on Tuesday July 13, 2021 @10:16PM (#27828819)
> System-level hardening is complementary to cryptographic trust, not a replacement forit. Hardening features do their best to prevent arbitrary malicious processes from controlling the system, and the certificate systems make it possible to revoke the ability of specific known-malicious authors to distribute software. In macOS, you can look at the entitlements system, sandboxing, and system integrity protection for examples of hardening.

I agree, however neither of these operating systems gives the user the level of control to address these concerns:

> Do I want Firefox to have access to my Contacts? My Photos? Do I want Facebook to have that access? To all of them, or just ones that I select? Should my disk utility have the ability to send data over the network? My IDE? My IDE plugins?

A system that implemented security that empowers users would allow you to say "I want my Email App to only access certain Contacts or certain Photos", allow you to supply dummy data to apps and give you better granularity.

Instead, what we get from Google is a system whose security is convenient for advertisers first, and not users, so it doesn't offer that level of empowerment even though some AOSP forks do. You either give it all of your contacts or pictures or none of them. Making a secure system that also empowers users would mean that they and their partners can't collect user data. We're shown scary warnings about installing apps outside of the Play Store and are assured that Play Protect means that everything on the Play Store is secured.

What we get from Apple is a security model that is convenient to their bottom line, so instead of addressing that user's needs, users are told they don't have to worry about their Email App doing anything bad with their contacts or photos because Apple vets apps and its developers. Like on Android, you either give the app all of your contacts or none. Making a secure system that also empowers users goes against their marketing that insists that their App Store and certificate racket are the only things keeping users private and safe.

Re:macOS Nix setup: an alternative to Homebrew (2020) by izacus on Wednesday July 14, 2021 @03:45AM (#27830664)
> Instead, what we get from Google is a system whose security is convenient for advertisers first, and not users, so it doesn't offer that level of empowerment even though some AOSP forks do. You either give it all of your contacts or pictures or none of them. Making a secure system that also empowers users would mean that they and their partners can't collect user data. We're shown scary warnings about installing apps outside of the Play Store and are assured that Play Protect means that everything on the Play Store is secured.

This literally isn't true since Android 10 and has been even more hardened in Android 11. Now the apps ONLY see the pictures you, as user, allow them to see. The same goes for file access, location access and plenty of other security model changes in last two Android versions.

So your rant about how evil Google caters to advertisers only really becomes wierd when they literally implemented the change you want.

Re:macOS Nix setup: an alternative to Homebrew (2020) by jolux on Wednesday July 14, 2021 @01:29AM (#27830006)
iOS already lets you choose with granularity which photos to allow an app access to as of iOS 14. Both macOS and iOS do not allow any app to have access to photos, contacts, camera, etc, without prompting the user first. But there is a trade off between usability and security, and Apple is pushing that boundary towards security and privacy about as aggressively as any vendor is. People have been complaining about all the new entitlements pop-ups in macOS and saying they shouldn’t exist! But they are providing real benefits to users and increased safety.

Of course they should be doing more, but they are constantly improving, and the same can be said of any organization. Where are the Linux distros that do this stuff out of the box and don’t involve configuring these tools with the command line? SELinux and all of those other tools you mention aren’t helping users if users are forced to become sysadmins to benefit.

Re:macOS Nix setup: an alternative to Homebrew (2020) by squiggleblaz on Wednesday July 14, 2021 @04:35AM (#27830917)
> iOS already lets you choose with granularity which photos to allow an app access to as of iOS 14.

How does this work? When an iOS app asks for permission to view photos, the user is asked which folders to grant it access to? How does the user grant one-time access?

> Both macOS and iOS do not allow any app to have access to photos, contacts, camera, etc, without prompting the user first. But there is a trade off between usability and security, and Apple is pushing that boundary towards security and privacy about as aggressively as any vendor is. People have been complaining about all the new entitlements pop-ups in macOS and saying they shouldn’t exist!

I think security prompts, viewed as interruptions, are a consequence of the Apple-owns-everything model. If I want to share a single photo with a friend using my messaging app, I don't really want to grant permission to view photos to the app. The fact that I have to is frustrating.

Instead, a step backwards towards the desktop metaphor, where the user owns the files, is a better place to step forward from: the user owns the files, and the apps are potentially hostile tools which the user sometimes requires. The app should ask the operating system for a photo, and the operating system should allow me to select the photo I want. The app then gets read access to this file right now. The app could certainly do something malicious with the read access it has received, but at least if it doesn't do anything malicious with it now, it can't do it later.

The limitation is that each app wouldn't be able to design its own photo selector

Some apps would of course legitimately want a broader access than that, e.g. a backup app, but the broader requirement shouldn't determine the limited requirement.

The same for location, for instance: it would be a resource that the app requires and the user chooses to give the current location or the spoofed location or cancel the action. (An advanced option that could be available for that would be "automatically fulfil the request in the same way for the next day/week/month/till the next upgrade/forever".)

The cognitive load would be much less. A user doesn't need to evaluate how trustworthy the app is in general. The user doesn't need to think, "It will be much easier for me to give SMS access to this app for setup, but I don't want it general access, so which one should I chose?". The user doesn't need to deny access to any app (which is tiring, since we're typically most naturally inclined to cooperate). Every action taken is naturally limited, so the stakes are lower.

The current approach is another attempt to reduce the cognitive load by reducing gratuitous choices. But it also prevents necessary distinctions and forces people to make choices they really don't want to (I want to send this photo vs I want this app to have access to my photos). But users view permission dialogs as things that take away their control rather than as things that give them control, so this approach seems failed. As you say, making them more and more fine grained just means the user is reminded more and more often that they don't have a say.

> Where are the [free software systems] that do this stuff out of the box and don’t involve configuring these tools with the command line?

There are projects to build software in this way-ish. They are all ridiculously limited and impractical. The amount of effort it takes is incredible. It's not simply a change of configuration; operating systems and programs need to be written to operate in this way. For instance, systems would have to stop making assumptions about the global filesystem namespace - the GTK filepicker would have to return read access to a file, rather than a filepath which a program than asks to open read-only.

Can you imagine a team of three or four developers maintaining a secure fork of a web browser in their spare time? and without a web browser, everything is a toy.

Re:macOS Nix setup: an alternative to Homebrew (2020) by jolux on Wednesday July 14, 2021 @10:46AM (#27833624)
What you’re describing is literally the iOS (and increasingly, macOS) security model that gets derided by power users for being too restrictive. The system owns the photo picker. When an app asks for photos, you can either give it access to the whole library, or you can choose specific photos to share with it from the system picker. The system owns location services. When an app asks for location, you can either choose to allow it indefinitely, choose to deny it, or choose to allow it once. Even if you allow it indefinitely, iOS will follow up with a prompt a while later explaining that the app has been using your location in the background, show you a map of the locations it has tracked over that time period, and ask if you want to continue allowing it indefinitely or deny access.

What you claim about reducing gratuitous choices is pretty clearly not how Apple views these things. They have been adding more and more granular permissions with every update, in response to developers abusing the wider permissions. I also have no idea what you mean by the user being reminded they don’t have a say. The user does have a say. What irritates the people who don’t like the prompts is they think they shouldn’t have to click through anything. It’s not a complaint that the permissions are too wide, it’s that they’re too granular.

I will also note that the cryptographic verification (and App Store review) side of things makes these measures a lot stronger, because developers can’t just hack around in private APIs and system-level frameworks to circumvent the restrictions. They are forced by a contract only to access the restricted resources through approved channels. Even though Apple is not perfect with review, the evidence from other platforms and their own data is that they catch the vast majority of abuse that happens and we never see it.

Re:macOS Nix setup: an alternative to Homebrew (2020) by dmitriid on Wednesday July 14, 2021 @06:05AM (#27831369)
> I think security prompts, viewed as interruptions, are a consequence of the Apple-owns-everything model.

No. It's a consequence of finding a balance between a usable system and the fact that people are shit.

From the start iOS was very limited as to what apps could access. Funnily enough, the Android crowd derided it for this. "What, no file system access, ahahaha".

And a user's usage scenario isn't "I open photos and and decide to share one with an app". The usage is "I open an app and want to select an unlimited random number of photos and videos to share with my friends in this app".

So the usability/permissions tradeoff was: an app sees nothing outside the sandbox, but can request access to a limited number of other system-defined sandboxes: photos, camera, microphone, location etc.

Guess what. People are shit. So they decided that unlimited access to photos is so very nice, and could be abused.

So the new permissions in iOS let you limit access even further: you select which photos an app has access to, and it only has access to those. Because what users want hasn't changed: they don't share photos with an app, they use an app to share photos.

The result is significantly more cumbersome than before and there's literally no way around it. It has nothing to do with "being Apple-owned". If you limit access, you will end up with security prompts and popups, access management dialogs etc.

> The same for location, for instance: it would be a resource that the app requires and the user chooses to give the current location or the spoofed location or cancel the action.

This is literally what iOS does. However, when iOS does it, suddenly it's "security prompts, viewed as interruptions, are a consequence of the Apple-owns-everything model"

Re:macOS Nix setup: an alternative to Homebrew (2020) by curt15 on Wednesday July 14, 2021 @05:04PM (#27838417)
>the GTK filepicker would have to return read access to a file, rather than a filepath which a program than asks to open read-only.

xdg-desktop-portal [1] does something pretty close, and it is how Linux applications shipped as Flatpaks access your files (at least when the Flatpak sandbox is in enforcing mode). Every sandboxed program has its own mount namespace which cannot see your home folder. When you want to open a file in a sandboxed program, you select the file in an out-of-process file chooser, and the portal puts a handle to that file in the program's view of the filesystem.

[1] https://github.com/flatpak/xdg-desktop-portal-gtk/

Re:macOS Nix setup: an alternative to Homebrew (2020) by WhyNotHugo on Thursday July 15, 2021 @10:41AM (#27845313)
Flatpak and the xdg-desktop-portal have some pretty interesting ideas.

It's a huge shame there's almost zero documentation, both in the code, and for users / developers. I've heard about this feature before, but I've no idea how to make it work.

Re:macOS Nix setup: an alternative to Homebrew (2020) by WhyNotHugo on Wednesday July 14, 2021 @10:07AM (#27833155)
When needing to grant access to photos on iOS, the user can has three options:

- Deny access to photos

- Grant access to hand-picked photos\

- Grant access to all photos.

Picking the middle option opens an OS-handled photo picker where you choose which photos the application can access. The model works pretty well in balancing flexibility, security and convenience.

Something else _many_ apps support, is just pasting a photo. So if I want to post a photo on Twitter, I can just copy it from my photo app, and paste it there. Twitter has access to no photos on the system at all, it merely receives that one.

Re:macOS Nix setup: an alternative to Homebrew (2020) by viraptor on Tuesday July 13, 2021 @05:28PM (#27826538)
That's pretty much selinux. We don't have a nice ui for it, because what you described is actually pretty complicated to achieve. But it actually works. Today.
Re:macOS Nix setup: an alternative to Homebrew (2020) by mikepurvis on Tuesday July 13, 2021 @05:41PM (#27826655)
Socket/port activation in the init system tries to be a piece of this puzzle too, though obviously it's far from the whole story.
Re:macOS Nix setup: an alternative to Homebrew (2020) by Wowfunhappy on Wednesday July 14, 2021 @02:28AM (#27830279)
> Do I want Firefox to have access to my Contacts? My Photos? Do I want Facebook to have that access? To all of them, or just ones that I select? Should my disk utility have the ability to send data over the network? My IDE? My IDE plugins?

Wouldn't the POSIX way of handing this be to have Firefox run as its own "Firefox" user with different privileges?

Re:macOS Nix setup: an alternative to Homebrew (2020) by alxlaz on Wednesday July 14, 2021 @03:27AM (#27830570)
It would, but you run into all sorts of impedance mismatch. For example, how do you revoke and grant access to your photos folder to some applications, on demand? The straightforward way (create groups for each important folder access class) blows up in terms of size very quickly, and group changes don't really happen on-the-fly, either. Things can get even murkier when it comes to device access, and you also have to deal with all sorts of caveats like suid binaries. You also don't have the API required to easily deal with any of this (e.g. no simple API to prompt the user for permission to access a path, no simple API to retry access until the user either grants access or denies it etc.).
Re:macOS Nix setup: an alternative to Homebrew (2020) by stouset on Wednesday July 14, 2021 @03:13AM (#27830513)
How do you then grant Firefox write access to your Downloads folder, read access to folders on the fly when you want to upload a file, “general area only” location information, access to the microphone and camera only during video conferencing, etc?

You can do some of this with groups, but that’s difficult and runs into limitations pretty quick for even comparatively simple use-cases. And making a bunch of custom ab-hoc groups requires root access on top, when ideally a user should be able to manage fine-grained control without escalating their own privileges.

Traditional POSIX file permissions are a huge blunt hammer that don’t scale well to the fine-grained type of access that things like iOS let you configure.

Re:macOS Nix setup: an alternative to Homebrew (2020) by kaba0 on Wednesday July 14, 2021 @04:10AM (#27830793)
POSIX permissions are way too crude to be properly functional.

SELinux sort of solves that part of the equation with additional labels given to each file, but eg. Android only uses selinux for the base of the system. Modern security requires sandboxed applications with user-controllable permissions.

Re:macOS Nix setup: an alternative to Homebrew (2020) by curt15 on Wednesday July 14, 2021 @02:39PM (#27836693)
This is the basis of the Android app sandbox. Each app runs as its own user.
Re:macOS Nix setup: an alternative to Homebrew (2020) by chrisfinazzo on Tuesday July 13, 2021 @05:08PM (#27826339)
> This is because Google and Microsoft want to own everything, as well. It's not a coincidence that Apple, Google and Microsoft's security implementations enshrine each of them as ultimate gatekeeper and single source of truth for security on their respective operating systems.

To a close approximation, 99% of regular users (let's just say people who are not developers by profession) do implicitly trust their respective OS vendors. To suggest otherwise suggests a level of paranoia which would make it impossible to ever have a stable system and get anything done.

Re:macOS Nix setup: an alternative to Homebrew (2020) by numbsafari on Tuesday July 13, 2021 @05:13PM (#27826387)
It's funny, because I actually agree with both of you.

We should generally trust our primary OS vendor, because otherwise we're all going to need therapy.

But we shouldn't have to trust them. That is, the system should be designed such that we have some amount of "defense in depth" where a mistake by Apple during the review of one of the 3.5 million apps doesn't result in an exploit.

I think this is why Apple and the others are trending towards the design that they are, because a deep capability approach that's integrated into the UI helps offload some of the complexity and overhead of managing that liability at scale.

Re:macOS Nix setup: an alternative to Homebrew (2020) by saagarjha on Tuesday July 13, 2021 @08:22PM (#27827903)
> I think this is why Apple and the others are trending towards the design that they are, because a deep capability approach that's integrated into the UI helps offload some of the complexity and overhead of managing that liability at scale.

I don't think this is an accurate description of what Apple is doing at all. If anything, they're moving more towards the direction where they are implicitly trusted and if you don't trust them you don't get any security.

Re:macOS Nix setup: an alternative to Homebrew (2020) by kaba0 on Wednesday July 14, 2021 @04:15AM (#27830822)
Apple does have pretty great security story. On ios, it’s like state of the art, and it’s ok on macos as well. And no, walled garden is not the security of apple, but proper sandboxing is.

So even without extensive app review (which is frankly, not extensive at all) a rouge application should not be able to do much damage.

Re:macOS Nix setup: an alternative to Homebrew (2020) by heavyset_go on Tuesday July 13, 2021 @08:45PM (#27828124)
Apple is responsible for distributing 500 million copies of Xcodeghost[1] to its users, and Google's Play Store is the #1 vector for malware on Android[2].

[1] https://www.vice.com/en/article/n7bbmz/the-fortnite-trial-is...

[2] https://www.zdnet.com/article/play-store-identified-as-main-...

Re:macOS Nix setup: an alternative to Homebrew (2020) by bartvk on Tuesday July 13, 2021 @11:51PM (#27829521)
I think it's very misleading to put it like that. Xcodeghost came with an infected version of Xcode that was not distributed by Apple.

From Wikipedia: "Security firm Palo Alto Networks surmised that because network speeds were slower in China, developers in the country looked for local copies of the Apple Xcode development environment, and encountered altered versions that had been posted on domestic web sites."

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

Re:macOS Nix setup: an alternative to Homebrew (2020) by heavyset_go on Wednesday July 14, 2021 @12:02AM (#27829591)
Right, and despite Apple assuring us that it vets each app and developer via its App Store, 500 million copies of the malware were distributed via the App Store to users' devices.

This is the next sentence after your quote[1]:

> This opened the door for the malware to be inserted into high profile apps used on iOS devices.

> Even two months after the initial reports, security firm FireEye reported that hundreds of enterprises were still using infected apps and that XcodeGhost remained "a persistent security risk". The firm also identified a new variant of the malware and dubbed it XcodeGhost S; among the apps that were infected were the popular messaging app WeChat and a Netease app Music 163.

From the same article:

> Removing malicious apps from the App Store

> On September 18, 2015 Apple admitted the existence of the malware and began asking all developers with compromised apps to compile their apps with a clean version of Xcode before submitting them for review again.

[1] https://en.wikipedia.org/wiki/XcodeGhost

Re:macOS Nix setup: an alternative to Homebrew (2020) by IncRnd on Wednesday July 14, 2021 @08:58AM (#27832505)
Sure, a wikipedia reading can give that impression. What actually happened is that sytems with infected Xcode installations created infected executables. Those infected executables were then uploaded to the App Store. There were known to be thousands of infected executable images.
Re:macOS Nix setup: an alternative to Homebrew (2020) by kasabali on Tuesday July 13, 2021 @08:40PM (#27828073)
This is a false dichotomy. Just because I trust OS vendor to not be shipping malware or backdoors in their code doesn't mean I must let them decide what I can or cannot run on the OS for me.
Re:macOS Nix setup: an alternative to Homebrew (2020) by babypuncher on Tuesday July 13, 2021 @06:39PM (#27827124)
> Apple, Google and Microsoft's security implementations enshrine each of them as ultimate gatekeeper and single source of truth for security on their respective operating systems.

Who do you propose should shoulder this responsibility? The vast majority of users lack the expertise to take it on themselves.

Re:macOS Nix setup: an alternative to Homebrew (2020) by heavyset_go on Tuesday July 13, 2021 @08:55PM (#27828210)
While I don't think it's perfect, and I don't use it myself, but because it was mentioned in the GP comment I responded to, we can look at the security model of Qubes OS which doesn't rely on its developer to decide what can and can't run on the OS.

Ideally, systems would be designed such that risks are minimized no matter where the app you want to run came from and no matter who signed it. Right now, that's how Apple, Google and Microsoft are dealing with security. They rely on developers signing software with certificates, and they revoke those certificates if they don't want that software to run on their operating systems. There was an incident last year the highlighted this system[1]:

> Last week, just after we covered the release of Big Sur, many macOS users around the world experienced something unprecedented on the platform: a widespread outage of an obscure Apple service caused users worldwide to be unable to launch 3rd party applications. Already being dubbed the “Apple Apocalypse” or “OCSP Apocalypse”, the cause was down to a little-known but essential service called “Online Certificate Status Protocol”

> The purpose of the OCSP call is to check whether a piece of software being launched has had its developer certificate revoked. Revoking developer certificates is one way that Apple deal with known malware. By using an OCSP responder service, Apple hope to prevent any software whose certificate has been revoked from launching on pretty much all Macs anywhere within minutes.

[1] https://www.sentinelone.com/blog/what-happened-to-my-mac-app...

Re:macOS Nix setup: an alternative to Homebrew (2020) by kaba0 on Wednesday July 14, 2021 @04:19AM (#27830844)
If a non-technical user runs his/her banking and some malware in the same VM, qubes os does jackshit about that.

It’s not security in itself. You have to configure each app to the tightest set of permissions it can run with and also have to trust said application no matter what. Apple does both of it via proper pre-configured sandboxes for apps, as well as revokable credentials. The latter is needed when eg there is a new serious vulnerability without a fix yet.

Re:macOS Nix setup: an alternative to Homebrew (2020) by atoav on Tuesday July 13, 2021 @07:18PM (#27827412)
In my eyes the whole philosophy is wrong. They (we?) try to add abstractions and systems on top that catches code that abuses flaws in systems and software.

How about using the same energy to create systems and software that are more rugged, reliable and won't fall apart when a three year old mashes the buttons long enough?

Or have we already given up?

Re:macOS Nix setup: an alternative to Homebrew (2020) by kaba0 on Wednesday July 14, 2021 @04:20AM (#27830850)
Security is orthogonal to good code. Especially when you run untrusted code on your computer regardless of its quality.
Re:macOS Nix setup: an alternative to Homebrew (2020) by circularfoyers on Tuesday July 13, 2021 @05:46PM (#27826683)
Fedora Silverblue is potentially where the future of the Linux desktop might end up. It improves on security significantly, where the system is read only, similar to macOS, and all user programs are sandboxed within flatpaks (migrated from the preexisting RPMs of these programs).
Re:macOS Nix setup: an alternative to Homebrew (2020) by kaba0 on Wednesday July 14, 2021 @04:21AM (#27830855)
The issue is flatpaks. They want to be a sandbox as well as a package management solution at the same time, while being good at neither of them.

The nix model would be so much better for the latter.

Re:macOS Nix setup: an alternative to Homebrew (2020) by vondur on Tuesday July 13, 2021 @07:43PM (#27827580)
Yes, I agree. It's kind of a pain to work with at the moment, but some more improvements it Silverblue is cool. Getting everyone to agree on FlatPaks may be an issue.
Re:macOS Nix setup: an alternative to Homebrew (2020) by jamesgeck0 on Tuesday July 13, 2021 @07:10PM (#27827355)
openSUSE MicroOS Desktop is another distribution exploring this space. It’s a neat idea, but the SUSE folks are still working out a lot of quirks (the firewall had to be disabled in recent builds, for example). How mature is Silverblue? Can it be used as a daily driver with minimal fuss?
Re:macOS Nix setup: an alternative to Homebrew (2020) by jcastro on Tuesday July 13, 2021 @05:53PM (#27826737)
Have you been able to get nix working in silverblue? The read-only fs makes making a `/nix` not very straightforward.
Re:macOS Nix setup: an alternative to Homebrew (2020) by jamesgeck0 on Tuesday July 13, 2021 @07:04PM (#27827319)
You’ll probably want to install it in a Toolbox [1] container. This is the recommended way to set up development tools; you’ll generally want as little as possible layered on the OSTree file system.

1. https://github.com/containers/toolbox

Re:macOS Nix setup: an alternative to Homebrew (2020) by bfrog on Wednesday July 14, 2021 @10:47AM (#27833636)
flatpak/snap have serious downsides and nix does a much better job of package management. The sandbox aspect is interesting but in practice it’s so far shown to break things in my experience
Re:macOS Nix setup: an alternative to Homebrew (2020) by jbenner-radham on Tuesday July 13, 2021 @04:42PM (#27826068)
You might be interested in: https://www.vagrantmanager.com/
Re:macOS Nix setup: an alternative to Homebrew (2020) by numbsafari on Tuesday July 13, 2021 @04:53PM (#27826191)
I'm aware of it. Hasn't been updated in a long time, and you need to otherwise install vagrant and a VM manager separately (fortunately, it doesn't ironically tell you how to do so via homebrew...)

I think a first-class vagrant app for Mac OS would (a) be available in the App Store for simplified VPP deployments (b) install vagrant and (c) either come with a lightweight VMM over Hypervisor.framework and/or work with other active VMMs like Fusion, Parallels or even Docker Desktop.

Vagrant was born of the CLI, but I think in 2021 it needs to embrace its role as a bridge between the GUI and CLI. Just my opinion, though...

Re:macOS Nix setup: an alternative to Homebrew (2020) by bradfeehan on Wednesday July 14, 2021 @12:51AM (#27829832)
the grandparent comment of this one is Mitchell Hashimoto, who made Vagrant, and is sharing their current setup..
Re:macOS Nix setup: an alternative to Homebrew (2020) by unicornfinder on Tuesday July 13, 2021 @04:54PM (#27826201)
What you've described is precisely why I love WSL - you can nuke and rebuild your Linux setup easily. It's fantastic honestly.
Re:macOS Nix setup: an alternative to Homebrew (2020) by numbsafari on Tuesday July 13, 2021 @05:09PM (#27826345)
Yep. Crostini under ChromeOS operates more or less the same way. It's also why I personally am done with the homebrew approach.

I was using VMs to address the disaster that is the Windows Registry as a developer back in the early 2000s. Homebrew is such an amazing step backwards in that regard.

I have a feeling that Terminal.app is headed this direction on Mac OS, but Apple is taking their sweet time navigating the migration since everyone gets pissed off whenever they fix a security/reliability problem. Could you imagine the uproar if the next version of Mac OS worked the way ChromeOS does? (ps., there's nothing stopping you from running Firefox on ChromeOS, I've done it).

Re:macOS Nix setup: an alternative to Homebrew (2020) by Karunamon on Tuesday July 13, 2021 @08:03PM (#27827721)
Everyone gets pissed off because the Apple way of fixing security "problems" is to take more control away from the owner of the system.
Re:macOS Nix setup: an alternative to Homebrew (2020) by viraptor on Tuesday July 13, 2021 @05:33PM (#27826581)
> I was using VMs to address the disaster that is the Windows Registry

What do you mean?

Re:macOS Nix setup: an alternative to Homebrew (2020) by numbsafari on Tuesday July 13, 2021 @06:04PM (#27826847)
The general issue one runs into on Windows where you, say, install a bunch of dev tools and then, at some point, your registry gets corrupted and you find yourself needing to reinstall everything.

If you run your tools, and do your testing, inside of VMs, you can quickly "restart" from a known good state.

The Windows Registry is a lot like /etc in Unix-like environments. In either case, all that configuration can get co-mingled and corrupted and you have to start over.

VMs are a great way to solve that problem for developers.

Re:macOS Nix setup: an alternative to Homebrew (2020) by viraptor on Tuesday July 13, 2021 @06:51PM (#27827207)
Registry corruption since w2k is pretty much solved. It's a database with a WAL-style transaction log. If registry corruption is something that happens to you more than once, I'd check the storage since there's probably a lot more that's getting corrupted... Otherwise - keep full disk backups.
Re:macOS Nix setup: an alternative to Homebrew (2020) by numbsafari on Tuesday July 13, 2021 @09:33PM (#27828496)
Chucking and restarting a VM is a lot faster than dealing with full disk backups.

Registry corruption isn’t just about transactional integrity. It’s also about whether or not something got misconfigured along the way and now you have to go figure it out. Or end up trying to uninstall and reinstall a bunch of stuff.

I’d rather just be able to start over from scratch.

All this work to treat our servers like cattle, but we insist on treating our clients like pets. Your local client should be just as replaceable as your servers.

Re:macOS Nix setup: an alternative to Homebrew (2020) by easton on Tuesday July 13, 2021 @09:27PM (#27828450)
It’s not so much corruption, it’s that every app uses it a little bit differently and half of them aren’t good at cleaning it up on uninstall. You can still get the system into a bad state where a rebuild (especially if you don’t have a lot of dependencies) is easier than trying to untangle whatever app or script or driver borked something.
Re:macOS Nix setup: an alternative to Homebrew (2020) by grosswait on Tuesday July 13, 2021 @10:02PM (#27828728)
I’ve experienced registry getting bloated and it is terrible for data restoration. I can’t think of any meaningful similarity between windows registry and Unix /etc. I’ve experienced orphaned config files but no other real issues. The orphaning is intentional usually because the config file has been changed from the default.
Re:macOS Nix setup: an alternative to Homebrew (2020) by leucineleprec0n on Tuesday July 13, 2021 @05:54PM (#27826754)
Yes, this is what’s so alluring about WSL, whereas with homebrew on my M1 setup I have an utter clusterf&$& of a paper trail across my desktop that is a real PITA to plausibly reverse course, modulo Time Machine backups.
Re:macOS Nix setup: an alternative to Homebrew (2020) by robenkleene on Tuesday July 13, 2021 @06:29PM (#27827052)
I use a `brew bundle` to help manage this. Make a `Brewfile` listing homebrew installs, then `brew bundle cleanup` to delete everything that's not in that file. This way I can try something out and easily delete it (and the dependencies it installed). It also obviously makes it easy to setup a new machine.
Re:macOS Nix setup: an alternative to Homebrew (2020) by numbsafari on Tuesday July 13, 2021 @09:36PM (#27828517)
This has been my MO with home brew as well. But it’s not perfect. Unix-style apps don’t always behave nicely when it comes to cleanup and it’s easy to get borked, not to mention the difficulties that the homebrew folks go through each time there’s a new release of Mac OS. I really think the writing is on the wall and we’d all be better off dumping homebrew and just using VMs.
Re:macOS Nix setup: an alternative to Homebrew (2020) by bmurphy1976 on Wednesday July 14, 2021 @05:19PM (#27838575)
You can use Homebrew and MacPorts concurrently. I will always choose the MacPorts version of a tool given the option and only fall back to a Homebrew version when absolutely have no other choice. It's frustrating to have to use two tools but I've found it easier to keep my dev environment clean this way.
Re:macOS Nix setup: an alternative to Homebrew (2020) by leucineleprec0n on Saturday July 24, 2021 @04:00PM (#27943969)
Wait; do you mind sharing a bit more about how you do this? I somehow missed this reply, and appreciate the pointer
Re:macOS Nix setup: an alternative to Homebrew (2020) by bmurphy1976 on Monday July 26, 2021 @10:01PM (#27967775)
I haven't had to do anything fancy yet. I just install both and try to find the MacPorts equivalent first before using Homebrew.

For example, I use the MacPorts version of Python. If I need any Python dependencies I install them either via MacPorts or pip.

In fact, I only have two Homebrew packages installed: dockutil and mas. Both are tools I use as part of ansible scripts which don't have MacPorts equivalents. All the remaining Homebrew packages are all cask apps (Firefox, Chrome, Discord, Slack, etc.). Those don't have any dependencies that would cause any conflicts.

For comparison, I have 139 MacPorts packages installed. 2 Homebrew packages, and 21 Homebrew cask apps.

Re:macOS Nix setup: an alternative to Homebrew (2020) by xfer on Wednesday July 14, 2021 @01:55AM (#27830101)
What happens when your windows system goes haywire(disk failure/os update gone wrong)? Good luck getting it work the same even if you have backups. One of the reasons i love NixOS is i can get it work exactly the same as it was before on completely new hardware.
Re:macOS Nix setup: an alternative to Homebrew (2020) by yokoprime on Wednesday July 14, 2021 @04:05PM (#27837764)
I've moved my WSL instances. It's basically just a vhdx with some config