darkmsph1t / _spartan

npm project to package & configure common security middleware && add security.js file to code repo
5 stars 0 forks source link

Coverage Status

THIS. IS._SPARTAN!

node application to package & configure common security middleware into your application => returns a policy file and boilerplate code

QUICK START!

  1. Create a new application: npm init to accept the defaults be sure to use the ‘-y’ flag optional: Enable version control w/ git: git init
  2. Install the package:

    npm install -g spartan-shield


    installs _spartan as a command line module you can use in any project
    • There’s some wonkiness installing on Linux using the -g flag as access to /usr/bin/ requires elevated permissions. To overcome this, install as sudo npm install -g spartan-shield. If necessary, you should still be able to install and run it locally without the global flag
  3. Run the package: _spartan init creates a policy based upon your answers to a few questions. Use ‘y’ to generate a default policy and boilerplate code

HOW YOU KNOW IT WORKED

Assuming there are no errors, you will see 3 new files/folders in your local directory:

HOW YOU KNOW IT DIDN’T WORK

_spartan throws ‘ENOENT’ (no entity) errors for each of the following conditions

Other potential installation errors

Required programs missing => _spartan won’t be able to generate integrity (hash) values if either shasum or openssl utilities are missing; if you don’t already have them installed, use homebrew or similar to install them or make sure they are correctly linked to /usr/bin | /usr/local/bin system directories depending upon your operating system

EXAMPLES!

See the example apps in the example folder

MORE INFORMATION!