Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including scan-for-secrets with all npm packages installed. Try it out:

var scanForSecrets = require("scan-for-secrets")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

scan-for-secrets v2.0.3

Scans each file in your repository for AWS access secrets and flags any vulnerabilities.

An NPM package which scans a given directory for the inclusion of AWS keys.

Requires

Node 8+

Installation

  1. Install package

    npm install --save-dev scan-for-secrets
    
  2. Add the script to package.json with the directory in which you want to scan for keys

    {
      "scripts" : {
        "scan-for-secrets": "scan-for-secrets <directory-to-scan>",
        ...
      }
      ...
    }
    
  3. Add to pre-commit hook in package.json (optional)

    {
        "pre-commit": [
          "scan-for-secrets"
        ],
    }
    
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free