@secretlint/secretlint-rule-pattern
v9.0.0
Published
A secretlint rule that checks for regex patterns stored in configuration.
Downloads
16,632
Readme
@secretlint/secretlint-rule-pattern
A secretlint rule that checks for RegEx patterns
Install
Install with npm:
npm install @secretlint/secretlint-rule-pattern
Usage
Via .secretlintrc.json
(Recommended)
{
"rules": [
{
"id": "@secretlint/secretlint-rule-pattern",
"options": {
"patterns": [
{
"name": "password",
"pattern": "/password\\s*=\\s*(?<password>[\\w\\d!@#$%^&(){}\\[\\]:\";'<>,.?\/~`_+-=|]{1,256})\\b.*/"
}
]
}
}
]
}
MessageIDs
Pattern
found matching {{pattern.name}}: {{CREDENTIAL}}
Disallow to use specified RegEx patterns from SecretLint config.
Options
allows: string[]
- Allows a list of RegExp-like String
Changelog
See Releases page.
Running tests
Install devDependencies and Run npm test
:
npm test
Contributing
Pull requests and stars are always welcome.
For bugs and feature requests, please create an issue.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Author
License
MIT © azu