We like to spread the word of Node.js and the incredible things it can do by profiling creative, interesting and fun uses of Node.js in various products and projects. We call it “In the Loop.”
This time around, we are looking at The Node Security Project. This project asks: “We believe that the node.js core is well audited, but what about the modules on npm?”
To ponder this question more fully, we spoke with Adam Baldwin. Read his bio before you react to the name. Here’s what he had to say about himself.
“I’m the team lead at Lift Security where I get to hack web apps and the CSO at &yet where I get to help an amazing team of developers build web apps (yes it’s a bit jekyll and hyde and I love it). The rest of my time is spent being a husband, father, and correcting people that think I starred in Firefly and Chuck.”
Can you tell us about the Node Security Project?
Adam Baldwin: The node security project is an ambitious (some might say impossible) project to assess the security of the modules published on npm. A lot of security projects stop at “let’s find all the vulns.” I really want this to be a positive experience with getting vulnerabilities fixed, enable developers to know when they are using a module that may introduce vulns in their environment and most of all help educate node.js developers about various security topics.
You want to audit every single module in npm. Can you explain how you developed this goal?
Adam Baldwin: As the CSO at &yet it’s part of my job to think about ways in which the software we build can get compromised. We trust a lot of third party code. I could have stopped there and just audited what we use, but I wanted to have a bigger impact on the community.
You are quite open on your web page, telling everyone “we need your help”. Can you put your goal into perspective? How many man-hours might this take?
Adam Baldwin: Specifically we need the help of security researchers to validate vulnerabilities and we need the help of developers to write patches for projects that have been long abandoned or the project needs help fixing the bug. This isn’t a point, laugh and move on security initiative, we really want to make things better.
Also at the time of writing this there are 50 875 28,254 modules and that number is growing fast. There is just no way one person can audit this much code. It has to be a community effort.
Another way to look at this is the fact that it will never be done. Security just doesn’t work that way. It’s a continual process of building, assessing, improving and so on.
Have you audited any of the modules yet? Can you share any details about the initial results?
Adam Baldwin: We are taking a bit of a different approach and we aren’t auditing one module after another for all the things. We are looking at a specific pattern across the entire module base. This way we can refine that pattern and apply it to new modules and updated modules in a more automated fashion to try and keep up.
The auditors are currently working through the first initiative, child_process.exec. Which if used improperly can allow for command injection. At last count we have found 9 vulnerabilities. In one day.
How important is this project to the growth and future of Node.js?
Adam Baldwin: I can see this project helping with enterprise adoption. If we find a lot of things, we get a lot of bugs fixed, if we don’t find much, one might attribute that to the level of code being produced by the node.js community. Another is to empower developers to know if a module they are using contains a known problem. This isn’t about creating trusted modules, just that we have looked for certain things and hopefully empower developers.
What’s the initial interest in this project been like?
Adam Baldwin: Amazing. Both from the node core community and from security researchers. I’m very grateful.
Why the focus on Node.js? Could this have been directed at any language?
Besides the security project, is there anything else Node.js-related that you are working on?
Adam Baldwin: I maintain the helmet project, an express middleware for security headers with secure defaults. I also help with development and security on And Bang, a team samepagification app built on node and redis.
Thanks for discussing this important project with us. We look forward to watching its progress!
- If you have a cool Node.js project or product you think we should profile, click here to tell us about it.
- If you don’t have a cool Node.js project yet, we’ve made it easy to build your next mobile app with a Node backend either locally or on your favorite cloud with simple npm install. Get Started >>
- Want to read more articles like this? Check out past “In the Loop” profiles on CasinoRPG, FlightOffice.com and the 365 Project.