PdfViewer icon indicating copy to clipboard operation
PdfViewer copied to clipboard

Feature: sandboxed, hardened PDF viewer using HiDPI rendering with pinch to zoom, text selection, etc.

Open fux0r2009 opened this issue 3 years ago • 0 comments

Issue Summary

I think to make the reader far more secure you can use the code of this secure PDF reader and implement it's features in our app https://github.com/GrapheneOS/PdfViewer : as this a Simple Android PDF viewer based on pdf.js and content providers. The app doesn't require any permissions. The PDF stream is fed into the sandboxed WebView without giving it access to content or files. Content-Security-Policy is used to enforce that the JavaScript and styling properties within the WebView are entirely static content from the apk assets. It reuses the hardened Chromium rendering stack while only exposing a tiny subset of the attack surface compared to actual web content. The PDF rendering code itself is memory safe with dynamic code evaluation disabled, and even if an attacker did gain code execution by exploiting the underlying web rendering engine, they're within the Chromium renderer sandbox with no access to the network (unlike a browser), files, or other content.

fux0r2009 avatar Feb 12 '21 23:02 fux0r2009