Skip to content

Commit

Permalink
Improving Codespaces and Setup Experince (#9)
Browse files Browse the repository at this point in the history
* So many nice changes to put into one

* making it executable

* Code cleanup task

* Changelog updates

* updated information
  • Loading branch information
NickLiffen authored Dec 6, 2021
1 parent e708a4c commit d58eeed
Show file tree
Hide file tree
Showing 47 changed files with 12,449 additions and 30,593 deletions.
37 changes: 19 additions & 18 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"name": "nickliffen/ghas-enablement",
"image": "ghcr.io/nickliffen/csenv:main",
"settings": {},
"extensions": [
"dbaeumer.vscode-eslint",
"hookyqr.beautify",
"naumovs.color-highlight",
"redhat.vscode-yaml",
"vscode-icons-team.vscode-icons",
"wayou.vscode-todo-highlight",
"esbenp.prettier-vscode",
"ms-vscode.vscode-typescript-next",
"github.copilot",
"donjayamanne.githistory",
"nixon.env-cmd-file-syntax"
],
"remoteUser": "root"
}
"name": "nickliffen/GSSAR",
"image": "ghcr.io/nickliffen/csenv:main",
"settings": {},
"extensions": [
"dbaeumer.vscode-eslint",
"hookyqr.beautify",
"naumovs.color-highlight",
"redhat.vscode-yaml",
"vscode-icons-team.vscode-icons",
"wayou.vscode-todo-highlight",
"esbenp.prettier-vscode",
"ms-vscode.vscode-typescript-next",
"github.copilot",
"donjayamanne.githistory",
"nixon.env-cmd-file-syntax"
],
"postCreateCommand": "yarn install --frozen-lockfile && yarn run codespace-setup",
"remoteUser": "root"
}
12 changes: 6 additions & 6 deletions .devcontainer/setup.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ function setup {
[ -L "${d%/}" ] && continue
echo "Processing $d"
cd "$d"
npm install
npm run format
npm run build
yarn
cd ..
done
}

cd /workspaces/GCSMTTR/functions/helpers
cd /workspaces/GSSAR/functions/helpers

setup

cd /workspaces/GCSMTTR/functions/authorizers
cd /workspaces/GSSAR/functions/authorizers

setup

cd /workspaces/GCSMTTR/functions/remediators
cd /workspaces/GSSAR/functions/remediators

setup
File renamed without changes.
10 changes: 10 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
]
}
48 changes: 24 additions & 24 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Deploying GSSAR
'on':
"on":
push:
branches:
- main
Expand All @@ -19,55 +19,55 @@ jobs:
- name: Setup NodeJS
uses: actions/setup-node@v2
with:
node-version: '16'
node-version: "16"
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
python-version: "3.8"
- name: Setup AWS SAM
uses: aws-actions/setup-sam@v1
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: '${{ secrets.AWS_ACCESS_KEY_ID }}'
aws-secret-access-key: '${{ secrets.AWS_SECRET_ACCESS_KEY }}'
aws-region: '${{ env.REGION }}'
aws-access-key-id: "${{ secrets.AWS_ACCESS_KEY_ID }}"
aws-secret-access-key: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
aws-region: "${{ env.REGION }}"
- name: Install and Build Function (GithubWebhookIPValidator)
run: |
cd ./functions/authorizers/githubWebhookIPValidator
npm cache clean --force
npm install
npm run build
yarn cache clean --force
yarn install --frozen-lockfile
yarn run build
- name: Install and Build Function (GithubWebhookSecretValidator)
run: |
cd ./functions/authorizers/githubWebhookSecretValidator
npm cache clean --force
npm install
npm run build
yarn cache clean --force
yarn install --frozen-lockfile
yarn run build
- name: Install and Build Function (GetSecretDetails)
run: |
cd ./functions/helpers/getSecretDetails
npm cache clean --force
npm install
npm run build
yarn cache clean --force
yarn install --frozen-lockfile
yarn run build
- name: Install and Build Function (CloseSecret)
run: |
cd ./functions/helpers/closeSecret
npm cache clean --force
npm install
npm run build
yarn cache clean --force
yarn install --frozen-lockfile
yarn run build
- name: Install and Build Function (GithubIssueNotifier)
run: |
cd ./functions/helpers/githubIssueNotifier
npm cache clean --force
npm install
npm run build
yarn cache clean --force
yarn install --frozen-lockfile
yarn run build
- name: Install and Build Function (RemediateAWSAccessKey)
run: |
cd ./functions/remediators/remediateAWSAccessKey
npm cache clean --force
npm install
npm run build
yarn cache clean --force
yarn install --frozen-lockfile
yarn run build
- name: SAM Build
run: sam build --use-container
- name: SAM Deploy
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Testing GSSAR
'on':
"on":
push:
branches:
- main
Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yarn run check
14 changes: 10 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,20 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v1.1.0](https://github.com/NickLiffen/GSSAR/releases/v1.1.0) - 2021-12-06

- Better Codespaces setup
- More consistentcy across `README.md` files.
- Moving from `npm` to `yarn`.

## [v1.0.1](https://github.com/NickLiffen/GSSAR/releases/v1.0.0) - 2021-09-09

- Authorizers: Fixed a bug where the github secret was not getting validated

## [v1.0.0](https://github.com/NickLiffen/GSSAR/releases/v1.0.0) - 2021-09-03

- Authorizers: Functions that validates the webhook comes from a valid GitHub IP and validates the secret.
- Helpers: Functions that support the end-to-end process for GSSAR but do not perform any remediation. E.G. Function for closing a secret.
- Remediators: Functions that revoke certain secret types.
- GitHub workflow that deploys the solution to AWS.
- Infrastructure as Code (IaC) written in Cloud Formation.
- Helpers: Functions that support the end-to-end process for GSSAR but do not perform any remediation. E.G. Function for closing a secret.
- Remediators: Functions that revoke certain secret types.
- GitHub workflow that deploys the solution to AWS.
- Infrastructure as Code (IaC) written in Cloud Formation.
Loading

0 comments on commit d58eeed

Please sign in to comment.