Articles
Published · November 18, 2026

How to Write a SECURITY.md That Tells People Where to Report

A SECURITY.md tells people which versions you support and how to report a vulnerability privately. Here is where it goes, what to put in it, and a short template.

Also in: Español中文हिन्दी

A SECURITY.md file tells people which versions of your project you support and where to send a vulnerability report. Write it so a stranger who just found a bug can act on it in under a minute, without opening a public issue.

Quick answer

GitHub describes a security policy as instructions for how to report a security vulnerability in your project. In its setup flow, you add information about supported versions and how to report a vulnerability. That's the whole job. Here is a file that does it:

# Security Policy

## Supported versions

| Version | Supported |
| ------- | --------- |
| 2.x     | Yes       |
| 1.x     | Security fixes only |
| < 1.0   | No        |

## Reporting a vulnerability

Please do not open a public issue.

Use the "Report a vulnerability" button on the Security tab of this
repository. If you cannot, email security@example.com.

We aim to acknowledge reports within 3 working days.

Replace the table, the address, and the response time with values you can actually keep. The rest of this article explains each choice.

Step-by-step

1. Pick the location

GitHub accepts SECURITY.md in the repository root, in the .github folder, or in docs. When a file could live in more than one place, the precedence is the .github folder first, then the root, then docs. Pick one place and keep a single copy, so no one has to guess which file wins.

You can also create it in the browser: open the repository's Security tab, click Security policy under Reporting, then Start setup. GitHub opens a new SECURITY.md for you to edit. If you are committing to the default branch, GitHub advises creating a new branch and opening a pull request.

2. List the supported versions

Say which releases still get security fixes. A small table, like the one above, is enough, and Markdown tables render on GitHub. Be honest here. If only the latest release is maintained, say so in one line. A generous table makes promises you won't keep. An empty one leaves reporters unsure whether their version matters.

If you are still organizing the rest of your project's docs, keeping your docs sorted into reference, how-to, and so on helps decide what belongs in the README and what belongs here.

3. Say how to report

This is the part people read. Name one primary channel and, if you have one, a fallback. Good options:

  • Private vulnerability reporting. When it is turned on for the repository, reporters open the Security tab, click Report a vulnerability, and submit a form. GitHub adds the reporter as a collaborator and a credited user on the proposed advisory.
  • An email address that more than one person reads.

Open the file with the instruction "do not open a public issue." A public issue exposes the bug to everyone before you have had a chance to fix it.

4. Set expectations for disclosure

GitHub's guidance on coordinated disclosure asks reporters not to disclose a vulnerability publicly without giving maintainers a chance to remediate it. Full details are published once the maintainer has acknowledged the issue, ideally with a fix available. Echo that in your file with a sentence such as "Please give us a reasonable time to fix the issue before sharing details publicly," and state the response time you can really meet.

5. Optional: one default for every repository

If you own many repositories, create a public repository named .github and put SECURITY.md there. GitHub uses it for any repository in the account that has no SECURITY.md of its own, whatever that repository's visibility. The .github repository must be public. A repository's own file always takes precedence over the default.

Common problems and fixes

Private reporting is switched off. Reporters can only report privately where the feature is enabled. If it is off, they follow your security policy, or open an issue asking for a preferred security contact. That issue is public, so it should not contain details of the bug. Your file should therefore always name a contact that does not depend on the toggle.

The contact is a public issue tracker. Do not point to the issue tracker for the vulnerability itself. Use a private channel.

No promise of a reply. Silence is the usual reason people go public. A short, honest acknowledgment window beats none.

The file only exists on a branch. Merge it. A policy on a feature branch isn't a policy.

You also run a website. A SECURITY.md covers the repository. For a site, there is a plain-text companion, covered in security.txt. If you link between issues, advisories, and people in your replies, GitHub Markdown references keep those links tidy.

Doing this with Carets

SECURITY.md is a Markdown file, and Carets is a fast, native notes and code editor for iPhone, iPad, and Mac that opens Markdown and plain text as they are. You can draft the policy, keep the supported-versions table tidy with syntax highlighting, and file it in a project next to the README and other repository docs. Files, projects, and tags keep each repository's policy findable, and the file stays plain text, so you can copy it straight into your repository.

Carets is built for iOS and Mac rather than as a web wrapper, so a quick edit to a contact address or a version row takes seconds, even from your phone. It isn't a Git client, so you commit and push the finished file as you normally would.

Download Carets on the App Store for iPhone, iPad, and Mac.

Frequently Asked Questions

Where does GitHub look for SECURITY.md?

In the repository root, the .github folder, or the docs folder. If a repository has none, GitHub falls back to the default in the account's public .github repository.

Do I need private vulnerability reporting turned on?

No, but it is the simplest route for reporters. When it is off, your SECURITY.md has to name another private contact.

Should the file list supported versions?

Yes. GitHub's setup flow asks you to add which versions are supported and how to report a vulnerability.

Can one SECURITY.md cover all my repositories?

Yes. Put it in a public repository named .github. It applies to every repository in the account that lacks its own.