Getty Images/iStockphoto

Tip

6 common problems with open source code integration

Open source provides its fair share of benefits for businesses that put it to use. However, don't ignore these six hazards that development teams may face along the way.

For all the business benefits open source provides -- namely, the ability to customize software functionality through extensions at a low cost -- it's not without its own set of pervasive downsides. There are important security, privacy and management challenges to consider when integrating open source with internal codebases or deploying open source tools as part of organizational tool sets, six of which are absolutely critical to watch out for.

1. Managing open source security vulnerabilities

Open source software is not inherently less secure than proprietary, closed source software. However, one major difference is that, when vulnerabilities are discovered in open source code, they're much more likely to be disclosed publicly. Malicious actors often watch for these vulnerability disclosures in hopes of abusing company systems that depend on susceptible versions of those open source libraries and application builds.

This tends to be less of a problem with proprietary code, as businesses generally avoid disclosing details about vulnerabilities in their software to the public. While there are cases where a commercial software vendor may feel obligated to announce that a certain vulnerability exists, such a disclosure typically doesn't occur until after the vendor has already patched the software.

To stay ahead of this challenge, organizations that use open source must keep diligent track of which open source libraries, applications or other resources they use. This should include checking whether any known vulnerabilities exist in those resources. Tools for software composition analysis (SCA) are useful for this purpose, as they automatically scan codebases to identify any open source components that reside within and flag anything known to have potential security vulnerabilities.

2. Keeping open source software up to date

Closed source software is typically maintained, updated and patched exclusively by the software vendors, which can be a big benefit for development teams who lack the time, resources or expertise to do it themselves. Some open source platforms receive active support from proprietary software vendors, such as Red Hat Enterprise Linux and commercial distributions of Kubernetes.

For the most part, however, organizations that deploy open source software are responsible for ensuring it remains updated. Failure to do so carries the risk of running outdated code that is buggy or has security vulnerabilities. This challenge is exacerbated by a lack of centralized management consoles or automated update processes that can help ensure all the open source components in use are up to date -- something often highlighted as an advantage of paying the price for proprietary software suites.

This is another reason SCA tools are crucial for organizations that commit to the open source approach. While these tools don't provide automated update capabilities, they help the organization track what open source components exist and what each one's current version is. From there, software teams can create their own processes for auditing those components and keeping them updated. Thankfully, some open source software, such as Linux distributions, provide package managers that automatically update libraries and applications installed on them whenever new versions are released.

3. Avoiding malicious open source code

When open source code contains bugs or security problems, it's usually due to developer oversight rather than deliberate malice. That said, open source can still act as a vector for abuse by third parties with ill intent. This could include code that is, for instance, designed to steal sensitive data and expose that information through other open source channels.

The best protection against this problem with open source is to never place blind trust in the code. Instead, subject open source code to similar -- or, perhaps, even more stringent -- vetting processes used for software written in-house. It's also a best practice to avoid open source code that originates from obscure or anonymous authors. For example, code from well-known repositories, like GitHub, is usually trustworthy. However, teams should be wary of downloading open source code from random websites or repositories that are not associated with any established developer communities or organizations.

4. Not oversharing open source code

If developers within an organization use open source code, there's a decent chance those developers also contribute code back to open source projects. For instance, they may want to optimize or modify existing open source libraries or share their work with the code's original authors.

That's a great thing to do and is in line with the spirit of open source. However, this still poses the risk that software teams accidentally upload proprietary code or sensitive internal data to a public, open source repository. This can happen in many ways, such as when developers share a larger part of their codebase than they meant to or even do something as mundane as leaving comments inside code that include proprietary information about internal systems.

One way organizations can mitigate the risk of accidentally exposing sensitive code or data is to establish clear governance policies that dictate when and how developers inside your organization may contribute code to open source projects. These policies should include scanning code before it's made public and enforcing comprehensive review processes that check for potential privacy or security risks within anything uploaded to an open source repository.

5. Avoiding open source license infringement

There are dozens of open source licenses, each with different terms. For instance, some require users to credit the original authors of open source code, while others have no attribution rules.

Understanding and adhering to the licensing terms governing the code you use are crucial. This is challenging because there are countless open source licenses, each with different requirements. Beyond that, developers aren't always experts in understanding license terms. It's easy to misinterpret open source licenses, so even if a developer thinks they are using open source properly, there's a chance they may still be violating licensing terms.

Educating developers about the diversity and complexity of open source licenses is the most basic way to help mitigate this challenge. Another is to build stronger connections between development and legal teams since the latter's expertise may sometimes be necessary to help clarify license and fair use requirements. Finally, it's critical to keep track of all open source components and the licenses associated with them -- another area where SCA tools come in handy.

6. Standardizing open source security policies

When it comes to problems with open source, many organizations struggle to establish and enforce clear, consistent policies that govern the use of open source code. When left to their own devices, different developers may adopt different norms or practices when using open source, and it's hard to achieve standard policies.

There's no simple solution, but one practice that helps is directly addressing open source as part of the organization's overall IT governance rules. Considering setting rules that dictate things like the following:

  • How are developers allowed to use open source? For instance, can they incorporate open source code into certain mission-critical codebases, or can they only use open source tools in a standalone fashion?
  • Minimum requirements for how often teams should run scans on a codebase to identify open source components within them and ensure they are up to date.
  • Whether developers can use any open source code they want or only use code governed by specific licenses.

Whichever rules you set, the most important thing is to consistently apply that open source policy across the entire organization. Doing so ensures you don't manage open source code in a haphazard or ad hoc fashion.

Chris Tozzi has worked as a journalist and Linux systems administrator. He is particularly interested in open source, Agile infrastructure and networking. He is senior editor of content and DevOps analyst at Fixate IO.

Dig Deeper on Enterprise application integration