Skip to content

Commit 0c22c83

Browse files
Merge branch 'main' into PRMP-627
2 parents 42890f9 + 9f756ab commit 0c22c83

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+13742
-56
lines changed

.github/workflows/automated-deploy-dev.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,15 +222,19 @@ jobs:
222222
AWS_ASSUME_ROLE: ${{ secrets.AWS_ASSUME_ROLE }}
223223

224224
notify-slack:
225+
name: Notify Slack on Failure
225226
runs-on: ubuntu-latest
227+
environment: development
226228
needs: [terraform_plan_apply, deploy_lambdas, deploy_ui]
227229
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/main'
228230
steps:
229231
- name: Configure AWS Credentials
230232
uses: aws-actions/configure-aws-credentials@v5
231233
with:
232234
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE }}
235+
role-skip-session-tagging: true
233236
aws-region: ${{ vars.AWS_REGION }}
237+
mask-aws-account-id: true
234238

235239
- name: Get slack bot token from SSM parameter store
236240
run: |

.github/workflows/automated-sbom-repo-scan.yml renamed to .github/workflows/automated-pr-validator.yml

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
name: 'Z-AUTOMATED: SBOM Repo Scan'
1+
name: "Z-AUTOMATED: PR Validator"
22

33
on:
44
pull_request:
55
types: [opened, synchronize, reopened]
66

7-
permissions:
8-
actions: read # Required for anchore/sbom-action
9-
contents: write # Required for anchore/sbom-action
10-
id-token: write # Required for requesting the JWT
11-
pull-requests: write
12-
137
jobs:
148
sbom_scan:
159
name: SBOM Repo Scan
1610
runs-on: ubuntu-latest
11+
permissions:
12+
actions: read # Required for anchore/sbom-action
13+
contents: write # Required for anchore/sbom-action
14+
id-token: write # Required for requesting the JWT
15+
pull-requests: write
1716
steps:
18-
- uses: actions/checkout@v5
17+
- name: Checkout
18+
uses: actions/checkout@v5
1919
with:
20-
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
20+
fetch-depth: 0
2121

2222
- uses: anchore/sbom-action@v0
2323
with:
@@ -51,14 +51,14 @@ jobs:
5151
repo: context.repo.repo,
5252
issue_number: context.issue.number,
5353
})
54-
54+
5555
const botComment = comments.find(comment => {
5656
return comment.user.type === 'Bot' && comment.body.includes('Code security issues found')
5757
})
5858
5959
// 2. Prepare format of the comment
6060
const output = `### Code security issues found
61-
61+
6262
View full details [here](https://github.com/${{ github.repository }}/security/code-scanning?query=is%3Aopen+pr%3A${{ github.event.pull_request.number }}).`;
6363
6464
// 3. If we have a comment, update it, otherwise create a new one
@@ -70,7 +70,7 @@ jobs:
7070
body: output
7171
})
7272
}
73-
73+
7474
github.rest.issues.createComment({
7575
issue_number: context.issue.number,
7676
owner: context.repo.owner,
@@ -89,7 +89,7 @@ jobs:
8989
repo: context.repo.repo,
9090
issue_number: context.issue.number,
9191
})
92-
92+
9393
const botComment = comments.find(comment => {
9494
return comment.user.type === 'Bot' && comment.body.includes('Code security issues found')
9595
})
@@ -102,3 +102,21 @@ jobs:
102102
comment_id: botComment.id
103103
})
104104
}
105+
106+
markdown-validation:
107+
name: Markdown Validation
108+
runs-on: ubuntu-latest
109+
permissions:
110+
contents: read
111+
steps:
112+
- name: Checkout
113+
uses: actions/checkout@v6
114+
with:
115+
fetch-depth: 0
116+
117+
- name: Run Markdown Validation Script
118+
id: validate
119+
run: |
120+
BRANCH_NAME=${{ github.event.repository.default_branch }}
121+
chmod +x scripts/markdown-validator.sh
122+
scripts/markdown-validator.sh

.github/workflows/automated-sonarqube-cloud-analysis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,19 @@ jobs:
2828
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
2929

3030
notify-slack:
31+
name: Notify Slack on Failure
3132
runs-on: ubuntu-latest
33+
environment: development
3234
needs: [sonarqube_cloud]
3335
if: failure() && github.event_name == 'push' && github.ref == 'refs/heads/main'
3436
steps:
3537
- name: Configure AWS Credentials
3638
uses: aws-actions/configure-aws-credentials@v5
3739
with:
3840
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE }}
41+
role-skip-session-tagging: true
3942
aws-region: ${{ vars.AWS_REGION }}
43+
mask-aws-account-id: true
4044

4145
- name: Get slack bot token from SSM parameter store
4246
run: |

.github/workflows/cron-daily-health-check.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,15 +198,19 @@ jobs:
198198
secrets: inherit
199199

200200
notify-slack:
201+
name: Notify Slack on Failure
201202
runs-on: ubuntu-latest
203+
environment: development
202204
needs: [terraform_plan_apply, run_lambda_unit_tests, run_ui_unit_tests, run_cypress_tests, publish_lambda_layers, deploy_lambdas, deploy_ui]
203205
if: failure()
204206
steps:
205207
- name: Configure AWS Credentials
206208
uses: aws-actions/configure-aws-credentials@v5
207209
with:
208210
role-to-assume: ${{ secrets.AWS_ASSUME_ROLE }}
211+
role-skip-session-tagging: true
209212
aws-region: ${{ vars.AWS_REGION }}
213+
mask-aws-account-id: true
210214

211215
- name: Get slack bot token from SSM parameter store
212216
run: |

.markdownlint.jsonc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"MD013": false,
3+
"MD033": false
4+
}

.terraform-docs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ sections:
1414

1515
content: |-
1616
{{ .Requirements }}
17+
1718
{{ .Resources }}
19+
1820
{{ .Inputs }}
21+
1922
{{ .Outputs }}
2023
2124
output:

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ This repository is used to build the infrastructure the NDR. That is it's sole p
88
- [Terraform docs](https://github.com/terraform-docs/terraform-docs)
99

1010
To install terraform-docs on WSL use the following commands (e.g. for v0.20.0):
11-
```
11+
12+
```shell
1213
curl -sSLo ./terraform-docs.tar.gz https://terraform-docs.io/dl/v0.20.0/terraform-docs-v0.20.0-$(uname)-amd64.tar.gz
1314
tar -xzf terraform-docs.tar.gz
1415
chmod +x terraform-docs
@@ -24,7 +25,7 @@ As this repository is a standalone infrastructure there is no python/node based
2425

2526
- Set this repository to get it's pre-commit hooks from .githooks
2627

27-
```
28+
```shell
2829
git config core.hooksPath .githooks
2930
```
3031

bootstrap/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Terraform Bootstrap
2+
13
## Requirements
24

35
| Name | Version |

infrastructure/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# National Document Repository - Infrastructure as Code
2+
13
## Requirements
24

35
| Name | Version |

infrastructure/api.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,15 @@ resource "aws_api_gateway_deployment" "ndr_api_deploy" {
7676
module.send-feedback-gateway,
7777
module.send-feedback-lambda,
7878
module.review_document_version_gateway,
79+
module.review_document_status_gateway,
80+
module.review-document-status-check-lambda,
7981
module.update-doc-ref-lambda,
8082
module.update-upload-state-gateway,
8183
module.update-upload-state-lambda,
8284
module.document-status-check-gateway,
8385
module.document-status-check-lambda,
8486
module.post-document-references-fhir-lambda,
87+
module.post_document_review_lambda,
8588
module.patch_document_review_lambda,
8689
module.virus_scan_result_gateway,
8790
module.virus_scan_result_lambda

0 commit comments

Comments
 (0)