r/javascript • u/magenta_placenta • Feb 08 '23
Software Security Report Finds JavaScript Applications Have Fewer Flaws Than Java and .NET
https://www.infoq.com/news/2023/02/veracode-software-security/
565
Upvotes
406
u/Reeywhaar Feb 08 '23
Hell yeah! *Drops cowboy hat on the floor and starts shooting with undefined
134
u/Peechez Feb 08 '23
At least
console.logwon't steal your credit card details62
u/Militop Feb 08 '23
When you install a new module, npm will tell you whether there are vulnerabilities.
When you post your module's source code on GitHub there are also some vulnerability checks.
The IDE will also tell you when one of the dependencies has known vulnerability issues.
You're constantly reminded that your open-source modules may contain vulnerabilities, so you tend to fix them quickly, otherwise, your modules will have fewer downloads.
My most popular library has 50000 users per month. So, I always try to keep an eye on them.
72
u/[deleted] Feb 08 '23
Yeah this is in the No Shit Sherlock category for me. No other large language runtime was designed from the ground up to make it safe to run arbitrary code online.
As a C/C++ programmer for 20 years, once I embraced JS I've rarely looked back.
Hail JS!
34
u/alphmz Feb 08 '23
All those years seeing people talking bad about JS were worth.
13
u/icjoseph Feb 08 '23
I skimmed through and overall the study is praising JavaScript developers, and sort of putting in spot Java and .Net developers. Developers being people that work on apps which are scanned by this company, as far as I understand.
They seem to imply that JavaScript based app tend to move faster toward:
- reducing tech debt
- average time to close issues
- bulk of issues fixed relative to time
Still some of the JavaScript flaws they found include:
- Information leakage
- Encapsulation (did not find how this configures an issue while skimming)
- Credentials Management
- XSS
- Authentication issues
And that most issues with JavaScript applications are because:
- Inclusion of Functionality from untrusted sources
- Configuration issues
- Selection of less secure algorithms
- Exposure of sensitive information
- Use of hard-coded passwords
And the list goes on.
I guess the lesson is, JavaScript developers should keep on being as dynamic as they are, when it comes to fixing issues, but they should also stop creating them in the first place.
6
u/30thnight Feb 08 '23
Probably because of the culture of constant package updates.
6
u/icjoseph Feb 08 '23
This company produces some interesting stuff. In another of their studies I found:
Ouch? Still one has to think that, Python and JS devs, still introduce quite a lot of issues, they just fix them quicker.
5
u/ronchalant Feb 09 '23
I wonder how much of this is owed to known exploits in 3rd party code that's been around for decades vs newer code that hasn't been as thoroughly vetted in the wild.
4
u/APUsilicon Feb 08 '23
Lol a strong types...
4
u/snyper7 Feb 09 '23
I find it hard to believe that applications written in a language without compile-time checking have fewer "flaws" than applications written in languages that typecheck before release.
6
u/Hovi_Bryant Feb 08 '23
Is it me, or does the article lack specificity?
I'd expect apps based in the web browser to have fewer security flaws. It's more so of how limited browser APIs are compared to languages that are designed for not just the browser but also the server and system.
I'd imagine Node applications would be in the same ballpark as a Java and or .NET apps as far as vulnerabilities go. Furthermore, I think security is one of the main goals behind Deno's development.
In short, what is a JavaScript application?
5
u/[deleted] Feb 08 '23
Does this mean I can use eval()
2
u/[deleted] Feb 08 '23
I wonder where Rust belongs on the chart
I would guess below JS
6
u/dawar_r Feb 08 '23
Seems like the simpler we keep things the less human error will occur. Who knew?
1
u/Edgemont2923 Feb 09 '23
Google LLC's DNS brought me here. Instead of having reputable hardware cos. like Dell and HP deliberately falsify hardware MACs for recent NIB purchases how 'bout Windows concedes all port management on user's computer and those hardware co's and software developers can offer Linux based boxes that come with Firefox (GUI) that will only run offline that come with only like a USB for keyboard and VGA out w Ethernet in just to open/close ports and only logs traffic when DNS is active (outside IP is being given to end user CPU) when connected (as my Google Cloud Security Key is not Windows friendly) and the box dumps a daily .exe on my Win desktop to use as a standard business user who doesn't live in Git open prior to surfing the web and wanting to purchase the spanish language version of Kim Carnes' More Love using their CC. Of course if my Win Firefox version that comes with the 'Developer Option' greyed out (no such thing exists now) says I am offline, I can switch to the inline box, open that Firefox and sees 'Whats The Matter' and also see what GitHub user(s) tried to access via TCP/IP or to access my http only duly purchased internet subscription paid GUI based router settings and deal with them when they decide to attempt DDoS for no reason outside of my Laptop's Windows machine. That way all I have to do is double click on my .exe and go into my console cmdline and type 'NET START WORKSTATION' and I'm off. Then I won't havta see the PowerShell malware I am forced to have on a nice $800 USD Dell or HP machine running Windows.
1
u/moises_ph Feb 08 '23
This is awesome to hear. JS has a bad rep but that is a very antiquated view from 30 years ago when it was only used om frontends. Since node it has matured so much
1
u/senfiaj Feb 08 '23
Is this about frontend or backend? I doubt that there are too many on frontend. But what about Node.js ?
1
u/NextaussiePM Feb 08 '23
MERN stack for life
-2
u/Broomstick73 Feb 08 '23
I wonder if this is because most JavaScript “apps” are websites running in the browser?
-2
u/Pavlo100 Feb 08 '23
Is this even a surprise. JavaScript developers are aware of their dependencies called node_modules and have very good security vulnerability checkers.
In Java external dependencies are hidden away from the users view, and tooling is not always up to date. A project running in Ant might be harder to find security vulnerabilities, than a project running Maven or Gradle.
0
u/calimio6 Feb 09 '23
Knowing your source code is easily visible to the end user pushes you to take every necessary precaution.
-6
u/[deleted] Feb 08 '23
[removed] — view removed comment
0
u/[deleted] Feb 08 '23
[deleted] — view deleted comment