▲ | simonw 18 hours ago | ||||||||||||||||||||||
I was curious as to the security context this runs in:
Here are the headers I got back:
Presumably that ratelimit is against your IP?"access-control-allow-origin: *" is interesting - it means you can access content hosted in this way using fetch() from JavaScript on any web page on any other domain. "content-security-policy: default-src 'none'; sandbox" is very restrictive (which is good) - content hosted here won't be able to load additional scripts or images, and the sandbox tag means it can't run JavaScript either: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Co... | |||||||||||||||||||||||
▲ | benatkin 17 hours ago | parent | next [-] | ||||||||||||||||||||||
Blocking/allowlisting all JavaScript is the only way [1] to have a CSP fully contain an app (no exfiltration) [2] and with prefetch that might not be enough. The author is correct at the end to suggest using WebAssembly. (Also, it still has the issue of clicking links, which can be limited to certain domains or even data: by wrapping the untrusted code in an iframe and using child-src on the parent of the iframe) 1: https://github.com/w3c/webappsec/issues/656#issuecomment-246... | |||||||||||||||||||||||
| |||||||||||||||||||||||
▲ | nightpool 17 hours ago | parent | prev [-] | ||||||||||||||||||||||
is the default-src necessary if you're using sandbox or is it redundant? | |||||||||||||||||||||||
|