Check ID: repository_public_has_securitymd_file
Provider: GitHub
Service: repository
Severity: LOW
Categories: software-supply-chain
Resource type: NotDefined

What this check verifies

GitHub public repository include a SECURITY.md policy file that tells researchers how to report vulnerabilities. The evaluation focuses on the presence of this file in public repositories.

Risk

Without SECURITY.md, reporters may use public issues or ad-hoc channels, causing premature disclosure or missed reports. This widens the exploit window and impacts confidentiality (leaked details), integrity (unauthorized changes), and availability (DoS from unpatched flaws).

Recommendation

Publish a clear SECURITY.md for each public repo or an org default. Include private reporting channels, optional encryption keys, scope/supported versions, disclosure timelines, and safe-harbor terms. Link to any bounty program and review regularly. Align with accountability and defense in depth principles.

Remediation

gh api -X PUT repos/<OWNER>/<REPO>/contents/.github/SECURITY.md -f message='Add SECURITY.md' -f content='UmVwb3J0IHZ1bG5lcmFiaWxpdGllcyB0byBzZWN1cml0eUBleGFtcGxlLmNvbQo='

References

Where this check fires

This check runs on every scheduled scan against your GitHub account. Findings appear at Cloud Security → Findings filterable by Check ID = repository_public_has_securitymd_file. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to GitHub checks