The Australian Cyber Security Centre (ACSC) has published a series of strategies to mitigate cyber-security incidents. The strategies focus on three categories of threat:
- Malicious software (malware) delivery and execution:
- Network propagation
- Data exfiltration
Eight of the mitigation strategies are classified as essential, and are recommended as a baseline to mitigate cyber-security threats.
The Essential Eight Maturity Model. the model defines three maturity levels for each of the eight mitigation strategies. The maturity levels indicate to what level an organisation is aligned to the mitigation strategies.
The Securebiz web application is a tool designed to assist small and medium-size businesses, who do not have cyber-security specialists, to ascertain their level of preparedness. The application uses a set of core questions based on the Essential Eight Maturity Model to calculate an organisation’s maturity level.
A series of ancillary questions are available that allow an organisation to assess other mitigation strategies beyond the essential eight.
- backend - application server (Lambda)
- database - database schema, plus backups
- documentations - previous administrative files
- express - previous application server, used as reference only
- fontend - web application (Amplify)
- scripts - testing scripts
Setup Prettier on VS Code
- Open VS Code
- Go to Extensions by press Ctrl + Shift + X
- Press Install
Ensure you have NodeJS version is 14.16.0 or above, run node -v.
-
Go to your local sercurebiz folder, run
git checkout master -
run
git pull(or merge master/rebase onto master if you are on your feature branch) -
Create 3 env files
.env.dev, .env.test, .env.produnder /backend folder. Copy thebackend/.env.templatefile's content and parse it to the.envfile created. (or copy.env.templatefile to a new file named.env):cd backend && touch .env && cat .env.template > .envorcd backend && cp .env.template .env -
Update these values of the .env files:
MONGODB_ENV=atlas ATLAS_DB_USER=atlas_db_user_name ATLAS_DB_PASSWORD=atlas_db_user_password MONGODB_DB_NAME=securebiz MONGODB_SESSION_COLLECTION_NAME=sessions MONGODB_SESSION_SECRET=any_string_scret_of_your_choice TOKEN_SECRET=tokenSecret ENCRYPT_SECRET=encryptSecret -
Once done the above, remove
backend/node_modulesfolder (if you have already had that). -
In
backenddirectory, runnpm ci.Note, this is different from
npm install, it'll install the node dependencies with the exact version numbers as specified inpackage-lock.jsonfile. -
In
backenddirectory, runnpm startto bring up the API server. -
Run DB migration
migratecommand to initialise Atlas DB using JSON data fromdatabase/(requires DB and.envvariable setup):- Command format:
npm run migrate [modelName] [command] - Eg. To clear
Questionmodel's collection (which isQuestions) run:npm run migrate Questions downthis will clear up Questions collection. To populateQuestionmodel's collection usingdatabase/Questions.jsonfile's data, run:npm run migrate Questions up
- Command format:
Note: If you are getting alot of squiggles from eslint/prettier, this usually mean there is an issue with 'End of Line Sequence'. Try change CRLF to LF
- Run
AWS configureon command line, if undefined, please install AWS CLI - Run
serverlesson command line, if undefined, please install npm i -g serverless - Run
AWS configure, set to Deakin's ASD account - Deploy to test env, run
npm run deploytest. Or, deploy to prod, runnpm run deployprod
Note: To remove deployment run, npm run removetest or npm run removeprod
Troubleshoot Tips:
If you get build error run rm -r .serverless && rm -r .build, than run step 4 again.
- Go to your local sercurebiz folder, run
git checkout master - run
git pull(or merge master/rebase onto master if you are on your feature branch) - Go to
./frontend/ folder - Run command (using your terminal such as GitBash, PowerShell)
npm ci - Run command
npm start - Application should run from http://localhost:8081/
- Open
./src/Config/Config.tsx - Change stage to the appropriate value
'test'or'prod' - Run
npm run build - Go to
./public/ - Zip all files (including js and folders)
- Sign in to AWS Console to manually deploy
Note: Unfortunately, with Amplify's zip upload method, there is no env variable option, hence need to manually change the stage.
##Note:
- By default hot reload server will run on port 8081, however if that is occupied, it will increment to the next available port. If so, please go to
./src/Config/Config.tsxand changeclientBaseURLto the port used. - For the application to work correct, the
back-end API servershould be 1st be running.