Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-no-secrets

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-no-secrets - npm Package Compare versions

Comparing version 0.5.4 to 0.6.4

staging/has-no-secret.json

14

index.js

@@ -66,3 +66,3 @@ const {

//flatten
tokens = [].concat.apply([],tokens);
tokens = [].concat.apply([], tokens);
});

@@ -73,3 +73,3 @@ return tokens;

function checkEntropy(value) {
value = ignoreCase ? value.toLowerCase():value;
value = ignoreCase ? value.toLowerCase() : value;
const tokens = splitIntoTokens(value);

@@ -130,3 +130,13 @@ return tokens

}
},
processors: {
".json": {
preprocess(text) {
return [`var json = ${text}`];
},
postprocess(messages, fileName) {
return messages[0];
}
}
}
};

11

package.json
{
"name": "eslint-plugin-no-secrets",
"version": "0.5.4",
"version": "0.6.4",
"description": "An eslint rule that searches for potential secrets/keys in code",
"main": "index.js",
"scripts": {
"test": "node tests/lib/rules/no-secrets.js"
"test": "node tests/lib/rules/no-secrets.js && mocha \"staging/**/*.spec.js\"",
"test:staging": "mocha \"staging/**/*.spec.js\""
},

@@ -23,4 +24,6 @@ "keywords": [

"devDependencies": {
"eslint-plugin-self": "^1.2.0",
"eslint5": "npm:eslint@^5.16.0",
"eslint6": "npm:eslint@^6.8.0"
"eslint6": "npm:eslint@^6.8.0",
"mocha": "^7.1.0"
},

@@ -33,4 +36,4 @@ "peerDependencies": {

"npm": ">=6.9.0",
"node":">=10.0.0"
"node": ">=10.0.0"
}
}

@@ -6,12 +6,13 @@ [![Build Status](https://travis-ci.org/nickdeis/eslint-plugin-no-secrets.svg)](https://travis-ci.org/nickdeis/eslint-plugin-no-secrets)

An eslint rule that searches for potential secrets/keys in code.
An eslint rule that searches for potential secrets/keys in code and JSON files.
<!-- vscode-markdown-toc -->
* 1. [Usage](#Usage)
* 1.1. [Include JSON files](#IncludeJSONfiles)
* 2. [Config](#Config)
* 3. [When it's really not a secret](#Whenitsreallynotasecret)
* 3.1. [1. Either disable it with a comment](#Eitherdisableitwithacomment)
* 3.2. [2. use the `ignoreContent` to ignore certain content](#usetheignoreContenttoignorecertaincontent)
* 3.3. [3. Use `ignoreIdentifiers` to ignore certain variable/property names](#UseignoreIdentifierstoignorecertainvariablepropertynames)
* 3.4. [4. Use `additionalDelimiters` to further split up tokens](#UseadditionalDelimiterstofurthersplituptokens)
* 3.1. [ Either disable it with a comment](#Eitherdisableitwithacomment)
* 3.2. [ use the `ignoreContent` to ignore certain content](#usetheignoreContenttoignorecertaincontent)
* 3.3. [ Use `ignoreIdentifiers` to ignore certain variable/property names](#UseignoreIdentifierstoignorecertainvariablepropertynames)
* 3.4. [ Use `additionalDelimiters` to further split up tokens](#UseadditionalDelimiterstofurthersplituptokens)
* 4. [Options](#Options)

@@ -47,2 +48,12 @@ * 5. [Acknowledgements](#Acknowledgements)

### 1.1. <a name='IncludeJSONfiles'></a>Include JSON files
If you want to include JSON files, either us the `--ext` flag from the command line
`eslint . --ext .json,.js`
or run them on individual JSON files
`eslint config.json`
## 2. <a name='Config'></a>Config

@@ -78,3 +89,3 @@

### 3.1. <a name='Eitherdisableitwithacomment'></a>1. Either disable it with a comment
### 3.1. <a name='Eitherdisableitwithacomment'></a> Either disable it with a comment

@@ -81,0 +92,0 @@ ```javascript

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc