What is SECURITY.md?
A security policy is a plain-text file namedSECURITY.md that lives either in the repository root or in the .github directory. It should explain:
- Which project versions receive security updates.
- How to report a vulnerability and which channels to use.
- Expected response timelines and how triage will be communicated.
- Whether encrypted reports are accepted and how to submit them.
- Any confidentiality expectations and contact details.
SECURITY.md and commit it to your repository’s default branch (for example, main).
Prefer storing
SECURITY.md in the .github directory for consistency across repositories and easier discovery. Placing it in the repository root is also supported.Recommended structure for SECURITY.md
A straightforward structure helps reporters find the information they need quickly. Typical sections include:- Title (e.g., “Security Policy”)
- Supported Versions (clear table for supported/unsupported versions)
- Reporting a Vulnerability (preferred contact channel, PGP for encrypted reports, response expectations)
- Confidentiality and disclosure timeline
- Links to security advisories or issue trackers (if applicable)
Example SECURITY.md
Below is an example you can adapt. Copy this intoSECURITY.md and customize the contact details, supported versions, and response expectations.

How GitHub surfaces SECURITY.md
When present on the default branch, GitHub displays theSECURITY.md contents on the repository’s Security Policy page. This makes the policy highly visible to anyone looking for reporting guidance — for example, the Supported Versions table and Reporting a Vulnerability section will be rendered for quick reference.

Coordinated fixes and Security Advisories
You can create private Security Advisories in GitHub to coordinate fixes and notify affected parties. UseSECURITY.md to tell reporters how to contact you so you can move the conversation into a private advisory when appropriate.
If you accept encrypted vulnerability reports, never commit private keys or sensitive decryption material to the repository. Provide only public PGP keys or secure instructions for submitting encrypted reports.
Quick checklist before publishing
- Put
SECURITY.mdin.github/or the repository root. - Provide at least one preferred contact method (email or issue tracker).
- State supported versions and expected response times.
- Explain whether encrypted reports are accepted and how to provide them.
- Link to your Security Advisories or incident response resources if available.
Links and references
- GitHub Security Policy docs: https://docs.github.com/en/code-security/secure-coding/security-policy
- Creating and publishing security advisories: https://docs.github.com/en/code-security/security-advisories