Setting up your repository securely
The first step to securing a repository is to set up who can see and modify your code. For more information, see "Managing repository settings."
保护您的仓库
GitHub has a growing set of security features that help you keep your code secure. You can find these on the Security tab for your repository.
-
Security policy
Make it easy for people to confidentially report security vulnerabilities they've found in 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 them to upgrade. 更多信息请参阅“关于 GitHub Security Advisories”。
-
Dependabot alerts
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 "Viewing and updating vulnerable dependencies in your repository" and "Configuring GitHub Dependabot 安全更新."
-
代码扫描 alerts
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."
-
Detected secrets
View any secrets that GitHub has found in your code. You should treat tokens or credentials that have been checked into the repository as compromised. For more information, see "About secret scanning."
Exploring dependencies
GitHub's dependency graph allows you to explore:
- Ecosystems and packages that your repository depends on
- Repositories and packages that depend on your repository
You must enable the dependency graph before GitHub can generate Dependabot alerts for dependencies with security vulnerabilities.
You can find the dependency graph on the Insights tab for your repository. 更多信息请参阅“关于依赖关系图”。