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
This repository is part of the [NHSDigital GitHub Organisation](https://github.com/NHSDigital), this organisation in turn forms part of a wider [Enterprise](https://docs.github.com/en/enterprise-cloud@latest/admin/overview/about-github-for-enterprises). To enable effective collaboration between members of the NHSDigital organisation the [base permissions](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/setting-base-permissions-for-an-organization) for all repositories should be set to `Read`. This will mean that individual members will be able to view source code from across the organisation whether it is Public or Private.
6
+
7
+
As the organisation is part of the Enterprise there are other Organisations, for members of these organisations it is possible to provide access to view Source Code in this organisation without the need to invite users into this org by setting the visibility for the repository to [Internal](./baseline-visibility.md#internal-repositories).
8
+
9
+
## Contributing
10
+
11
+
With these permissions members can view the source code, they might then be able to identify improvements to this code. Each repository should contain a [CONTRIBUTING.md](../CONTRIBUTING.md) to describe how both team members and members from the wider organisation can contribute to the repository. Contributions to repositories are welcomed and should be encouraged.
12
+
13
+
## Code Owners
14
+
15
+
Each repository should include a [CODEOWNERS](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners) file in the root of the project. And [branch protections](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners) must be in place to ensure that any Pull Requests are approved by users listed in the codeowners file. This ensures that any code changes are approved by appropriate members of staff from the teams that own and are responsible for the code and any downstream services that depend upon it.
16
+
17
+
Teams can be listed as CODEOWNERS - but secret teams should not be used so that individual members of the organisation can identify who the codeowners are.
18
+
19
+
The presence of the CodeOwners file will also mean that organisation members can identify who to contact should they have any questions about the code.
20
+
21
+
## Internal Repositories
22
+
23
+
Private repositories can be created at the `Internal` type. This will mean that all members of the "Enterprise" can view these repositories. Note that this will include users who do not have direct access to the NHSDigital Organisation.
Copy file name to clipboardExpand all lines: practices/securing-repositories.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,19 +23,19 @@ This guide lays out security best practice for Github repositories. This set of
23
23
### Organisation-level settings
24
24
25
25
- All users must have MFA enabled.
26
-
- Baseline visibility for private repositories must be `No Permission`.
26
+
-[Baseline visibility](baseline-visibility.md) for private repositories must be `Read`.
27
27
- Ability to change repository view from private to public must be reserved to admins only.
28
28
29
29
### Repository-specific settings
30
30
31
31
- In line with the [Service Manual](https://service-manual.nhs.uk/service-standard/12-make-new-source-code-open), new repositories should be public by default, unless there is good reason not to - this avoids costly rework to secure private information further down the line.
32
32
- Private repositories must disable forking.
33
-
-There must be no outside collaborators in private repositories.
33
+
-[Outside collaborators](outside-collaborators.md) in private repositories must be there for a specific purpose (e.g. Penetration testers) and their need for access must be regularly reviewed.
Because of baseline visibility configurations, you must setup GitHub teams in order to provide team members access to repositories. The minimum recommended setup is as follows:
38
+
Because of baseline visibility configurations, you must setup GitHub teams in order to provide team members appropriate access to repositories. The minimum recommended setup is as follows:
39
39
40
40
- Create one team with the name of your programme (e.g. `Engineering Quality Framework`). Add all required members to this team.
41
41
- Create one child team within the team, for admins only (e.g. `Engineering Quality Framework Admins`). Add admins only to this team.
@@ -44,7 +44,7 @@ Because of baseline visibility configurations, you must setup GitHub teams in or
44
44
45
45
Child teams inherit the parent's access permissions, simplifying permissions management for large groups. Members of child teams also receive notifications when the parent team is `@mentioned`, simplifying communication with multiple groups of people.
46
46
47
-
Depending on your use case, you may want to create additional teams (e.g. a read-only access team, or different teams granting access to different projects). This is welcomed by the framework, as long as the teams provide clarity on the role they encompass, remain consistent and are applied consistently to your repositories.
47
+
Depending on your use case, you may want to create additional teams (e.g. teams granting access to different projects). This is welcomed by the framework, as long as the teams provide clarity on the role they encompass, remain consistent and are applied consistently to your repositories.
0 commit comments