Hacker News new | past | comments | ask | show | jobs | submit login

> The problem lies in the fact that Electron ASAR files themselves are not encrypted or signed

Resources on macOS get signed as part of the application bundle. I wonder why this isn't possible for Electron apps as well.




Hi Electron maintainer here

ASAR files are signed as part of the application bundle. The issue is that folks don't understand how gatekeeper works so let me try explain it here.

When you download an application from the internet, macOS initially considers it "quarantined". When a quarantined application is first opened gatekeeper scans it _completely_ and if it's happy removes the quarantine tag and let's it launch.

Once that quarantine tag is removed, gatekeeper will never run a complete check of that application again. Meaning the ASAR files are validated once, when the application is first launched.

What people are seeing here is they're taking an application that gatekeeper has already signed off on, modifying it, and then asking why gatekeeper didn't stop them.

If you took that modified application, zipped it up, uploaded it somewhere, downloaded it again and tried to run it, it would NOT work. Gatekeeper would boot that invalid application to the shadow realm.


Once you can establish that the main application binary is codesigned correctly (which AFAIK macOS will do at each launch?), why can't put signature checks into that to validate the ASAR files?


So this sounds like a non-issue -- or at least not a new or novel one. How did this get published so far and wide?


How does any nonsense get published far and wide?

People are trying to be helpful, perhaps, by amplifying some concern, while at the same time not having the expertise necessary to see it as false.


This appears to be the issue that is referenced in the article about why they don't sign currently:

https://github.com/electron/electron-packager/issues/656#iss...


Also of interest is the follow-on discussion [1] taking place on the electron/asar repo.

[1] https://github.com/electron/asar/issues/123




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: