Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Template Sync] Drift from template-repository remediation #54

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# NHS Notify Code Owners

* @NHSDigital/nhs-notify-amet
# Notify default owners
* @rossbugginsnhs @m-houston @aidenvaines-bjss @timireland

# Default protection for codeowners, must be last in file.
# Codeowners must be final check
/.github/CODEOWNERS @NHSDigital/nhs-notify-code-owners
/CODEOWNERS @NHSDigital/nhs-notify-code-owners

Expand Down
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/1_support_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# See:
# - https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository
# - https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms
# - https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/common-validation-errors-when-creating-issue-forms

name: 🔧 Support Request
description: Get help
labels: ["support"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to file a support request. Please fill out this form as completely as possible.
- type: textarea
attributes:
label: What exactly are you trying to do?
description: Describe in as much detail as possible.
validations:
required: true
- type: textarea
attributes:
label: What have you tried so far?
description: Describe what you have tried so far.
validations:
required: true
- type: textarea
attributes:
label: Output of any commands you have tried
description: Please copy and paste any relevant output. This will be automatically formatted into codeblock.
render: Shell
validations:
required: false
- type: textarea
attributes:
label: Additional context
description: Add any other context about the problem here.
validations:
required: false
- type: checkboxes
attributes:
label: Code of Conduct
description: By submitting this issue you agree to follow our [Code of Conduct](../../docs/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
- type: checkboxes
attributes:
label: Sensitive Information Declaration
description: To ensure the utmost confidentiality and protect your privacy, we kindly ask you to NOT including [PII (Personal Identifiable Information) / PID (Personal Identifiable Data)](https://digital.nhs.uk/data-and-information/keeping-data-safe-and-benefitting-the-public) or any other sensitive data in this form. We appreciate your cooperation in maintaining the security of your information.
options:
- label: I confirm that neither PII/PID nor sensitive data are included in this form
required: true
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/2_feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# See:
# - https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository
# - https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms
# - https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/common-validation-errors-when-creating-issue-forms

name: 🚀 Feature Request
description: Suggest an idea for this project
labels: ["feature request"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to file a feature request. Please fill out this form as completely as possible.
- type: textarea
attributes:
label: What is the problem this feature will solve?
description: Tell us why this change is needed or helpful and what problems it may help solve.
validations:
required: true
- type: textarea
attributes:
label: What is the feature that you are proposing to solve the problem?
description: Provide detailed information for what we should add.
validations:
required: true
- type: textarea
attributes:
label: What alternatives have you considered?
- type: checkboxes
attributes:
label: Code of Conduct
description: By submitting this issue you agree to follow our [Code of Conduct](../../docs/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
- type: checkboxes
attributes:
label: Sensitive Information Declaration
description: To ensure the utmost confidentiality and protect your privacy, we kindly ask you to NOT including [PII (Personal Identifiable Information) / PID (Personal Identifiable Data)](https://digital.nhs.uk/data-and-information/keeping-data-safe-and-benefitting-the-public) or any other sensitive data in this form. We appreciate your cooperation in maintaining the security of your information.
options:
- label: I confirm that neither PII/PID nor sensitive data are included in this form
required: true
63 changes: 63 additions & 0 deletions .github/ISSUE_TEMPLATE/3_bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# See:
# - https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository
# - https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms
# - https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/common-validation-errors-when-creating-issue-forms

name: 🐞 Bug Report
description: File a bug report
labels: ["bug", "triage"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to file a bug report. Please fill out this form as completely as possible.
- type: checkboxes
attributes:
label: Is there an existing issue for this?
description: Please, search the Issues to see if an issue already exists for the bug you have encountered.
options:
- label: I have searched the existing Issues
required: true
- type: textarea
attributes:
label: Current Behavior
description: A concise description of what you are experiencing.
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expect to happen.
validations:
required: true
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior
placeholder: |
1. In this environment...
2. With this config...
3. Run `...`
validations:
required: false
- type: textarea
attributes:
label: Output
description: Please copy and paste any relevant output. This will be automatically formatted into codeblock.
render: Shell
validations:
required: false
- type: checkboxes
attributes:
label: Code of Conduct
description: By submitting this issue you agree to follow our [Code of Conduct](../../docs/CODE_OF_CONDUCT.md)
options:
- label: I agree to follow this project's Code of Conduct
required: true
- type: checkboxes
attributes:
label: Sensitive Information Declaration
description: To ensure the utmost confidentiality and protect your privacy, we kindly ask you to NOT including [PII (Personal Identifiable Information) / PID (Personal Identifiable Data)](https://digital.nhs.uk/data-and-information/keeping-data-safe-and-benefitting-the-public) or any other sensitive data in this form. We appreciate your cooperation in maintaining the security of your information.
options:
- label: I confirm that neither PII/PID nor sensitive data are included in this form
required: true
1 change: 0 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] Documentation

## Checklist

Expand Down
1 change: 1 addition & 0 deletions .github/actions/lint-terraform/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ runs:
run: |
stacks=${{ inputs.root-modules }}
for dir in $(find infrastructure/environments -maxdepth 1 -mindepth 1 -type d; echo ${stacks//,/$'\n'}); do
dir=$dir opts='-backend=false' make terraform-init
dir=$dir make terraform-validate
done
10 changes: 10 additions & 0 deletions .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Make Config Action
description: Install dependencies and execute make config

runs:
using: composite
steps:
- name: Install dependencies and execute make config
shell: bash
run: |
scripts/setup/setup.sh
17 changes: 17 additions & 0 deletions .github/actions/tfsec/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: "TFSec Scan"
description: "Scan HCL using TFSec"
runs:
using: "composite"
steps:
- name: "TFSec Scan - Components"
shell: bash
run: |
for component in $(find infrastructure/terraform/components -mindepth 1 -type d); do
scripts/terraform/tfsec.sh $component
done
- name: "TFSec Scan - Modules"
shell: bash
run: |
for module in $(find infrastructure/terraform/modules -mindepth 1 -type d); do
scripts/terraform/tfsec.sh $module
done
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,3 @@ version.json
!project.code-workspace

# Please, add your custom content below!

!nhs-notify.code-workspace
2 changes: 2 additions & 0 deletions .gitleaksignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# SEE: https://github.com/gitleaks/gitleaks/blob/master/README.md#gitleaksignore

cd9c0efec38c5d63053dd865e5d4e207c0760d91:docs/guides/Perform_static_analysis.md:generic-api-key:37
96096685ab3d6876671e2bc9a6ff4d48fc56e521:src/helloworld/helloworld.sln:ipv4:4
4f4e8c15629b2cb09356a7fed4d72953590227ce:docs/Gemfile.lock:ipv4:4
67 changes: 67 additions & 0 deletions infrastructure/terraform/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
### Terraform ###

# Transient backends
components/**/backend_tfscaffold.tf

# Exclude all .tfvars files, which are likely to contain sensitive data, such as
# password, private keys, and other secrets. These should not be part of version
# control as they are data points which are potentially sensitive and subject
# to change depending on the environment.
*.tfvars
*.tfvars.json

# Compiled files
**/*.tfstate
**/*.tfplan
**/*.tfstate.backup
**/.terraform
**/.terraform.lock.hcl
**/.terraform/*
**/build/*
**/work/*
**/*tfstate.lock.info

# Scaffold Plugin Cache
plugin-cache/*

# PyCache
**/__pycache__

### OSX ###
**/.DS_Store
**/.AppleDouble
**/.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

*.swp
.nyc_output

# VS Code
.vscode

# IntelliJ Idea
.idea
**/*.iml

# js
node_modules
3 changes: 3 additions & 0 deletions infrastructure/terraform/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This is an implementation of https://github.com/tfutils/tfscaffold for NHS Notify

Update the `etc/global.tfvars` file according to your NHS Notify Domain, and follow https://github.com/tfutils/tfscaffold?tab=readme-ov-file#bootstrapping to get your tfstate s3 bucket set up
Loading