-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add SRI to hotlinking examples #326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
which security implications of pyscript? |
An example:
This is not a theoretical example, let's say you want to build an app that encrypts data. How could you know that you weren't interacting with malware that was stealing your private keys? SRI is built to solve this problem (and many others). |
I think there was an issue related to setting up a CDN (#309) and this should be a requirement underneath that issue no? |
I think you want SRI regardless of whether you use a 3rd party CDN or whether you use pyscript.net as your CDN. From the perspective of the app developer, both are 3rd parties. Having an official hash digest is great, because then ultimately developers don't care who serves up that JS. Using SRI nearly eliminates the risk that a third party has tampered with pyscript.js. In other words, even if pyscript.js were published on a CDN (or many), I'd want to get the hash digest directly from the project authors. |
the security implications of pyscript are the same as the security implications of JS and WASM right? what is special or different about pyscript? |
it seem to me you are saying all new web projects that pull code from a CDN should use SRI? |
i am trying to ask if you know of a specific security implication of pyscript that does not also exist in JS or WASM? |
They are the same security implications that would exist with any third party dependency (example: bootstrap). SRI exists to help ensure the integrity of the software aka: This would certainly make people more comfortable about including pyscript in their websites since it would minimize the impact of the source of the pyscript files being compromised since any compromise would (in 99.999999999999999999999% of the time) produce a hash different from the one in the website thus failing the integrity check. |
i thinks we should be able to enable SRI |
I am not sure why semver or any other versioning would solve the inherent issue described in here, but that decision has been made and we still land on CDN and I think that's the right thing to do. Closing until further explanations or reasons around this issue ... we're almost CSP complaint too, if the hash for the Worker and the WASM source is enabled, so I think this issue can be closed. |
Given the security implications of pyscript, it makes sense to recommend SRI when hotlinking
pyscript.js
:Integrity check was calculated successfully as follows:
Of course this will create issues when updating
pyscript.js
, so these links really should be version-pinned (I assume that's what/alpha/
means in this context).The text was updated successfully, but these errors were encountered: