On 11/30/15 6:24 AM, Gijs Kruitbosch wrote:
> On 28/11/2015 19:42, Dan Stillman wrote:
>> As for what, if anything, should block release without override, I'm
>> happy to talk specifics, but we can't have a discussion about that
>> without even agreeing on the point of the validator,
>
> Why do we have to agree (and who are 'we'?) on the 'point' of the
> validator?
Because we're having a discussion about policy, and you can't make good
policy without understanding its goals, and actual capabilities have an
effect on whether those goals can be attained?
> For all we know you obfuscate all your code and use eval(btoa(...))
> all over the place.
Zotero has been manually reviewed and approved countless times,
including a month ago. Our ability to get approved is not the issue here.
> In any case, if you want to insist, here's my view: the point of the
> validator is to raise the bar for both malware and for trivially-found
> security holes in otherwise benign (or seemingly benign / greyware, if
> you assume collusion between the 'benign' add-on submitted and the
> website that will use that add-on's security hole for privilege
> escalation of their website / remote code) add-ons. Raising the bar is
> helpful so that editors don't waste time reviewing script kiddie or
> copy-pasted / metasploit-style submissions of bad add-ons (assuming
> the validator gets updated consistently, anything with 0 creativity
> compared with a previous submission should be detectable in some way).
An initial manual review, which I suggest in my post, would slow down
script kiddies.
Blocking known malware signatures, as I've said is an option, could
perhaps stop extremely lazy copy/paste jobs.
The scanner does not otherwise "raise the bar" — that's the point.
Anyone else who wants to release malware has already spent much longer
creating the extension, waiting for an initial review, and writing the
malicious code than they would bypassing the validator, which requires
either literally no work (Example 1) or a minute of work (Examples 2/3,
dynamically generated properties to get to eval or anything else).
As for trivially found security holes, I don't believe that blocking
ambiguous but possibly perfectly legitimate code patterns justifies
blocking releases of front-loaded unlisted extensions. These will be
flagged, and if AMO editors reviewing the code after the fact (even in
the same ~4-day window) feel the developers are ignoring legitimate
security issues, they can temporarily require manual review for updates
until the issues are fixed, with the threat of a version blocklist
depending on severity.
Note that after-the-fact reviews would still benefit from all the same
reviewing features that have been or are being built, such as the
ability of reviewers to whitelist specific instances of code patterns so
they're not repeatedly shown to the reviewer.
> The validator won't be able to defeat a concerted malicious actor by
> itself, and we should therefore manually review all add-ons in
> addition to what the validator does. Yes, that means delays for
> everyone. I personally do not believe that's avoidable if we want to
> make any kind of useful guarantee about the add-ons.
I'm pretty sure manual review of all extension updates was dismissed as
unrealistic a year or so ago, and I don't think you can argue for it
without misunderstanding (or not caring about) the needs of many
unlisted extensions and the reasons they're unlisted to begin with. It
would drive many developers away from the platform. It's also far from a
safety guarantee, as Ehsan has explained — tricking a human reviewer is
certainly tougher than bypassing the automated scanner, but it's still
pretty easy. In an extension of any significant size, it would be trivial.
> For AMO-based add-ons, the validator should additionally help people
> deal with Firefox code changes to interfaces, e10s, etc.
We're not discussing AMO extensions. But these benefits would apply to
unlisted extensions too without forcing manual review. If we operate
under the assumption that many/most extension developers are
conscientious (which perhaps you're not willing to do), that's a real
benefit.
>> In my view, if the scanner can be trivially bypassed by malware authors
>> and is just an advisory tool, there's no justification for blocking
>> release.
>
> Can we be specific, please? Release of new add-ons? Updates? Both?
> Just AMO add-ons? Frontloaded and sideloaded non-AMO add-ons?
I think I've been pretty clear on this. I don't think there's a
justification for blocking updates to front-loaded unlisted extensions.
I've suggested an initial manual review of front-loaded unlisted
extensions, but that's only to prevent id churn.
>> It should be seen as a linter, providing conscientious
>> developers with an opportunity to fix potential (but rarely unambiguous)
>> issues and flagging them for later review by AMO editors. If AMO editors
>> feel that developers are ignoring legitimate security issues, they could
>> temporarily rescind the ability to publish without review. Essentially,
>> I'm calling for whitelist-by-default.
>
> As I've said before, I think this provides no improvement over the
> pre-signing era. If we allow just anyone to register as a new
> developer with a throwaway email address and automatically get
> whatever kind of rubbish signed, with an API to do that to boot, I
> don't see what the point of signing would be. Getting post-facto
> blocking in place for those add-ons is of comparatively little use if
> (a) by that time the add-on can e.g. stop Firefox updating and/or
> fetching the blocklist; (b) people can resubmit the exact same thing
> with a different id and get signed - all fully automatically (note
> that you're saying that the validator shouldn't be allowed to stop
> signing, so even if we had patterns of bad add-ons encoded in the
> validator, this would be possible).
I've suggested an initial manual review to reduce id churn and said you
could block known malware signatures if you thought it would be useful.
But this is what's crazy: you're still arguing that automated signing
can stop someone from attacking the Firefox blocklist, or anything else!
Pretty much everyone else on this list has acknowledged that, no, it
can't do that — it can't stop someone from doing anything, trivially.
Enforcing add-on ids, having a record of code to review, forcing manual
review of side-loaded extensions: these are useful improvements from the
pre-signing era. You have to take what you can get.
>> And yes, using the automated scanner to try to combat malware is, in my
>> view, security theater: "the practice of investing in countermeasures
>> intended to provide the feeling of improved security while doing little
>> or nothing to actually achieve it" [2]. It may be a harsh assessment,
>> but I don't think it's unfair.
>
> It is unfair when people have repeatedly pointed out that it has
> actually achieved improved security. Perhaps not by as much as you
> would like (ie not enough to dispense with manual review), but it
> raises the bar.
Who has made that claim, and where? I haven't seen anyone argue that
automated scanning as it exists currently has stopped malware. It would
be a bizarre claim to make, given that signing isn't even enforced yet.
>> I don't know how many extensions are being flagged for manual review,
>> true.
>
> This seems like something we should be able to get data about. (I do
> not have such data.) Have you asked anyone?
If it's only Zotero that's affected by this, then we should have been
whitelisted three months ago when we first asked about it. That would've
left Zotero users — and only Zotero users — in the exact same situation
they've been in for the last decade (or theoretically a little better,
by virtue of AMO having a copy of the code). If it's other extensions —
say, the other extensions I see in the unlisted review queue counter
while waiting days for approval — then it's affecting more people, with
who knows how many millions of users behind them. There's also an
opportunity cost: if the process is too onerous, no one is going to
bother trying to build the next Zotero on this platform.
Either way, if you can't actually accomplish the stated goal of
automated signing — combating malware — why would you insist on impeding
any legitimate developers?
> You have also dismissed all suggestions that you could fix at least
> some of the issues the validator flags up (as noted above, I don't
> know what all of them are, so I don't know if *all* of them are
> fixable, though that seems likely enough to me), and that in case of
> "emergency" fixes, you (and anyone else to whom this would apply)
> could email the amo editors list to get an expedited review. We have
> reviewers in a number of timezones, both paid and volunteer, and so
> response times are usually pretty quick.
I've addressed both of these.
We're flagged for things like nsIProcess, js-ctypes, evalInSandbox, safe
and unavoidable uses of innerHTML, checks for "about:blank", and various
other things. So no, we can't rewrite them. (I mean, we could rewrite
them to bypass the validator, but I assume that's not what you mean.)
Not to mention that the validator can't even run on Zotero without
timing out, as has been the case for most of the last four years, though
I assume that will be fixed with the new JS version. As I've said, if
this was just a matter of rewriting some
setTimeout(ZoteroPane_Local.updateToolbarPosition) calls, we would do
so, but that wouldn't fix the problem.
As for emergency fixes, as I've explained, every minute that a version
with a critical issue is available means hundreds more people — who rely
on Zotero for time-sensitive work — will be stuck with the bad version
for days. If it's a less-than-critical issue that's nevertheless
impeding users' work, we'll often have a beta version available for them
within minutes. We're not going to put ourselves in a position where
we're frantically emailing amo-editors at 3 a.m. on a Saturday night
begging for them to let a bug fix through. We'd just leave the platform.
Here's what you seem to be forgetting: we don't have to develop for
Firefox. Many people appreciate our full-featured Firefox version — our
original version, and why we're on the Mozilla platform to begin with —
and would be very sad to lose it, but they'll use Zotero regardless.
They come to our site and download Zotero, and have for the last decade.
If we say that, because of Mozilla's policies, we're no longer able to
provide what we believe to be an acceptable level of support for our
full-featured Firefox extension, they'll use our standalone version and
one of our lightweight browser extensions. Based on current browser
statistics, they'll probably do so in a browser other than Firefox. As
far as we can tell, the majority of Zotero for Firefox users use Firefox
because of Zotero rather than the other way around.
If you felt losing an extension like Zotero — and losing many of its
users to other browsers — was worth the benefits provided by the
automated scanner, that would be one thing. But it's just bizarre and
sad that you'd be comfortable losing Zotero or other ambitious
extensions, and so opposed to the alternatives I suggest, in light of
clear evidence of just how useless the scanner will be in actually
protecting users.
> What we haven't been willing to do is dispense with automated and
> manual review altogether.
Neither of which I've suggested. I've said that automated review
shouldn't block release of front-loaded unlisted updates, and that, for
flagged issues in legitimate extensions that won't try to bypass the
validator, manual review would be just as effective after the fact as
before.
By the way, I do appreciate that you actually proposed whitelist rules
on the AMO list. I've now shown that even the idea of a tightly
restricted whitelist doesn't make sense, since whitelisted extensions
wouldn't be able to do anything that non-whitelisted extensions couldn't
trivially do, but if some of your colleagues had actually moved forward
with your suggestions, things probably wouldn't have gotten to this point.
- Dan