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.
Make it easy for people to confidentially report security vulnerabilities they've found in your repository. For more information, see "Adding a security policy to your repository."
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. For more information, see "About GitHub Security Advisories."
Dependabot alerts 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 alerts for vulnerable dependencies" and "About Dependabot security updates."
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 security updates to successfully raise pull requests to upgrade vulnerable dependencies. For more information, see "About Dependabot version updates."
These features are available for all public repositories, and for private repositories owned by organizations with an Advanced Security license. For more information, see "About GitHub Advanced Security."
Code scanning 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."
Secret scanning alerts
For private repositories, 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."
- 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."
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. Enabling the dependency graph also enables GitHub to run dependency reviews of pull requests.
You can find the dependency graph on the Insights tab for your repository. For more information, see "About the dependency graph."