Where to place the security policy
The security policy should be a file namedSECURITY.md. It can live at the repository root or inside the .github directory. Best practice is to place it at .github/SECURITY.md so it’s grouped with other repository metadata (issue templates, CODEOWNERS, etc.).
Place
SECURITY.md in .github/SECURITY.md (or at the repo root). If you want stricter workflow control, require pull requests to add or modify it instead of committing directly to the default branch.What to include in SECURITY.md
A good security policy typically covers:- Supported versions and how long security fixes are provided for each release.
- Clear reporting channels (email address, issue template, or third-party platform).
- Expected confidentiality (e.g., “do not post details publicly before a fix”).
- Triage and response timelines (acknowledgement, initial triage, and remediation windows).
- Whether you accept encrypted reports (PGP/GPG) and how to obtain the public key.
- The disclosure process (coordinated disclosure, CVE issuance, public advisory).
Recommended content and examples
You can expand the Reporting section with specifics. For example, provide:- One primary contact method (email or private issue reporter).
- Whether encrypted emails are accepted (
PGP/GPGkey fingerprint and instructions). - A short timeline (acknowledge, initial triage timeframe, and estimated fix period).
- How to request or track a CVE.
Example: Reporting options (table)
Do not include sensitive details (exploit code, POCs, or victim data) in public issues. If you accept encrypted reports, publish your PGP/GPG key fingerprint and instructions in
SECURITY.md.Recommended response & disclosure timelines
These are sample timelines you can adapt for your project:- Acknowledge receipt: within 48 hours.
- Initial triage (assess severity and reproduction): within 7 days.
- Fix or mitigation plan: within 30–90 days depending on severity.
- Public advisory/CVE issuance: coordinated with reporter after fix is available.
SECURITY.md so reporters know what to expect.
Creating and committing the policy
You can createSECURITY.md directly in GitHub’s web editor (commit to the default branch or create a pull request), or manage it locally and push:
.github folder with SECURITY.md will appear in the repository’s file list alongside README and other metadata.


Best practices
- Keep the policy concise and actionable.
- Provide only one or two clear reporting channels.
- Offer encrypted-report options and publish your public key if you accept them.
- Keep the supported-versions table up to date with each release.
- Use PRs to update
SECURITY.mdso changes are reviewed and auditable.