Skip to content

Commit

Permalink
CCM-5100: Update pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
m-houston committed Jul 2, 2024
1 parent 3447ab6 commit ae7793b
Show file tree
Hide file tree
Showing 12 changed files with 56 additions and 104 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ amplifyconfiguration*

.next
.env
.idea
8 changes: 0 additions & 8 deletions .idea/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions .idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

12 changes: 0 additions & 12 deletions .idea/nhs-notify-iam.iml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

2 changes: 1 addition & 1 deletion amplify/package.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"type": "module"
}
}
14 changes: 8 additions & 6 deletions components/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,18 @@ function components(redirectPath: string): DefaultComponents {
>
Sign in to your account
</Heading>
<div className="login-oidc"
style={{
position: 'relative',
padding: `${tokens.space.xl} ${tokens.space.xl} 0 ${tokens.space.xl}` }}>
<div
className="login-oidc"
style={{
position: 'relative',
padding: `${tokens.space.xl} ${tokens.space.xl} 0 ${tokens.space.xl}`
}}>
<Button
className="login-oidc__button"
style={{width: '100%'}}
style={{ width: '100%' }}
onClick={() => auth0Login(redirectPath)}>Log in with Auth0</Button>
</div>
<div style={{textAlign:'center'}}>
<div style={{ textAlign: 'center' }}>
or
</div>
</>
Expand Down
26 changes: 8 additions & 18 deletions docs/adr/ADR-001_AuthN_implementation_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,53 +26,43 @@

## Context



## Decision

### Assumptions

This decision is based on the following assumptions that are used to form a set of generic requirements for the implementation as a guide.

* A log-in form should be displayed within the web application layout
* The log-in form should allow configuration for OIDC federated
- A log-in form should be displayed within the web application layout
- The log-in form should allow configuration for OIDC federated
identity providers
* The log-in credentials should be captured and made available to
- The log-in credentials should be captured and made available to
other micro-frontends under the same domain

### Drivers



### Options



### Outcome

* The login and signout pages will be hosted as a micro-frontend
- The login and sign out pages will be hosted as a micro-frontend
using Amplify
* The frontend will be implemented using Next.js
* The backend auth service will be Cognito
* Cognito will be configured independently of Amplify to allow
- The frontend will be implemented using Next.js
- The backend auth service will be Cognito
- Cognito will be configured independently of Amplify to allow
later migration to an alternative hosting solution or login
portal if necessary
* Amplify utility library for React will be used to provide the
- Amplify utility library for React will be used to provide the
login form and manage the credentials cookie. This avoids
maintaining our own implementation of a security feature

### Rationale


## Consequences


## Compliance


## Notes


## Actions

## Tags
Expand Down
74 changes: 35 additions & 39 deletions scripts/config/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -1,40 +1,36 @@
repos:
- repo: local
hooks:
- id: scan-secrets
name: Scan secrets
entry: ./scripts/githooks/scan-secrets.sh
args: ["check=staged-changes"]
language: script
pass_filenames: false
- repo: local
hooks:
- id: check-file-format
name: Check file format
entry: ./scripts/githooks/check-file-format.sh
args: ["check=staged-changes"]
language: script
pass_filenames: false
- repo: local
hooks:
- id: check-markdown-format
name: Check Markdown format
entry: ./scripts/githooks/check-markdown-format.sh
args: ["check=staged-changes"]
language: script
pass_filenames: false
- repo: local
hooks:
- id: check-english-usage
name: Check English usage
entry: ./scripts/githooks/check-english-usage.sh
args: ["check=staged-changes"]
language: script
pass_filenames: false
- repo: local
hooks:
- id: lint-terraform
name: Lint Terraform
entry: ./scripts/githooks/check-terraform-format.sh
language: script
pass_filenames: false
- repo: local
hooks:
- id: scan-secrets
name: Scan secrets
entry: /usr/bin/env check=whole-history ./scripts/githooks/scan-secrets.sh
language: script
pass_filenames: false
- repo: local
hooks:
- id: check-file-format
name: Check file format
entry: /usr/bin/env check=branch ./scripts/githooks/check-file-format.sh
language: script
pass_filenames: false
- repo: local
hooks:
- id: check-markdown-format
name: Check Markdown format
entry: /usr/bin/env check=branch ./scripts/githooks/check-markdown-format.sh
language: script
pass_filenames: false
- repo: local
hooks:
- id: check-english-usage
name: Check English usage
entry: /usr/bin/env check=branch ./scripts/githooks/check-english-usage.sh
language: script
pass_filenames: false
- repo: local
hooks:
- id: lint-terraform
name: Lint Terraform
entry: ./scripts/githooks/check-terraform-format.sh
language: script
pass_filenames: false
1 change: 1 addition & 0 deletions scripts/config/vale/styles/Vocab/words/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ endfor
drawio
rawContent
endcapture
Cognito
4 changes: 2 additions & 2 deletions scripts/git-repo/branch-protection.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Github
# GitHub

## Branch Protection Rules

This will create the default branch protection rules using Github API.
This will create the default branch protection rules using GitHub API.

```sh
./branch-protection.sh $reponame $PAT
Expand Down

0 comments on commit ae7793b

Please sign in to comment.