RecipeHandling Vulnerability Reports
Target audience (the chef)This recipe is aimed at small and medium non-security focused projects. Maintainers of a high-risk security sensitive project, you probably need a more sophisticated approach (check out https://alpha-omega.dev/)
Scope (ingredients)Defining SECURITY.md, managing reports and embargoes, and CVE disclosure.
Out of scope (do not add)Large projects and those that are security-criticalVulnerabilities in dependenciesCoding best practices (ie how to avoid a vulnerability)

TLDR:

Set the Station: Define a clear reporting path in your README.md and SECURITY.md so reporters know where to deliver ingredients.

Taste Test First: Determine if a report is a real vulnerability or just a regular bug before starting the fire.

Plate for Everyone: Coordinate the patch release with a public CVE disclosure to serve your users safely.

The Recipe: Step-by-Step Instructions

This recipe card provides guidance for handling security vulnerabilities in open source projects. A security vulnerability is a flaw in a program that can be exploited by an attacker to compromise the confidentiality, integrity, or availability of a system. Security vulnerabilities often stem from bugs in a program, but not all bugs can be exploited. While many bugs appear in the kitchen, not all of them have the potential to compromise the confidentiality or integrity of your menu.

Spoiled ingredients can cause a lot of damage for patrons, in the same way that vulnerabilities can cause a lot of damage for end-users. So many users track & prioritize vulnerabilities to minimize impact. This process can generate a lot of work, so in this guide we aim to minimize the extra work needed for both project maintainers and end-users.

For more information about handling vulnerabilities, especially for larger projects, see the vulnerability disclosure guide from the OpenSSF.

Preparing to receive a vulnerability (prep the kitchen)

As a head chef, you want to hear from your customers when something is wrong, but you want them to reach out to you directly with the information, instead of posting it as a public review. Similarly, as a maintainer, you don’t want vulnerabilities to be reported to you through a plain bug issue, publicly visible to the world.
Make it as obvious and as easy as possible for people to find that path by including a security section directly in the README.md of the repository. This section can directly include the instructions, or point to the SECURITY.md file, which should also be at the root of the repository. 

The instructions for reporting a vulnerability should include:

After you get a report (the taste test)

Once you discover a vulnerability or have one reported, you will want to respond to the vulnerability without talking publicly about the vulnerability. This involves an “embargo” where key individuals from the project, usually maintainers, are made aware of the vulnerability and work with the reporter to address it.

Just as the first step with a questionable ingredient is to determine if it is actually spoiled, the first step when you get the report is to determine if it’s actually a vulnerability. Some reports may turn out to be a non-exploitable bug (meaning it can’t lead to an exploit) or a misunderstanding of the project’s expected behavior. To decide, discuss the report with the reporter and relevant project experts. Try to minimize the number of people involved in the discussion at this stage, and make sure everyone agrees to maintain confidentiality until the report becomes public. If you decide the report is not a vulnerability, direct the reporter to file a public issue instead, and you may follow any of the procedures in “publishing” to inform users. Think of it as adding a note to the menu that specific dishes contain cilantro.

If you are not sure whether a report is a bug, you can reach out to TAG Security and Compliance or CNCF staff for guidance. When reaching out, ask generally for guidance, or for the TAG leads to start a DM. Make sure to keep the contents of the report out of public channels at this stage. You can also consider the following questions:

Use your judgement when adding someone to an embargo, and make sure they are aware that the vulnerability is not yet public, and that it needs to be handled appropriately and kept confidential, given the sensitivity of the matter. 

Just as a chef modifying a recipe avoids having too many extra cooks in the kitchen who might speak too loudly and be overheard, you should carefully manage who is informed about an embargo. Be intentional with your disclosures, involving only those essential contributors whose direct assistance is required to resolve the vulnerability. The embargo ensures that attackers do not have access to the vulnerability before it is patched.

Fixing a Vulnerability (cooking)

When patching a vulnerability, keep your preparation out of the public dining room. This means keeping the patch out of public conversations and pull requests until after it is public. People can guess at the vulnerability from the patch, and you want to give users a chance to update before the vulnerability becomes public. To do:

Publishing the Disclosure (plating and serving)

Once the patch is fully baked, you want to plate it up and tell your users about it. It’s generally considered best practice to do this within 90 days of receiving the report.

One strategy is to have a list of users to disclose to privately. These users can be added to your embargo and patch before the vulnerability is public. But this requires long-term maintenance of this list of users. If this list already exists, or if you have the resources to maintain it, this is great, but most small projects will not be able to keep a list of users and their contact information up to date.

Just as food needs to be plated just before service, a common strategy is to make the patch available and announce the vulnerability at the same time so that users can patch quickly. This gives everyone the patch at the same time, and is much easier to coordinate a safe meal. To do so: