Skip to content

Commit e34c10d

Browse files
committed
ODSC-42791. Add pre-commit hooks for ocids, copyright and secrets
- fix regex to capture password in ipynb files
1 parent 2fc12f9 commit e34c10d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.gitleaks.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ useDefault = true
2222
'''CONTRIBUTING.md''',
2323
'''LICENSE.txt''',
2424
'''package.json''',
25-
'''README.md''',
25+
'''^README.md''',
2626
'''SECURITY.md''',
2727
'''THIRD_PARTY_LICENSES.TXT''',
2828
]
@@ -42,9 +42,9 @@ useDefault = true
4242
description = "Generic secret"
4343
id = "generic-secret"
4444
path = '''notebook_examples'''
45-
regex = '''(?i)((key|api|token|secret|passwd|password|psw|)[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([0-9a-zA-Z!@#$%^&*<>\-_=]{6,25})['\"]'''
46-
entropy = 2.5
45+
regex = '''(?i)((key|api|token|secret|passwd|password|psw|pass)[a-z0-9_ .\-,]{0,25})(=|>|:=|\|\|:|<=|=>|:).{0,5}['\"]([0-9a-zA-Z!@#$%^&*<>\\\-_.=]{3,100})['\"]'''
46+
entropy = 0
4747
secretGroup = 4
4848
keywords = [
49-
"key","api","token","secret","passwd","password", "psw"
49+
"key","api","token","secret","passwd","password", "psw", "pass"
5050
]

0 commit comments

Comments
 (0)