1

When checking third party libraries used in package.json and build.gradle files with tools such as Snyk, they allow the option to check for devdependencies. A lot of the time there is vulnerabilities for these dependencies. But if they are not shipped and only used for testing is there any risk with not updating them?

This Snyk blog says that "dev dependencies matter little". So I am looking for confirmation that this is the case, as they are not tested by default.

1

They matter. Not updating libraries and dependencies will leave your software vulnerable. Each one of the libraries is part of the attack surface.

Unless an update breaks your code, update as soon as the update is available. If the update breaks your code, patch the code and update. But never leave any outdated library with security bugs in your projects. Even if used only for development. If one day you forget to disable them, you are in danger.

  • This isn't a very compelling argument. Dev dependencies typically aren't even installed in production. – Ajedi32 Oct 4 '18 at 16:25
  • Usually they are not. But it takes one forgotten Makefile to bring outdated libraries to the release version. – ThoriumBR Oct 4 '18 at 16:59
1

That depends on what the dependencies are and what they're used for.

Even if a dependency isn't used in production, if it's used as part of your build process, for example, then its possible that it might contain a vulnerability that affects your production code.

Similarly, a vulnerability in a development tool could potentially allow attackers to compromise your development PC if that tool processes untrusted input data or connects to remote servers.

So while it may indeed be true that most "vulnerabilities" in development dependencies don't have any notable security impact, unless you're manually assessing each identified vulnerability to determine its impact on your project its probably best to just keep everything up to date. There's little downside, and newer versions of development tools usually have lots of other benefits besides just better security.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.