Ah, a Richard Stallman reference!
Absolutely a most entertaining advocate/activist for freely distributed everything…
I wouldn’t miss any of his talks.
But, you have to consider what he says with a critical mind…
People like Richard Stallman are absolutely essential to describe and advocate for utopian concepts make us think critically about what exists and what could.
But, utopians often are on shaky ground (as in this case).
For starters,
I see after his article title (Trap? Who wants to fall into a trap?) and original statement (What? Running bad things unwittingly?) a tremendous waffling and more critically, an introduction of a tangential concept (triviality). The end result is that his original premise is fatally flawed.
If anything,
I’d say instead “Don’t fall into the Javascript Trap Article.”
There are a number of bogeymen stood up in the article,
- Script source identification. This is perhaps the only item in the article I fully endorse. This used to be done all the time, but not always today. But, even without explicitly stating in the page source, I usually find identification in the script source which has to exist or the script authors might not have any claim. Nowadays, packages of scripts are generally distributed and even read from the page as a single file, and not piecemeal.
- Free vs non-free code. First, javascript will generally always run whether it’s FOSS or has a proprietary license. It’s the webmaster’s responsibility to ensure license compliance. And, of course just because it’s javascript does not imply the script is non-free. Stallman’s article does not claim the script is likely non-free, only the <possibility> without saying that it’s not likely.
-** Obfuscated code.** I do not see any obfuscated code in software.opensuse.org. For that matter, Stallman doesn’t even describe obfuscated javascript code correctly and confuses with minimizing. I guess Stallman may not know about de-minimizing applications which can make minimized code readable again. Too bad. And, this is of course possible because that’s the weakness of obfuscation vs alternatives like encryption(but that’s not an option for web page code). - AJAX. This is one of the most revolutionary methods used in web programming today, the ability to update only a part of a web page with raw data rather than having to re-draw the entire page. Well, too bad. And, at least within a discussion of possible malevolent or unknown code running in your web browser, this is a complete non-sequitur.
- Code that calls other code. Hmmm. That’s a pretty powerful method to be avoided. If you’re writing object-oriented code defining functions, this is a basic building block. Surely Stallman can’t be advocating for no OOP!
IMO a big problem with Richard’s article is that I doubt the depth and exposure he has in web page development and javascript, he would do well to join a community that specializes in those technologies to better understand strengths and weaknesses of those technologies.
Additional comment about your reference to Spectre…
I’ve posted in another thread that some current patches only address a javascript attack vector, the actual vulnerability is left unaddressed. That’s fine for the short term because PoC have been written using javascript but it should be noted that IMO Spectre should be exploitable in many different ways so blocking the javascript vector is not a real fix.
And, I’d recommend simply running “Inspect Element” on any object in any of the most common web browsers… You’ll find that even server-side javascript is displayed, so there really isn’t much that you can’t see. Of course, you’ll still need to know javascript to know what you’re looking at.
TSU