You are on page 1of 7

Open Source Software Audits: Why,

When, and How to Conduct an Audit

Contents Background. . . . . . . . . . . . . . . . . 2
Why it’s Important to Know What Open Source
Software You Use . . . . . . . . . . . . . . 2
Why You Need to Care. . . . . . . . . . . . 2
What is an Audit? . . . . . . . . . . . . . . 3
When to Audit. . . . . . . . . . . . . . . . 3
Preparing for an Audit . . . . . . . . . . . . 3
Assembling the Team. . . . . . . . . . . . . 3
Scanning for Open Source. . . . . . . . . . 4
Analyzing Open Source License Compliance . . 4
What You Get From an Audit. . . . . . . . . . 5
After the Audit. . . . . . . . . . . . . . . . 5
Compliance Best Practices . . . . . . . . . . 5
Open Source Software Audits April 2011

N
o matter what industry your business is in, your
company is almost certainly using open source
software. The question is whether you know how
you’re using open source, what licenses are in play,
and whether you’re meeting all of your license requirements. If
you can’t answer all of these questions — and most businesses
can’t — you may want to perform an open source audit.
Why? An audit can answer the question of what open source
software (OSS) is present in your code and what licenses that
OSS falls under.

About OpenLogic’s Auditing Solutions


OpenLogic offers a variety of products and services that help
enterprises understand what open source they use and what to do
to comply with open source licenses:
• Application Audit service
• Application Certification service
• M&A Open Source Audit service
• Open Source Fulfillment Center service
• OSS Discovery binary scanner
• OSS Deep Discovery source code scanner
• OpenLogic Exchange (OLEX) License Compliance

www.openlogic.com Page 1
Open Source Software Audits April 2011

Background policies. Because there’s a direct cost involved in acquiring


proprietary software, someone in IT needs to request budget for
Open source is a broad term used to encompass a wide variety the software, it needs to be approved by his or her manager, and
of licenses. Generally, open source licenses allow redistribution it must move through accounting just like any other purchase.
and modification of the work and do not place restrictions on In short, you have a paper trail and policies in place that should
fields of use. The Open Source Initiative (OSI) is a community effectively help track what proprietary software is in use.
organization that reviews and approves licenses that meet the
Open Source Definition (OSD). Many of the most popular open What about software that’s free to download and install? Open
source licenses are OSI approved. source is popular with IT departments not only because it tends
to be flexible, reliable, and powerful software, but also because
Some of the most widely used open source licenses are the steps to acquire open source present fewer hurdles to
described as “copyleft” licenses. The GNU General Public solving problems. Indeed, you may not be aware of all the open
License (GPL) is the most well known of this type of license. In source that developers in your company have downloaded. If
general, the purpose of a copyleft license is to require modified you have no open source policy, the likelihood of untracked
and extended versions of the open source software to be free as open source usage is even greater.
well. Copyleft licenses, also referred to as reciprocal or “viral,”
generally require you to make source code available and to This is not to say that your company should make it more
release any derivative work under the same license. Because difficult for IT to deploy open source software. Instead, an
copyleft licenses can impact the licensing requirements of your audit is an opportunity to learn what’s running in your business
own intellectual property, it is important that you understand and to effect policies that ensure that it’s being done with full
where those licenses are being used in your software. consideration of the requirements.

It is also important to keep in mind that not all open source License requirements are, of course, a consideration. Litigation
licenses are compatible with one another. Some licenses, like has become a real risk in the last few years, since the Software
BSD-type and MIT licenses impose very few requirements on Freedom Law Center, a non-profit organization, has filed suit
those distributing the software, making them compatible with against some high profile companies for non-compliance with
other open source or proprietary licenses. the GPL license.

To ensure that you’re compliant with any open source licenses, Finally, your company may need to provide evidence of its
now and in the future, you first need to know what software is in open source software usage to comply with other companies’
use in your business. policies. Your customers may want to know what software is in
use when receiving services. If you have contracts with local,
state, or federal government entities they may have regulations
Why it’s Important to Know What Open that govern what software can be used. Depending on your
Source Software You Use industry, you may even have regulatory requirements to know
what software you are using.
There are a number of reasons you need to know what software
your company uses. These reasons can include the need to
obtain support or maintenance, comply with internal policies, or Why You Need to Care
provide an audit as a requirement by external parties – such as Since many license requirements hinge on distribution, it’s easy
in the case of mergers and acquisitions. You also need to know to assume that they don’t apply to your company – even if you’re
what software you have in order to comply with their licenses. modifying software for internal use only.
When you use proprietary software, support and maintenance But distribution may be broader than you think. Even if your
(updates, security fixes, bug fixes) all come from the vendor. business is not selling software or support for open source
You need to be aware of their policies, which will largely dictate outright, you may be distributing software. The most obvious
when you upgrade, what you should budget for support, and example of this is companies that are selling devices that
how maintenance will be addressed. Open source projects, on embed open source software. But you also could be distributing
the other hand, are usually available “as is.” As open source software when you supply a contractor, partner, or customer
software has become more ubiquitous, outside vendors have with software. Providing open source software to anyone
stepped up to provide support. However, in order to make a outside your company could constitute distribution that could
decision on what support is needed you need to be aware of trigger the terms of the GPL or other reciprocal licenses.
what open source software is running in your business.
Distribution could also be triggered by selling a subsidiary or
How could you be unaware of the software running in your part of your business. Selling part of your company may not be
business? This comes down to whether your IT department an everyday occurrence, but with larger enterprises it is a part
is in compliance with your company’s software acquisition of business that you need to plan for.

www.openlogic.com Page 2
Open Source Software Audits April 2011

What is an Audit? Another possible trigger would be if your company is seeking


financing — whether by taking on debt or by issuing public
When many people hear about audits, they think of the Business shares. If issuing public shares, your company may have a
Software Alliance (BSA) and its infamous auditing process for responsibility to disclose its use of open source or any liabilities
proprietary software. However, an open source audit is nothing that may arise from the use of open source. If engaging with a
like this. An open source audit is an entirely voluntary (but lender, they may wish to know at a broad level what liabilities
recommended) process to find out what open source software your company has or if open source is a material part of the
your company is using, and under what licenses. business.
This is sometimes referred to as a “package review.” Note that
“package” or “project” refers to a piece of software, usually Preparing for an Audit
downloaded as a single compressed file and may include any
number of files or subdirectories. For example, this could mean Conducting an open source audit requires preparation, just like
a software package as an installable unit in an RPM or Debian any other form of audit. Here, though, you won’t need to gather
package, or a particular project like Apache or JBoss. receipts and expense reports, but rather the source code for the
software that’s in use.

When to Audit Start by getting a list from your developers of all of the open
source software they have used. This list is likely to be
If you’ve never performed an open source audit for your incomplete, but will help you as you proceed with the audit.
business, there’s no time like the present to begin. But there are Next, you need to get the code for any software that you’re
specific events that may, in particular, trigger the need for one. building and distributing or are likely to distribute. Be sure to
For instance, if your company is going to distribute any product include all code that will be distributed as part of the product
that utilizes open source an audit should not be considered or with the product, whether modified or not. Remember that
optional. Keep in mind that your business distribute a product you’re not only looking for software that may have problematic
that is not software but contains software (possibly even licensing or where you might have compliance issues; you’ll also
unbeknownst to you). For example, most consumer electronics want to get a full assessment of the software you depend on to
today contain software. You need to ensure that your company ensure there are no other business considerations.
complies with the licenses of any and all software that it ships. You can exclude anything that is not shipped or distributed. This
This is particularly true if your business relies on any means, for example, if you’re using a compiler such as GCC to
components that come from third parties. Whether it’s software build your software, it’s not necessary to audit GCC or your build
libraries or embedded components with firmware, you should system unless you’re also distributing that. Note that you may
ensure that you have a full accounting of the software being need to provide build installation instructions or scripts in order
used in the product and that the license obligations have been to comply with some licenses (like the GPL) if they’re required to
fulfilled. A number of companies have suffered bad press (at a build the final package.
minimum) or worse, faced legal action, because their products
incorporated open source software that was not distributed in Assembling the Team
compliance with the license.
Next, you need to get your company’s team together to
The reverse of this is also true — if you’re in the business of participate in the audit. This is crucial, as you will want to have
supplying software to another company for inclusion in their the right people with the necessary expertise involved.
products, they’ll likely wish to know about any use of open
source in the products. First, you’re going to need one or more members of the
engineering team who can answer the technical questions —
Another triggering event for an audit may be a merger or how components are linked, how the build environment works,
acquisition. If your company intends to acquire another, you will specific versions of software in use, etc.
likely want to perform an open source audit as part of the due
diligence process; indeed, this is becoming increasingly common. You will also need legal expertise as part of that audit. If your
Otherwise, the acquiring company could pick up liabilities that it’s organization has an internal legal team, choose someone from
unaware of. It also helps assess the IT practices of the business that team who is familiar with open source software licensing.
and how they will mesh with the new company. Similarly, if your If your business doesn’t have a legal team, or your legal team is
company might be acquired in the future, it is prudent to have not familiar with open source licensing, you may need to engage
an open source policy and an on-going audit process instead outside counsel.
of waiting until an acquisition offer. Finding undisclosed open You’ll also want to have representation from someone in
source during M&A due diligence has the potential to reduce the management who understands the business issues and can
purchase price or even cancel the transaction. set the expectations for the results of the audit. Maybe the

www.openlogic.com Page 3
Open Source Software Audits April 2011

primary focus of the audit is license compliance. Maybe the few false positives as possible. Because open source projects
focus is on discovering exactly which technologies are in use often reuse libraries and code from other open source projects,
and how to ensure policy compliance. Maybe the focus involves automated scanning tools may not be able to perfectly identify
a mix of all of the above. An audit may uncover issues where the original provenance of open source code. As a result, some
there is no clear black and white answer, so your management scanners can produce a large number of matches, many of
representative should work with legal to assess the company’s which are incorrect or redundant. Too many false positives
risk profile in order to make decisions about how to respond to means a lot of wasted time in reviewing and understanding the
results of the audit. scan results. OpenLogic’s scanning tools help address these
Lastly, you may also wish to have someone involved who can issues by using a variety of “noise reduction” techniques that
provide the open source community perspective. Open source help you zero in on the correct matches.
projects that your company is likely to use often have a strong When doing a scan, you may also run into situations where
community of developers. Understanding the perspective some code may not be licensed at all or may not have an
of these communities can be a factor in your compliance obvious license. The reverse is true as well: scanning may
efforts. How your company works with these projects — and turn up licenses that don’t seem to be assigned to code at all.
whether it’s contributing back — can be nearly as important In other cases, you can find multiple licenses within an open
as whether you’re complying with the license. Even if a license source project that are in conflict with one another — that
doesn’t require contributions, you may want to look at policies is, you cannot meet the requirements of both licenses. These
regarding contribution and decide that you will officially have situations will require additional research and investigation to
developers submit upstream. Alternatively, you may find that determine the licensing for the code. In some cases you may
your developers are already contributing, which may have legal want to contact developers from the original project to clarify
or policy implications for your company as well. the licensing, if necessary.
If you’re using a service or vendor to assist with the audit, you
Scanning for Open Source will want to know about the tools and process that vendor
Once you have your team put together, you can begin the audit. follows. You may have the option to do an audit at your business
As previously mentioned, you have the option to audit source location or to provide the code to the vendor to complete the
code yourself or to hire a vendor to do the audit for you as a audit in their offices. In the case of an audit done at the vendor
service. In either case, you or the vendor will likely want to make location, you will want to understand the “chain of custody”
use of automated scanning tools. One thing that many teams for handling the code while it’s being examined. If the audit
want to know is how automated scanning tools work, since was triggered by an external event, such as an acquisition or
these are somewhat different than self-reporting or doing an the need to provide results to an OEM partner, you’ll also want
audit “by hand” by just looking through source code or using to specify who you want to see the results of the audit. For
basic string search tools such as “grep”. example, in the case of an acquisition, the acquiring company
may receive a copy of the audit as well. Lastly, if you are using
Most scanning tools use a number of methods to see if code a service provider for the audit, you’ll want to understand what
in your product matches known open source projects or warranty or indemnification is provided to back up the report
libraries. A scanner does this by comparing your code to a large provided.
repository of “fingerprints” of hundreds of thousands of known
open source projects or libraries. No repository is going to have
everything, but the size of a tool’s “fingerprint repository” is one Analyzing Open Source License
factor in the completeness of the audit. Requirements
Another important factor is the techniques used to find the Once the scanning and discovery phases of the audit are
open source code. For example, OpenLogic’s scanning tools completed, it’s time to sort through the licenses and determine
can identify open source that is used regardless of whether it what terms are triggered. This is where the legal team is going
is an entire project, a single file or a snippet of source code. to need to look over the licenses that have been identified
The tools can even detect source that has been modified — for and discuss with engineers how the projects are used. When
example by removing file headers, deleting or changing code. analyzing a license, you can break the license down into a series
OpenLogic’s tools will search for things like the name of files in of “if-then” statements. For example, a license may include
the project, pathnames, license text, or names in source code. something like the following: if you distribute this open source
In addition, the tools look for hash codes for files and whether software, then you must also distribute a copy of the license.
blocks of source code match known projects. Your legal team and development experts can then determine if
The flip side of trying to find all possible places where your you are using the open source software in a way that triggers a
code contains open source code is ensuring that there are as particular requirement.

www.openlogic.com Page 4
Open Source Software Audits April 2011

Once you know that a license obligation applies to your more licenses in a way that isn’t compatible. Simply because
particular use of the software, then you must determine how the licenses are open source does not mean that they are
to fulfill the obligation. It’s important to understand the details compatible with one another. All of this information can then be
of how to comply. For example, you might know you need to used to ensure compliance with your license requirements or
distribute the source code, but the license may require the make the necessary adjustments to your code as needed.
source code to be provided in a particular way. Making the
source code available, but failing to do so in the way dictated
by the license may still be considered non-compliance. In
After the Audit
some cases, the meaning of certain clauses may be open to The end of the audit may only be the beginning. The next step,
interpretation. regardless of whether you find any problems, is to create a
compliance checklist. Things to think about include ensuring
Although many open source licenses are fairly straightforward, that all required notices are provided in your code and/or
they also present their own set of challenges. Most open source documentation; providing source code or having it available
licenses were not written by attorneys and do not track typical when required; and ensuring that any end-user license
statutory or contract language. Some license requirements agreement for your product is compliant with the licenses in
trigger off of particular engineering scenarios, requiring both question. Going forward, you can be proactive about cataloging
a legal and developer perspective to ascertain the meaning. open source usage and auditing to enforce compliance and spot
Although lawsuits have been filed regarding compliance, minor discrepancies.
almost all have settled. Consequently, we have no judicial
opinions regarding the interpretation of the more vexing license You may need to find an alternative to any code that presents
compliance issues. a problem, but first ask if the code is really necessary. Perhaps
there is an easy work around or an alternative available under
There may also be a variety of opinions from the open source a different license. Another option, in some cases, is to contact
ecosystem on particular interpretations or expectations about the authors of the code and attempt to reach an agreement for
what a license means. The Free Software Foundation (FSF), an exception to the license. Some projects or companies may
for example, has offered a lot of guidance on GPL licenses — be willing to provide an exception, and are certainly more likely
but that’s no guarantee that a court will agree with the FSF’s to do so if the violation is unintentional and reported willingly.
interpretation. However, understanding the viewpoints of a It should be obvious at this point that the audit process, as
particular community that holds copyrights on the open source well as taking the necessary steps for compliance, will need
code is still an important consideration for license compliance. a collaborative effort between your engineering and legal
At the end of an audit, you’re looking to have a full bill of departments. Where compliance issues arise, engage your
materials for open source software in use in your business and/ executive management team as well to assess other options and
or products and a list of the licenses and obligations that apply your company’s risk profiles.
to those packages. The best case scenario, of course, is that your company is in
compliance already. But not knowing is worse than finding
What You Get From an Audit non-compliance and being able to take steps to remedy it.
After the audit is completed, you’ll have information about all of Whether you choose to engage an outside firm or perform your
the packages that are in use, as well as the licenses that apply own audit, it’s important that every business take the time to do
to those packages. Many open source projects embed multiple a full audit of the software that it is working with and ensure
other packages that use different licenses. It’s not as simple as that it’s complying with its obligations — not just the proprietary
an application framework using just GPL — it may have GPL, software, but its open source software as well.
LGPL, Apache 1.1, Apache 2.0, and other licenses. All of this
should be detailed in a comprehensive audit. Compliance Best Practices
You’ll also have analyzed which obligations in the license(s) are As you begin to audit your software for open source, you will
applicable based on your use case. As the last step you’ll need quickly realize that your audits will go smoother if you put in
to determine whether you are in compliance with each of the place some basic compliance processes.
license obligations and whether the use of open source is in 1. Put in place an open source policy. The policy should tell
keeping with company policies. your developers how and where they can use open source and
If you’re working with an outside firm like OpenLogic, you define the process for approving its use.
may receive a list of the license requirements with the audit 2. Track all open source usage. Make sure you document all
results and a list of possible license conflicts. If your company open source use: which versions are in use, where they are
publishes software, you may find that you’re combining two or used, how they’re used, and under what license.

www.openlogic.com Page 5
Open Source Software Audits April 2011

3. Maintain open source code. Your company should keep exact


source of the original projects as they’re received, as well as a
source repository with your changes and any code that you’re
shipping. Keep exact source and object code (binaries) for all
final versions of software that you’re distributing. Keep track of
what code has been modified.
4. Track licenses for open source. For each open source
package used, track all applicable licenses. Keep in mind that
the license associated with a piece of open source code may
change over time.
5. Have an open source review board. Create a review board
or other form of approval process for using open source in the
business. This process should be lightweight, to avoid delaying
development, but thorough, to avoid legal liabilities.
6. Appoint compliance officer or team. This person or group
will track compliance to ensure that your company follows
the license requirements and corporate policy for use of open
source after the audit.
Companies embarking on an open source audit may find that
there’s a lot of unfamiliar territory, but this should not inhibit or
dissuade companies from using open source. It’s simply a good
idea to be aware of what the use of open source in a business
entails, and handling it responsibly. Just as you need to have
a process to comply with the terms of proprietary software
licenses, you also need to have a process to comply with open
source licenses. An effective audit process will help achieve
this.

OpenLogic is a leading provider of open source solutions that enable enterprises to safely acquire, support, and control open source software. The OpenLogic
Certified Library, which encompasses hundreds of the most popular open source software packages, is accessible via OpenLogic Exchange (OLEX), a free web
site where companies can find, research, and download certified, enterprise-ready open source packages on demand. OpenLogic also offers open source
governance solutions, scanning, indemnification coverage, updates, and enterprise-grade technical support backed by the OpenLogic Expert Community.
phone: 1-888-OPENLOGIC
online: www.openlogic.com

www.openlogic.com Page 6

You might also like