Skip to content

Commit f00c55d

Browse files
author
Khole Jones
committed
Add SecretLint
1 parent c451058 commit f00c55d

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,9 @@ repos:
6363
- id: no-commit-to-branch
6464
args:
6565
- --branch=master
66+
- repo: local
67+
hooks:
68+
- id: secretlint
69+
name: Secretlint
70+
language: docker_image
71+
entry: secretlint/secretlint:latest secretlint

.secretlintrc.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"rules": [
3+
{
4+
"id": "@secretlint/secretlint-rule-preset-recommend"
5+
},
6+
{
7+
"id": "@secretlint/secretlint-rule-basicauth"
8+
},
9+
{
10+
"id": "@secretlint/secretlint-rule-pattern",
11+
"options": {
12+
"patterns": [
13+
{
14+
"name": "password=",
15+
"pattern": "password\\s*=\\s*(?<password>[\\w\\d!@#$%^&(){}\\[\\]:\";'<>,.?\/~`_+-=|]{1,256})\\b.*"
16+
}
17+
]
18+
}
19+
}
20+
]
21+
}

package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"husky": {
3+
"hooks": {
4+
"pre-commit": "lint-staged"
5+
}
6+
},
7+
"lint-staged": {
8+
"*": [
9+
"secretlint"
10+
]
11+
}
12+
}

0 commit comments

Comments
 (0)