Skip to main content

GitHub security features

An overview of GitHub security features.

About GitHub's security features

GitHub has security features that help keep code and secrets secure in repositories and across organizations. 某些功能可用于所有计划的存储库。 其他功能可供使用 GitHub Advanced Security 的企业使用。 GitHub Advanced Security 功能也为 上的所有公共存储库启用。 更多信息请参阅“关于 GitHub Advanced Security”。

The GitHub Advisory Database contains a curated list of security vulnerabilities that you can view, search, and filter. 更多信息请参阅“浏览 GitHub Advisory Database 中的安全通告”。

Available for all repositories

Security policy

Make it easy for your users to confidentially report security vulnerabilities they've found in your repository. For more information, see "Adding a security policy to your repository."

Security advisories

Privately discuss and fix security vulnerabilities in your repository's code. You can then publish a security advisory to alert your community to the vulnerability and encourage community members to upgrade. For more information, see "About GitHub Security Advisories."

Dependabot 警报 and security updates

View alerts about dependencies that are known to contain security vulnerabilities, and choose whether to have pull requests generated automatically to update these dependencies. For more information, see "About Dependabot 警报" and "About Dependabot 安全更新."

Dependabot version updates

Use Dependabot to automatically raise pull requests to keep your dependencies up-to-date. This helps reduce your exposure to older versions of dependencies. Using newer versions makes it easier to apply patches if security vulnerabilities are discovered, and also makes it easier for Dependabot 安全更新 to successfully raise pull requests to upgrade vulnerable dependencies. For more information, see "About Dependabot 版本更新."

Dependency graph

The dependency graph allows you to explore the ecosystems and packages that your repository depends on and the repositories and packages that depend on your repository.

You can find the dependency graph on the Insights tab for your repository. For more information, see "About the dependency graph."

Security overview for repositories

The security overview shows which security features are enabled for the repository, and offers you the option of configuring any available security features that are not already enabled.

Available with GitHub Advanced Security

The following GitHub Advanced Security features are available and free of charge for public repositories on Organizations that use GitHub Enterprise Cloud with a license for GitHub Advanced Security can use the full set of features in any of their repositories. For a list of the features available with GitHub Enterprise Cloud, see the GitHub Enterprise Cloud documentation.


Automatically detect security vulnerabilities and coding errors in new or modified code. Potential problems are highlighted, with detailed information, allowing you to fix the code before it's merged into your default branch. For more information, see "About code scanning."


Automatically detect leaked secrets across all public repositories. GitHub informs the relevant service provider that the secret may be compromised. For details of the supported secrets and service providers, see "秘密扫描 patterns."

Dependency review

Show the full impact of changes to dependencies and see details of any vulnerable versions before you merge a pull request. For more information, see "About dependency review."

Further reading