Live data from Hacker News

Improving the Trustworthiness of JavaScript on the Web

blog.cloudflare.com

31–39 of 39 posts

Re: Improving the Trustworthiness of JavaScript on the Web

#31
Much of what is described in the article can be accomplished with content addressable storage.

If we develop an internet where links describe the integrity of a file then we don't have to worry about the content changing out from underneath us. Additionally we get the benefit of being able to distribute the files we depend on anywhere.

Why make a map of hashes that correspond to human readable file urls, when we can directly link to hashes?

Re: Improving the Trustworthiness of JavaScript on the Web

#32
post #25

> This is because app stores do a lot of heavy lifting to provide security for the app ecosystem. Specifically, they provide integrity, ensuring that apps being delivered are not tampered with, consistency, ensuring all users get the same app, and transparency, ensuring that the record of versions of an app is truthful and publicly visible. The Google Play Store does none of this, lol. All apps created since 2021 hav…

As a further addition, Google does this for show (it’s not their business model) and is not equipped to deal with the criminals at Meta, as recently became apparent from, among other things, this disclosure: https://archive.is/nWpDZ https://localmess.github.io

Re: Improving the Trustworthiness of JavaScript on the Web

#33
post #15

Earlier quoted context omitted.

It doesn't seem like there's much difference in the trust model between E2EE web apps and App Store apps. Either way the publisher controls the code and you essentially decide whether to trust the publisher or not. Perhaps there's something here that affects that dynamic, but I don't know what it is. It would help this effort to point out what that is.

On the web, if your server is compromised it's game over, even if the publisher is not malicious. In app stores, you have some guarantee that the code that ends up on your device is what the publisher intended to ship (basically signed packages). On the web it's currently impossible to bootstrap the integrity verification with just SRI. This proposal aims at providing the same guarantees for web apps, without resorti…

> On the web, if your server is compromised it's game over, even if the publisher is not malicious. In app stores, you have some guarantee that the code that ends up on your device is what the publisher intended to ship (basically signed packages)

Not quite. It is possible for an account to be taken over or bought and a new update deployed. It is also possible for the server the app gets its data from to be taken over just like in your example and serve you fake data to make you regurgitate whatever data the malicious actor wants

Re: Improving the Trustworthiness of JavaScript on the Web

#34
post #15

Earlier quoted context omitted.

For me, the key problem being solved here is to have reasonably trustworthy web implementations of end-to-end-encrypted (E2EE) messaging. The classic problem with E2EE messaging on the web is that the point of E2EE is that you don't have to trust the server not to read your messages, but if you're using a web client you have to trust the server to serve you JS that won't just send the plain text of your messages to t…

It doesn't seem like there's much difference in the trust model between E2EE web apps and App Store apps. Either way the publisher controls the code and you essentially decide whether to trust the publisher or not. Perhaps there's something here that affects that dynamic, but I don't know what it is. It would help this effort to point out what that is.

Sorry, I should have been more concise - the two big differences are:

1) everyone gets the same code

2) it doesn't change too quickly

This means you can (esp with reproducible builds) audit that the code is correct and know that everyone is getting the correct code, and that misbehavior will be identified.

Re: Improving the Trustworthiness of JavaScript on the Web

#35
post #31

Much of what is described in the article can be accomplished with content addressable storage. If we develop an internet where links describe the integrity of a file then we don't have to worry about the content changing out from underneath us. Additionally we get the benefit of being able to distribute the files we depend on anywhere. Why make a map of hashes that correspond to human readable file urls, when we can…

Yes, if every single URL in your web application has a hash in it (including hrefs) then you don’t have to worry about anyone maliciously serving a webpage anymore.

But how do you get new app versions? I argue, if you want any meaningful security guarantees, an answer to this question will require transparency and/or code signing (which itself requires transparency, per my comment below)

Re: Improving the Trustworthiness of JavaScript on the Web

#39
I am a big fan of code verification. But from what I read, the process suggested is complicated. We already have the integrity flag to protect script. What would be needed to make it watertight is to change the hashing to include another token, maybe delivered via nameservice, so that the browser can verify it. Case closed. Minor change in the browser, complete protection against manipulation.
Post reply on HN