Would it be possible to implement a functionality whereby specific sites can execute SPECIFIC pre-approved scripts? For example, the pre-approved script could be stored as a .js file in a "whitelist" folder, and would be linked to a specific domain (or subdomain or even a single page), and in order for that page to execute the script it would have to a) be stored entirely as a separate .js file on the server (no inline code) and b) have to be EXACTLY the same as the script file in the whitelist folder.
There could even be three different "modes": Strict, where everything (including comments and spacing) has to be EXACTLY the same, Normal, where the "minified" form of the script has to be the same as the minified form of the whitelist script, and possibly Loose, where the script simply requires to be signed by a valid signature for a pre-approved public key.
Feature request - pre-approved scripts
Feature request - pre-approved scripts
Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0; ARM; Touch; WPDesktop)
Re: Feature request - pre-approved scripts
I think you would be better off blocking the JS in question with ABE rules, then executing your local file(s) on the page in question through either NoScript surrogates or Scriptish, depending on your needs.
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:25.0) Gecko/20100101 Firefox/25.0 SeaMonkey/2.22
Re: Feature request - pre-approved scripts
This sounds somewhat like an earlier request for a mode where NoScript would warn you if scripts change for a whitelisted site.
There are two problems with it:
There are two problems with it:
- NoScript blocks scripts from being downloaded, so at the time it's making a decision, it doesn't know the script contents.
- The NoScript trust model is "trust = accountability" (FAQ 1.11). If you would be able to sue the site (or hold it accountable in some other way) for hosting malicious content, then you don't need to verify signatures of scripts. If not, then it's not really a trusted site.
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.
True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.
True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:25.0) Gecko/20100101 Firefox/25.0
Re: Feature request - pre-approved scripts
Maybe if SubResource Integrity ever gets off the ground, that would make this more feasible.
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.
True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.
True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0
Re: Feature request - pre-approved scripts
Update: this is coming for scripts and stylesheets, at least, in Firefox 43.
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.
True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.
True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0