Unfortunately, the vendors have little reason to facilitate that.
I fail to see the difference between Web and Native in that regards, in both case the attacker need to both:
- a compromised certificate
- a way to redirect the user to their own server (be it DNS or IP spoofing, or something more fancy like bitsquatting).
With only one of those, both the Web and Native app are safe, and with the two of them, you're screwed in both cases.
> - There are currently no sufficient mechanisms to validate the integrity of web app packages end-to-end. Not even under a trust-on-first-use (TOFU) model.
Would you mind expanding your requirements here? (Especially, what's the threat model you have in mind for which subresource integrity isn't enough but your ideal solution would be).
A browser setting to only load subresources with integrity checks would also help
You can do pretty much all you want in a ServiceWorker today[1], but I'll advise against pinning certificates, because you'd just be re-marking HPKP again, with the same gigantic footgun.
> A browser setting to only load subresources with integrity checks would also help
A “browser setting”? What's the point if the user need to set it up themselves to be secure? Some kind of linting tool on CI in order to be sure you never include a resource without SRI would be nice though, but it's not really the responsibility of the browser here.
[1]: you can see an example of that here: https://arxiv.org/pdf/2105.05551.pdf (Note that I've just DuckduckGo-ed a quick example, I haven't read this particular paper and can't say if their scheme is particularly good, but that'd give you an idea).
Yes, the updates are automated on mobile devices, but not under total and full control of the app developer, unlike for websites.
And people do monitor what e.g. the Signal app is doing, or WhatsApp.
I don't agree though that all web-based cryptography is snake oil though. Targeted attacks from the site operator are not the only thing you want to defend from. Say the site operator is asked by authorities to hand over data they store of a specific user. Then the insecure web based cryptography is enough to protect the data: everything that's stored is encrypted.
With an app from an App Store you are trusting at a minimum:
- the vendor
- the App Store
- the update system for your OS
For a web app (via SSL) you are trusting:
- the vendor
- the browser and it's update system
- the OS and its update system
There is barely a difference in a world of auto updating software.