-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding a bunch of new rules, update allowlist to include node_modules… (
#896) * Adding a bunch of new rules, update allowlist to include node_modules and vendor folders, extend helper config functions * use func instead of function in stopwords
- Loading branch information
1 parent
d196b83
commit 73a3cf8
Showing
33 changed files
with
1,243 additions
and
25 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
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,27 @@ | ||
package rules | ||
|
||
import ( | ||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets" | ||
"github.com/zricethezav/gitleaks/v8/config" | ||
) | ||
|
||
func CoinbaseAccessToken() *config.Rule { | ||
// define rule | ||
r := config.Rule{ | ||
RuleID: "coinbase-access-token", | ||
Description: "Coinbase Access Token", | ||
Regex: generateSemiGenericRegex([]string{"coinbase"}, | ||
alphaNumericExtendedShort("64")), | ||
SecretGroup: 1, | ||
Keywords: []string{ | ||
"coinbase", | ||
}, | ||
} | ||
|
||
// validate | ||
tps := []string{ | ||
generateSampleSecret("coinbase", | ||
secrets.NewSecret(alphaNumericExtendedShort("64"))), | ||
} | ||
return validate(r, tps, nil) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package rules | ||
|
||
import ( | ||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets" | ||
"github.com/zricethezav/gitleaks/v8/config" | ||
) | ||
|
||
func ConfluentSecretKey() *config.Rule { | ||
// define rule | ||
r := config.Rule{ | ||
RuleID: "confluent-secret-key", | ||
Description: "Confluent Secret Key", | ||
Regex: generateSemiGenericRegex([]string{"confluent"}, alphaNumeric("64")), | ||
SecretGroup: 1, | ||
Keywords: []string{ | ||
"confluent", | ||
}, | ||
} | ||
|
||
// validate | ||
tps := []string{ | ||
generateSampleSecret("confluent", secrets.NewSecret(alphaNumeric("64"))), | ||
} | ||
return validate(r, tps, nil) | ||
} | ||
|
||
func ConfluentAccessToken() *config.Rule { | ||
// define rule | ||
r := config.Rule{ | ||
RuleID: "confluent-access-token", | ||
Description: "Confluent Access Token", | ||
Regex: generateSemiGenericRegex([]string{"confluent"}, alphaNumeric("16")), | ||
SecretGroup: 1, | ||
Keywords: []string{ | ||
"confluent", | ||
}, | ||
} | ||
|
||
// validate | ||
tps := []string{ | ||
generateSampleSecret("confluent", secrets.NewSecret(alphaNumeric("16"))), | ||
} | ||
return validate(r, tps, nil) | ||
} |
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,26 @@ | ||
package rules | ||
|
||
import ( | ||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets" | ||
"github.com/zricethezav/gitleaks/v8/config" | ||
) | ||
|
||
func DatadogtokenAccessToken() *config.Rule { | ||
// define rule | ||
r := config.Rule{ | ||
RuleID: "datadogtoken-access-token", | ||
Description: "Datadogtoken Access Token", | ||
Regex: generateSemiGenericRegex([]string{"datadog"}, | ||
alphaNumeric("40")), | ||
SecretGroup: 1, | ||
Keywords: []string{ | ||
"datadog", | ||
}, | ||
} | ||
|
||
// validate | ||
tps := []string{ | ||
generateSampleSecret("datadog", secrets.NewSecret(alphaNumeric("40"))), | ||
} | ||
return validate(r, tps, nil) | ||
} |
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,25 @@ | ||
package rules | ||
|
||
import ( | ||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets" | ||
"github.com/zricethezav/gitleaks/v8/config" | ||
) | ||
|
||
func DroneciAccessToken() *config.Rule { | ||
// define rule | ||
r := config.Rule{ | ||
RuleID: "droneci-access-token", | ||
Description: "Droneci Access Token", | ||
Regex: generateSemiGenericRegex([]string{"droneci"}, alphaNumeric("32")), | ||
SecretGroup: 1, | ||
Keywords: []string{ | ||
"droneci", | ||
}, | ||
} | ||
|
||
// validate | ||
tps := []string{ | ||
generateSampleSecret("droneci", secrets.NewSecret(alphaNumeric("32"))), | ||
} | ||
return validate(r, tps, nil) | ||
} |
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,25 @@ | ||
package rules | ||
|
||
import ( | ||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets" | ||
"github.com/zricethezav/gitleaks/v8/config" | ||
) | ||
|
||
func EtsyAccessToken() *config.Rule { | ||
// define rule | ||
r := config.Rule{ | ||
RuleID: "etsy-access-token", | ||
Description: "Etsy Access Token", | ||
Regex: generateSemiGenericRegex([]string{"etsy"}, alphaNumeric("24")), | ||
SecretGroup: 1, | ||
Keywords: []string{ | ||
"etsy", | ||
}, | ||
} | ||
|
||
// validate | ||
tps := []string{ | ||
generateSampleSecret("etsy", secrets.NewSecret(alphaNumeric("24"))), | ||
} | ||
return validate(r, tps, nil) | ||
} |
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,25 @@ | ||
package rules | ||
|
||
import ( | ||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets" | ||
"github.com/zricethezav/gitleaks/v8/config" | ||
) | ||
|
||
func FinnhubAccessToken() *config.Rule { | ||
// define rule | ||
r := config.Rule{ | ||
RuleID: "finnhub-access-token", | ||
Description: "Finnhub Access Token", | ||
Regex: generateSemiGenericRegex([]string{"finnhub"}, alphaNumeric("20")), | ||
SecretGroup: 1, | ||
Keywords: []string{ | ||
"finnhub", | ||
}, | ||
} | ||
|
||
// validate | ||
tps := []string{ | ||
generateSampleSecret("finnhub", secrets.NewSecret(alphaNumeric("20"))), | ||
} | ||
return validate(r, tps, nil) | ||
} |
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,25 @@ | ||
package rules | ||
|
||
import ( | ||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets" | ||
"github.com/zricethezav/gitleaks/v8/config" | ||
) | ||
|
||
func FlickrAccessToken() *config.Rule { | ||
// define rule | ||
r := config.Rule{ | ||
RuleID: "flickr-access-token", | ||
Description: "Flickr Access Token", | ||
Regex: generateSemiGenericRegex([]string{"flickr"}, alphaNumeric("32")), | ||
SecretGroup: 1, | ||
Keywords: []string{ | ||
"flickr", | ||
}, | ||
} | ||
|
||
// validate | ||
tps := []string{ | ||
generateSampleSecret("flickr", secrets.NewSecret(alphaNumeric("32"))), | ||
} | ||
return validate(r, tps, nil) | ||
} |
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,25 @@ | ||
package rules | ||
|
||
import ( | ||
"github.com/zricethezav/gitleaks/v8/cmd/generate/secrets" | ||
"github.com/zricethezav/gitleaks/v8/config" | ||
) | ||
|
||
func FreshbooksAccessToken() *config.Rule { | ||
// define rule | ||
r := config.Rule{ | ||
RuleID: "freshbooks-access-token", | ||
Description: "Freshbooks Access Token", | ||
Regex: generateSemiGenericRegex([]string{"freshbooks"}, alphaNumeric("64")), | ||
SecretGroup: 1, | ||
Keywords: []string{ | ||
"freshbooks", | ||
}, | ||
} | ||
|
||
// validate | ||
tps := []string{ | ||
generateSampleSecret("freshbooks", secrets.NewSecret(alphaNumeric("64"))), | ||
} | ||
return validate(r, tps, nil) | ||
} |
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
Oops, something went wrong.