0.1.14 • Published 3 years ago

simplify-security v0.1.14

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Security & Operation

NPM Downloads Package Version

This project aims to cover SecOps for AWS Lambda serverless first. To use this package, install it as a global comand line tool:

npm install -g simplify-security

Define a function list in CSV format:

Region,Account,FunctionName,Version,LogRetention,KMS,SecureFunction,SecureLog
eu-west-1,123456789012,test-function-kms,,90,1,TRUE,FALSE

Command Line Support:

  • Verify deployed functions against your list of definitions
    • simplify-security -p simplify-eu verify -i functions.csv --simple
  • Record a snapshot with current state of functions
    • simplify-security -p simplify-eu snapshot -i functions.csv -o .snapshot
  • Verify deployed functions with a specified snapshot date
    • simplify-security -p simplify-eu verify -i functions.csv -b 2020-06-21
  • Check deployed functions and functions' parameters
    • simplify-security -p simplify-eu check -i functions.csv
  • Patch deployed functions with functions' parameters
    • simplify-security -p simplify-eu patch -i functions.csv
  • Monitor deployed functions with standard simple view metrics

    eg: options for last 12 hours with sample in every 5 mins (5*60 = 300) seconds

    • simplify-security -p simplify-eu metric -i functions.csv -t 300 -h 12

    eg: drawing the function data with index=1 and INVOCATIONS (1) as a timeseries chart

    • simplify-security -p simplify-eu metric -i functions.csv -t 300 -h 12 --plot 1,1

      2.00 ┼╮ 1.95 ┤│ 1.90 ┤│ 1.85 ┤│ 1.80 ┤│ 1.75 ┤│ 1.70 ┤│ 1.65 ┤│ 1.60 ┤│ 1.55 ┤│ 1.50 ┤│ 1.45 ┤│ 1.40 ┤│ 1.35 ┤│ 1.30 ┤│ 1.25 ┤│ 1.20 ┤│ 1.15 ┤│ 1.10 ┤│ 1.05 ┤│ 1.00 ┤╰

    • 1- Invocations BLUE: 3 | 2- Errors RED: 0 | 3- Max Duration GREEN: 938.53 | 4- Max Concurrency YELLOW: 2 | 5- Throttles WHITE: 4

Example of (security) metrics:


IndexFunctionCodeSHA256LayersLogRetentionEncryptionKeySecureFunctionSecureLog
1test-function-foo9AD72= (OK)1 (OK)90 / 90 (OK)KMS (OK)YES (OK)NO (OK)
2foo-secret-managerf4Bfa= (OK)1 (OK)90 / 90 (OK)Default (OK)YES (PATCH)YES (PATCH)
3foo-user-managerbcBa1= (OK)1 (OK)90 / 90 (OK)Default (OK)NO (OK)NO (OK)

Example of (operation) metrics:


IndexFunctionInvocationsErrorsDurationConcurrency
1test-function-foo1204321.4331
2foo-secret-manager101161.001
3foo-user-manager10938.531
Statistics in 12 hours12241161.0033