Skip to content

Commit 4850a25

Browse files
authored
Closes #228 (#229) - default branch references
1 parent 7f60671 commit 4850a25

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

practices/security.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ The remainder of this page gives more detailed and specific recommendations to b
9292
- Only allow access for emergencies using a "break glass" pattern, e.g. using Azure AD [Privileged Identity Management](https://docs.microsoft.com/en-us/azure/active-directory/privileged-identity-management/pim-configure)
9393
- Audit access to production and alert for unexpected access
9494
- Frequently asked questions:
95-
- Q: If I can't access production, how can I check data, for example to respond to a support call? A: one approach is to build a facility (which must be automated, controlled and secured - so likely to be triggered via a pipeline) to clone the production database into a short-lived and isolated copy, so that data can be checked safely without anyone accessing production. Read-replicas can potentially be used instead, but they are (obviously) limited to read-only, and will often consume more cost and energy than on-demand clones ([ARCHITECTURE-SUSTAINABILITY](https://digital.nhs.uk/about-nhs-digital/our-work/nhs-digital-architecture/principles/deliver-sustainable-services)). As above, access must be audited and strictly controlled.
95+
- Q: If I can't access production, how can I check data, for example to respond to a support call? A: one approach is to build a facility (which must be automated, controlled and secured - so likely to be triggered via a pipeline) to clone the production database into a short-lived and isolated copy, so that data can be checked safely without anyone accessing production. Read-replicas can potentially be used instead, but they are (obviously) limited to read-only, and will often consume more cost and energy than on-demand clones ([ARCHITECTURE-SUSTAINABILITY](https://digital.nhs.uk/about-nhs-digital/our-work/nhs-digital-architecture/principles/deliver-sustainable-services)). As above, access must be audited and strictly controlled.
9696
- Q: If I can't access production, how can I update data that is incorrect? A: to update data safely and with confidence, all data changes should be scripted, tested against production data (using a clone, as above) and applied (both for testing and to production) via delivery pipelines rather than via manual updates.
97-
- Q: If I can't access production, how can I refresh static / reference data? A: as above, one approach is to script the data changes required and apply them via delivery pipelines; another approach is to build a housekeeping facility that refreshes an entire static dataset based on a file (for example CSV or JSON) - if using this approach, access and usage must be audited and strictly controlled.
97+
- Q: If I can't access production, how can I refresh static / reference data? A: as above, one approach is to script the data changes required and apply them via delivery pipelines; another approach is to build a housekeeping facility that refreshes an entire static dataset based on a file (for example CSV or JSON) - if using this approach, access and usage must be audited and strictly controlled.
9898
- **Secure the route** to infrastructure: all access to infrastructure (production or otherwise) must be via a secured route, for example via a hardened bastion only accessible via a VPN (with MFA challenge), and with an audit of usage.
9999
- Ensure infrastructure **IAM** is robust
100100
- Strong passwords and MFA

tools/nhsd-git-secrets/git-secrets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ prepare_commit_msg_hook() {
186186
merge,)
187187
local git_head=$(env | grep GITHEAD) # e.g. GITHEAD_<sha>=release/1.43
188188
local sha="${git_head##*=}" # Get just the SHA
189-
local branch=$(git symbolic-ref HEAD) # e.g. refs/heads/master
189+
local branch=$(git symbolic-ref HEAD) # e.g. refs/heads/main
190190
local dest="${branch#refs/heads/}" # cut out "refs/heads"
191191
git log "${dest}".."${sha}" -p | scan_with_fn_or_die "scan" -
192192
;;

tools/nhsd-git-secrets/nhsd-git-secrets.dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
###################################################################################
22
#
33
# Uses git secrets scanner to scan raw source code for secrets
4-
# Same framework in the nhsd-git-secrets folder, but wrapped up in a docker image
4+
# Same framework in the nhsd-git-secrets folder, but wrapped up in a docker image
55
#
66
# How to use:
77
# 1. Create yourself a ".gitallowed" file in the root of your project.
@@ -44,7 +44,7 @@ WORKDIR /secrets-scanner/source
4444
RUN git init
4545

4646
RUN echo "Downloading regex files from engineering-framework"
47-
RUN curl https://codeload.github.com/NHSDigital/software-engineering-quality-framework/tar.gz/master | tar -xz --strip=3 software-engineering-quality-framework-master/tools/nhsd-git-secrets/nhsd-rules-linux-mac.txt
47+
RUN curl https://codeload.github.com/NHSDigital/software-engineering-quality-framework/tar.gz/main | tar -xz --strip=3 software-engineering-quality-framework-main/tools/nhsd-git-secrets/nhsd-rules-linux-mac.txt
4848

4949
RUN echo "Copying allowed secrets list"
5050
COPY .gitallowed .

0 commit comments

Comments
 (0)