The Jupyter trust model
Jupyter has specific parts of the application that are trusted or not:
- Untrusted HTML is always sanitized
- Untrusted JavaScript is never executed
- HTML and JavaScript in Markdown cells are never trusted
- Outputs generated by the user are trusted
- Any other HTML or JavaScript (in Markdown cells or output generated by others) is never trusted
Sanitized, untrusted coding is crippled by not allowing access to resources, such as accessing the internet. This can be a problem as many applications would naturally store JavaScript and/or actionable CSS in cells that are not visible to the user but would be crippled as part of the trust model.
Jupyter develops trust for an application by comparing digital signatures. When a Notebook is stored, a digital signature is made using the contents of the Notebook and a secret. The digital signature is stored on a disk accessible by the server. Then, whenever a Notebook is accessed, the signature is regenerated and compared to the stored value...