3rd Party Software Library Security

I'm talking about software libraries of course, generally the 3rd party provided type.  That 3rd party could be from an open source community, a fully purchased library or a library even from previous employees or internal projects that are no longer active.

The likelihood is, that for nearly all of the internal and external software projects being run within an organisation, it's likely that libraries not created by the software project owner will be being used.  And why not?  Why bother creating yet another CSV parser, or email sender, or PNG generator, when 90% of  your use cases can be hit using a library already written?

Well, there are several areas of concern here.  Firstly, if you didn't write the code yourself, you can't testify that it meets the standards required either by the internal organisaion or your client, without going through the source line by line.  Secondly, a library built to do a specific task, will not necessarily be focused on security.  It's aim is very domain specific and the creator(s) will have just those use cases in mind.

Whilst open source libraries obviously have the benefit peer review and iterative, quick development cycles, there is the basic fact that the source is open to interpretation with any vulnerabilities open for all to see.  The flip side, obviously being that you have more developers performing code review and applying enhancements.

The biggest issue when using 3rd party libraries, is that they are more likely not to receive updates once consumed within a development cycle.  The large amount of interdependencies can often lead to 3rd party libraries remaining stagnant for a sustained period, whilst the 'home-grown' code adapts and evolves.

Whilst the risk of utilising libraries will not alter their mass consumption, there needs to be better ways of identifying and managing the risks associated with embedded library vulnerabilities.  There are several vendors that provide automated and semi-automated code scanning that can be used either from an assessment standpoint or outsourced code review approach.  This approach will only be useful if the libraries are well known and part of a complex database of known vulnerabilities.

A more pro-active approach is to engage security in the entire software development life cycle.  Whilst this approach has many benefits, the costs are often seen as too time consuming and are often overlooked.  By applying security throughout the entire development life cycle, this can often help to at least identify that issues may exist in the future 3rd party code base.  Utilising security throughout the development cycle is often most successful when the business are fully aware and can apply their own risk appetite to the development process.

(Simon Moffatt)