# Ensure public repositories have a SECURITY.md file

- Source: https://support.icompaas.com/support/solutions/articles/a_1790019229234637-ensure-public-repositories-have-a-securitymd-file
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [Version Control System (VCS)](https://support.icompaas.com/support/solutions/c_1781179095087930) › [GitHub](https://support.icompaas.com/support/solutions/folders/f_1781179116560328)
- Last updated: 2026-10-26
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

#### Description

This control ensures that every public repository in the organization contains a SECURITY.md file. The file defines the repository’s security policy, including how to report vulnerabilities and which versions are supported with security updates.

#### Rationale

Without a published security policy, external researchers and users may not know how to report vulnerabilities responsibly and may disclose them publicly instead. A SECURITY.md file provides a clear, private reporting channel, enabling the organization to receive, triage, and fix vulnerabilities before they are exploited.

#### Impact

-   Each public repository must contain and maintain a SECURITY.md file.
    
-   A link to the security policy appears on the repository’s Security tab and when users create a new issue.
    
-   The organization must monitor the reporting channel defined in the policy.
    
-   Supports responsible disclosure and vulnerability management requirements.
    

#### Default Value

-   Not present by default. Repository maintainers must add a SECURITY.md file to each repository, or an organization owner must add a default security policy to the organization’s .github repository.
    

#### Remediation

##### Test Plan

1.  Sign in to GitHub with access to the target organization.
    
2.  Navigate to the organization and list its public repositories (Repositories tab, filter Type → Public).
    
3.  For each public repository, open the Security tab and verify that the security policy is shown as enabled.
    

4.  If no security policy is present, follow the Implementation Steps to remediate the issue and repeat the test.
    

##### Implementation Steps

1.  Sign in to GitHub with write access to the target repository.
    
2.  Navigate to the target repository.
    
3.  Select the Security tab.
    
4.  In the sidebar, select Policy, then click Start setup.
    

5.  In the new SECURITY.md file, describe the supported versions and how to report a vulnerability (e.g., a security contact email address or GitHub private vulnerability reporting).
    
6.  Click Commit changes, add a commit message, and commit the file to the default branch (or open a pull request if branch protection requires it).
    

7.  To apply a default policy to all repositories that do not have their own, add a SECURITY.md file to the organization’s public repository named .github.
    

##### Backout Plan

1.  Sign in to GitHub with write access to the target repository.
    
2.  Navigate to the target repository.
    
3.  Open the SECURITY.md file and select Delete file from the file menu.
    
4.  Commit the change to the default branch (or open a pull request if branch protection requires it).
    
5.  Verify that the security policy is no longer shown on the repository’s Security tab.
    

#### References

-   [Adding a Security Policy to Your Repository](https://docs.github.com/en/code-security/getting-started/adding-a-security-policy-to-your-repository)
    
-   [Creating a Default Community Health File](https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file)

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
