You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/repositories/creating-and-managing-repositories/about-repositories.md
+12
Original file line number
Diff line number
Diff line change
@@ -80,6 +80,18 @@ When you create a repository, you can choose to make the repository public or pr
80
80
* Internal repositories are accessible to all enterprise members. For more information, see [About internal repositories](#about-internal-repositories).
81
81
{%- endif %}
82
82
83
+
{% ifversion fpt or ghec %}
84
+
85
+
### Security considerations for repository visibility
86
+
87
+
Public repositories expose your codebase to everyone, increasing the risk that attackers might exploit vulnerabilities or access sensitive information. You can mitigate these risks by enabling {% data variables.product.github %} security features such as {% data variables.product.prodname_dependabot %}, {% data variables.product.prodname_secret_scanning %}, push protection, and {% data variables.product.prodname_code_scanning %} for the repository. Additionally, you should add a security policy (a `SECURITY.md` file) to your repository, that outlines how vulnerabilities should be reported, to ensure that potential threats are addressed efficiently.
88
+
89
+
Although private repositories restrict access to authorized users, it's still essential to implement strong access controls, multi-factor authentication, and regular audits to mitigate risks.
90
+
91
+
For more information, see [AUTOTITLE](/code-security/getting-started/quickstart-for-securing-your-repository).
92
+
93
+
{% endif %}
94
+
83
95
Organization owners always have access to every repository created in an organization. For more information, see [AUTOTITLE](/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization).
84
96
85
97
People with admin permissions for a repository can change an existing repository's visibility. For more information, see [AUTOTITLE](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/setting-repository-visibility).
Copy file name to clipboardExpand all lines: content/repositories/creating-and-managing-repositories/best-practices-for-repositories.md
+17-1
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Best practices for repositories
3
3
shortTitle: Best practices
4
-
intro: Learn how to use repositories most effectively.
4
+
intro: Learn how to use repositories effectively and securely.
5
5
versions:
6
6
fpt: '*'
7
7
ghes: '*'
@@ -16,6 +16,22 @@ To make it easier for people to understand and navigate your work, we recommend
16
16
17
17
{% data reusables.repositories.about-READMEs %} For more information, see [AUTOTITLE](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-readmes).
18
18
19
+
## Secure your repository
20
+
21
+
You should secure your repository using {% data variables.product.github %}'s available security features to protect your code from vulnerabilities, unauthorized access, and other potential security threats. At a minimum, you should enable the following features{% ifversion fpt or ghec %}, which are available for **free for public repositories**{% endif %}:
22
+
23
+
***{% data variables.product.prodname_dependabot_alerts %}** notify you of security vulnerabilities in your project's dependency network, so that you can update the affected dependency to a more secure version.
24
+
***{% data variables.product.prodname_secret_scanning_caps %}** scans your repository for secrets (such as API keys and tokens) and alerts you if a secret is found, so that you can remove the secret from your repository.
25
+
***Push protection** prevents you (and your collaborators) from introducing secrets to the repository in the first place, by blocking pushes containing supported secrets.
26
+
***{% data variables.product.prodname_code_scanning_caps %}** identifies vulnerabilities and errors in your repository's code, so that you can fix these issues early and prevent a vulnerability or error being exploited by malicious actors.
27
+
28
+
Additionally, you might also consider:
29
+
30
+
* Adding a `SECURITY.md` file to your repository. The `SECURITY.md` file provides instructions to collaborators on how to report security vulnerabilities found in your project and encourages responsible disclosure.{% ifversion fpt or ghec %}
31
+
* Enabling "Private vulnerability reporting" for the repository, which lets collaborators and security researchers privately disclose vulnerabilities found in your repository to you.{% endif %}
32
+
33
+
For more information, see [AUTOTITLE](/code-security/getting-started/quickstart-for-securing-your-repository).
34
+
19
35
## Favor branching over forking
20
36
21
37
To streamline collaboration, we recommend that regular collaborators work from a single repository, creating pull requests between branches instead of between repositories. Forking is best suited for accepting contributions from people that are unaffiliated with a project, such as open-source contributors.
Copy file name to clipboardExpand all lines: content/repositories/creating-and-managing-repositories/quickstart-for-repositories.md
+2
Original file line number
Diff line number
Diff line change
@@ -122,6 +122,8 @@ You have now created a repository, including a _README_ file, and created your f
122
122
123
123
{% endwebui %}
124
124
125
+
* Secure your repository using {% data variables.product.github %}'s available security features. For more information, see [AUTOTITLE](/code-security/getting-started/quickstart-for-securing-your-repository).
126
+
125
127
* You can find interesting projects and repositories on {% data variables.product.prodname_dotcom %} and make changes to them by creating a fork of the repository. {% data reusables.getting-started.fork-a-repository %}
126
128
127
129
* {% data reusables.getting-started.being-social %}
Copy file name to clipboardExpand all lines: content/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository.md
## About security and analysis settings for your repository
35
+
36
+
{% data variables.product.github %} offers a number of different security features that you can enable for your repository to
37
+
protect your code from vulnerabilities, unauthorized access, and other potential security threats. {% ifversion fpt or ghec %}Many of these features are available for **free for public repositories**.{% endif %}
38
+
34
39
{% ifversion fpt or ghec %}
35
40
36
41
## Enabling or disabling security and analysis features for public repositories
37
42
38
-
You can manage a subset of security and analysis features for public repositories. Other features are permanently enabled, including dependency graph and {% data variables.secret-scanning.partner_alerts %}.
43
+
You can manage a subset of security and analysis features for public repositories.
44
+
45
+
At a minimum, you should enable the following for your public repository:
46
+
47
+
***{% data variables.product.prodname_dependabot_alerts %}** notify you of security vulnerabilities in your project's dependency network, so that you can update the affected dependency to a more secure version.
48
+
***{% data variables.product.prodname_secret_scanning_caps %}** scans your repository for secrets (such as API keys and tokens) and alerts you if a secret is found, so that you can remove the secret from your repository.
49
+
***Push protection** prevents you (and your collaborators) from introducing secrets to the repository in the first place, by blocking pushes containing supported secrets.
50
+
***{% data variables.product.prodname_code_scanning_caps %}** identifies vulnerabilities and errors in your repository's code, so that you can fix these issues early and prevent a vulnerability or error being exploited by malicious actors.
51
+
52
+
Other features are permanently enabled for public repositories, such as the dependency graph, which shows you all the libraries and packages that your repository depends upon.
39
53
40
54
{% data reusables.repositories.navigate-to-repo %}
41
55
{% data reusables.repositories.sidebar-settings %}
42
56
{% data reusables.repositories.navigate-to-code-security-and-analysis %}
43
57
1. Under {% ifversion code-security-wording-only %}"Code security"{% else %}"Code security and analysis"{% endif %}, to the right of the feature, click **Disable** or **Enable**.
58
+
44
59
{% endif %}
45
60
46
61
## Enabling or disabling security and analysis features{% ifversion fpt or ghec %} for private repositories{% endif %}
47
62
48
63
You can manage the security and analysis features for your {% ifversion fpt or ghec %}private or internal {% endif %}repository.{% ifversion ghes or ghec %} If your enterprise or organization has a license for {% data variables.product.prodname_GH_advanced_security %}, then extra options are available. {% data reusables.advanced-security.more-info-ghas %}
49
64
{% elsif fpt %} Organizations that use {% data variables.product.prodname_ghe_cloud %} with {% data variables.product.prodname_advanced_security %} have extra options available. For more information, see the [{% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest//repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository#enabling-or-disabling-security-and-analysis-features-for-private-repositories).
65
+
50
66
{% endif %}
51
67
52
68
{% data reusables.security.security-and-analysis-features-enable-read-only %}
@@ -64,6 +80,10 @@ You can manage the security and analysis features for your {% ifversion fpt or g
64
80
65
81
## Granting access to security alerts
66
82
83
+
{% data variables.product.github %} security alerts are automated notifications that inform you when vulnerabilities are found in your repository's dependencies or code. They prompt you to review and remediate these issues, helping to keep your project secure.
84
+
85
+
You can find security alerts from {% data variables.product.prodname_dependabot %}, {% data variables.product.prodname_secret_scanning_caps %}, and {% data variables.product.prodname_code_scanning_caps %} under your repository's **Security** tab.
86
+
67
87
Security alerts for a repository are visible to people with write, maintain, or admin access to the repository and, when the repository is owned by an organization, organization owners. You can give additional teams and people access to the alerts.
Copy file name to clipboardExpand all lines: content/support/contacting-github-support/viewing-and-updating-support-tickets.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,7 @@ You can also comment on tickets opened by someone else and associated with your
65
65
66
66
## Requesting a callback
67
67
68
-
You can request a callback for urgent or high priority tickets{% ifversion ghec %} if your account includes {% data variables.contact.premium_support %}{% endif %}. From the ticket, click **Request a callback from GitHub Support**.
68
+
If your account includes {% data variables.contact.premium_support %}, you can request a callback for urgent or high priority tickets. From the ticket, click **Request a callback from GitHub Support**.
0 commit comments