-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nicholas Deis
authored and
Nicholas Deis
committed
Nov 30, 2024
1 parent
e5c3980
commit 06bb7da
Showing
8 changed files
with
84 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,6 @@ tests/* | |
*.log | ||
staging/* | ||
.travis.yml | ||
.github/* | ||
.github/* | ||
src/* | ||
tsconfig.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import type { Rule } from "eslint"; | ||
declare const meta: { | ||
name: string; | ||
version: string; | ||
}; | ||
declare const rules: { | ||
"no-pattern-match": Rule.RuleModule; | ||
"no-secrets": Rule.RuleModule; | ||
}; | ||
export { meta, rules }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import type { Rule } from "eslint"; | ||
declare const noPatternMatch: Rule.RuleModule; | ||
export default noPatternMatch; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* From https://github.com/dxa4481/truffleHogRegexes/blob/master/truffleHogRegexes/regexes.json | ||
*/ | ||
declare const _default: { | ||
"Slack Token": RegExp; | ||
"RSA private key": RegExp; | ||
"SSH (OPENSSH) private key": RegExp; | ||
"SSH (DSA) private key": RegExp; | ||
"SSH (EC) private key": RegExp; | ||
"PGP private key block": RegExp; | ||
"Facebook Oauth": RegExp; | ||
"Twitter Oauth": RegExp; | ||
GitHub: RegExp; | ||
"Google Oauth": RegExp; | ||
"AWS API Key": RegExp; | ||
"Heroku API Key": RegExp; | ||
"Generic Secret": RegExp; | ||
"Generic API Key": RegExp; | ||
"Slack Webhook": RegExp; | ||
"Google (GCP) Service-account": RegExp; | ||
"Twilio API Key": RegExp; | ||
"Password in URL": RegExp; | ||
}; | ||
export default _default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
export declare const DEFAULT_ADDTIONAL_REGEXES: {}; | ||
type PlainObject = { | ||
[key: string | number]: any; | ||
}; | ||
export declare function isPlainObject(obj: any): obj is PlainObject; | ||
export declare function plainObjectOption(value: any, name: string, defaultValue: PlainObject): PlainObject; | ||
export declare function validateRecordOfRegex(recordOfRegex: PlainObject): Record<string, RegExp>; | ||
export declare function checkOptions({ tolerance, additionalRegexes, ignoreContent, ignoreModules, ignoreIdentifiers, additionalDelimiters, ignoreCase, }: { | ||
tolerance: any; | ||
additionalRegexes: any; | ||
ignoreContent: any; | ||
ignoreModules: any; | ||
ignoreIdentifiers: any; | ||
additionalDelimiters: any; | ||
ignoreCase: any; | ||
}): { | ||
tolerance: number; | ||
additionalRegexes: Record<string, RegExp>; | ||
ignoreContent: RegExp[]; | ||
ignoreModules: any; | ||
ignoreIdentifiers: RegExp[]; | ||
additionalDelimiters: RegExp[]; | ||
ignoreCase: any; | ||
}; | ||
/** | ||
* From https://github.com/dxa4481/truffleHog/blob/dev/truffleHog/truffleHog.py#L85 | ||
* @param {*} str | ||
*/ | ||
export declare function shannonEntropy(str: string): number; | ||
export declare function isModulePathString(node: any): boolean; | ||
export declare function getIdentifierName(node: any): false | string; | ||
export declare const HIGH_ENTROPY = "HIGH_ENTROPY"; | ||
export declare const PATTERN_MATCH = "PATTERN_MATCH"; | ||
export declare const FULL_TEXT_MATCH = "FULL_TEXT_MATCH"; | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters