warren-bank / Android-WebMonkey

No-frills light-weight Android web browser with support for Greasemonkey userscripts.
https://warren-bank.github.io/Android-WebMonkey/index.html
GNU General Public License v2.0
97 stars 23 forks source link

WebMonkey

No-frills light-weight Android web browser with support for Greasemonkey userscripts.

Builds upon the WebView GM library demo application.

Background

Improvements

Settings

Security

  1. closure
  2. sandbox
    • when a closure is disabled, a sandbox is also disabled
    • when a closure is enabled, by default, all JS global variables saved to the window Object are stored in a sandbox
    • as such, JS code outside of the userscript cannot see or access these variables
    • however, the JS code inside of the userscript can see and access all global variables… including its own
    • the sandbox is implemented as an ES6 Proxy
    • this security feature can be disabled by a userscript by adding any of the following declarations to its header block:
      // @grant none
      // @flag noJsSandbox
      // @flags noJsSandbox
    • SANDBOX.txt contains more details
  3. API-level permissions
    • // @grant <API> is only required to use API methods that I would consider to be potentially dangerous
    • several of these API methods are grouped together,
      and permission granted for any one…
      also grants permission to use all other API methods in the same group
      1. group:
        • GM_setValue
        • GM_getValue
        • GM_deleteValue
        • GM_listValues
        • GM.setValue
        • GM.getValue
        • GM.deleteValue
        • GM.listValues
      2. group:
        • GM_cookie
        • GM_cookie.list
        • GM_cookie.set
        • GM_cookie.delete
        • GM.cookie
        • GM.cookie.list
        • GM.cookie.set
        • GM.cookie.delete
        • GM.cookies
        • GM.cookies.list
        • GM.cookies.set
        • GM.cookies.delete
      3. group:
        • GM_removeAllCookies
        • GM.removeAllCookies
      4. group:
        • GM_setUserAgent
        • GM.setUserAgent

Caveats

Legal: