GrapheneOS/PdfViewer
GrapheneOS/PdfViewer has 1,075 GitHub stars and 149 forks. GitHot measured +1 stars in 24 hours, +5 in 7 days, and +10 in 15 days. Last checked 2026-11-24 14:36 UTC. Last push 2026-11-20.
实测星标增长
- 24小时
- +1
- 7天
- +5
- 15天
- +10
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
关于
一款基于 pdf.js 和内容提供器的简易 Android PDF 查看器。应用无需任何权限。PDF 流会传入沙箱化的 WebView,但不会让它访问内容或文件。应用使用 CSP 强制 WebView 中的 JavaScript 和样式属性完全保持静态。
安全README.md
原文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 the network, files, content providers or any other data.
Content-Security-Policy is used to enforce that the JavaScript and styling properties within the WebView are entirely static content from the APK assets along with blocking custom fonts since pdf.js handles rendering those itself.
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 less access than it would have within the browser.
Tests
Android instrumentation tests
Requires a connected device or running emulator.
./gradlew connectedAndroidTest
To run a single test:
./gradlew connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=app.grapheneos.pdfviewer.test.PdfViewerLaunchTest
JavaScript unit tests
Requires Node.js 24+. Make sure modules are installed:
npm install
Run the tests:
npm test
探索相关项目
加载中…