|
5 | 5 | * These notes are part of a broader set of [principles](../principles.md) |
6 | 6 | * This is related to [ARCHITECTURE-SECURITY](https://digital.nhs.uk/about-nhs-digital/our-work/nhs-digital-architecture/principles/adopt-appropriate-cyber-security-standards) |
7 | 7 |
|
8 | | -## Big picture |
| 8 | +## Use the NSCS guidance |
| 9 | + |
| 10 | +The National Cyber Security Centre provides excellent [secure development and deployment guidance](https://www.ncsc.gov.uk/collection/developers-collection) on how to embed security into software delivery. |
| 11 | + |
| 12 | +This guidance outlines 8 principles and gives detailed practical steps for each on the pages linked. |
| 13 | + |
| 14 | +1. [Secure development is everyone's concern](https://www.ncsc.gov.uk/collection/developers-collection/principles/secure-development-is-everyones-concern) |
| 15 | +_Genuine security benefits can only be realised when delivery teams weave security into their everyday working practices._ |
| 16 | +1. [Keep your security knowledge sharp](https://www.ncsc.gov.uk/collection/developers-collection/principles/keep-your-security-knowledge-sharp) |
| 17 | +_Give your developers and delivery team the time and resources necessary to form a good understanding of defensive code development and the risks to the systems they are building._ |
| 18 | +1. [Produce clean & maintainable code](https://www.ncsc.gov.uk/collection/developers-collection/principles/produce-clean-maintainable-code) |
| 19 | +_Complexity is the enemy of security... Clean, well documented code is more efficient and easier to develop. It will also be easier to secure._ |
| 20 | +1. [Secure your development environment](https://www.ncsc.gov.uk/collection/developers-collection/principles/secure-your-development-environment) |
| 21 | +_If your development environment is insecure, it's difficult to have confidence in the security of the code which comes from it. These environments need to be suitably secure, but should also facilitate and not impede the development process._ |
| 22 | +1. [Protect your code repository](https://www.ncsc.gov.uk/collection/developers-collection/principles/protect-your-code-repository) |
| 23 | +_Your code is only as secure as the systems used to create it. As the central point at which your code is stored and managed, it's crucial that the repository is sufficiently secure._ |
| 24 | +1. [Secure the build and deployment pipeline](https://www.ncsc.gov.uk/collection/developers-collection/principles/secure-the-build-and-deployment-pipeline) |
| 25 | +_There are huge efficiency savings to be had from automating functions such as building code, running tests and deploying reference environments. However, these processes are security critical. Take care to ensure that your build and deployment tooling cannot undermine the integrity of your code, and that key security processes cannot be bypassed before changes are pushed to your customers._ |
| 26 | +1. [Continually test your security](https://www.ncsc.gov.uk/collection/developers-collection/principles/continually-test-your-security) |
| 27 | +_Performing security testing is critical in detecting and fixing security vulnerabilities. However, it should not get in the way of continuous delivery. Automating security testing where possible provides you with easily repeatable, scalable security measures. Your specialist security people can then concentrate on finding subtle and uncommon weaknesses._ |
| 28 | +1. [Plan for security flaws](https://www.ncsc.gov.uk/collection/developers-collection/principles/plan-for-security-flaws) |
| 29 | +_All code is susceptible to bugs and security vulnerabilities... Accept that your code will have exploitable shortcomings and establish a process for capturing and managing them from identification through to the release of a fix._ |
| 30 | + |
| 31 | +## Recommendations |
| 32 | + |
| 33 | +The remainder of this page gives more detailed and specific recommendations to be read in conjunction with the above. |
| 34 | + |
| 35 | +### Big picture |
9 | 36 |
|
10 | 37 | - Understand what **data** is processed or stored in the system |
11 | 38 | - Assess the data classification e.g. personal confidential data (PCD), aggregate data, anonymised data, publicly available information. See [Health and social care data risk model](https://digital.nhs.uk/data-and-information/looking-after-information/data-security-and-information-governance/nhs-and-social-care-data-off-shoring-and-the-use-of-public-cloud-services/health-and-social-care-data-risk-model) |
|
14 | 41 | - Prefer use of managed services to reduce attack surface where possible |
15 | 42 | - Keep **audit** log(s) of user actions, software and infrastructure changes (e.g. git, CI/CD, [CloudTrail](https://aws.amazon.com/cloudtrail/)) |
16 | 43 |
|
17 | | -## Application level security |
| 44 | +### Application level security |
18 | 45 |
|
19 | 46 | - Cover the **basics** |
20 | 47 | - Ensure the [OWASP Top Ten](https://www.owasp.org/index.php/Category:OWASP_Top_Ten_2017_Project) is well understood and considered during software delivery |
|
46 | 73 | - Generate test data in a way that avoids including personally identifiable information |
47 | 74 | - When granting roles to CI/CD tools, use different roles for the different stages in the deployment pipeline — for example so that a deployment meant for a development account cannot be performed against a production account |
48 | 75 |
|
49 | | -## Infrastructure security |
| 76 | +### Infrastructure security |
50 | 77 |
|
51 | 78 | - [Discuss](https://digital.nhs.uk/cyber-and-data-security/managing-security/nhs-secure-boundary#register-for-the-service) your use-case with the [NHS Secure Boundary service](https://digital.nhs.uk/cyber-and-data-security/managing-security/nhs-secure-boundary) |
52 | 79 | - **Encrypt** data at rest and in transit |
|
128 | 155 | - Consider using a WAF (Web Application Firewall) |
129 | 156 | - Restrict outbound network calls to limit the damage a compromised component can do if practical |
130 | 157 |
|
131 | | -## Human factors |
| 158 | +### Human factors |
132 | 159 | - Ensure **joiners and leavers process** is adequate |
133 | 160 | - Encourage use of **password managers** with MFA enabled |
134 | 161 | - Be aware of security sign-off **policies or procedures** outside the team and engage with these early |
0 commit comments