1.0.7 • Published 9 years ago

code-check v1.0.7

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

code-check

Node.js module to check your repository for private key files and JavaScript code for sensitive tokens and keys. Can help you prevent a commit if such files/code are found. It uses the Esprima parser to analyze the code ( esprima.org ).

Note: Fixed Esprima dependency & restrictedKeywords.json issues

Installation

npm install code-check

Usage

//Require the 'code-check' module
var codeCheck = require('code-check');

/*Run the check for sensitive files/code 
in your current working directory and its children*/
codeCheck.runCheck();

Configuration

Present in /node_modules/code-check/restrictedKeywords.json.

{
	"keyWords" : [
		"accessKeyId",
		"secretAccessKey",
		"token",
		"secret"
	],

	"keyFiles" : [
		"keys",
		"key",
		"id_rsa",
		".pub",
		".pem"
	],
	
	"ignored" : []	
}

Enter keywords to search for in your JavaScript code, in 'keyWords[]'. Enter keywords to search for sensitive filenames, in 'keyFiles[]'. Enter files to be ignored for sensitive content in 'ignored[]'.

Some defaults have been set up.

Result

After the check finishes running, the tool will give your repo a clean chit or warn you of potentially sensitive files/code in your repo

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago