Validate config (#412)

* validate config

* fix import fmt

* cleaning
This commit is contained in:
Zachary Rice authored and GitHub committed 2020-07-24 14:02:48 -04:00
1 parent 94f5950d68
commit c637b129ec
8 files changed
+29 -55

No files matched your search

@@ -8,6 +8,7 @@
regex = '''(A3T[A-Z0-9]|AKIA|AGPA|AIDA|AROA|AIPA|ANPA|ANVA|ASIA)[A-Z0-9]{16}'''
tags = ["key", "AWS"]
## this is an example of a rule that won't work
[[rules]]
description = "Python files"
fileRegex = '''(.*)?py$'''
fileRegex = "(?i)*.py"
@@ -1,19 +1,4 @@
[
{
"line": "N/A",
"lineNumber": -1,
"offender": "Filename/path offender: server.test.py",
"commit": "d274003914c707212cbe84e3e466a00013ccb639",
"repo": "test_repo_1",
"rule": "Python files",
"commitMessage": "comment\n",
"author": "zach rice",
"email": "zricer@protonmail.com",
"file": "server.test.py",
"date": "2019-10-24T10:03:38-04:00",
"tags": "",
"operation": "addition"
},
{
"line": " aws_access_key_id='AKIAIO5FODNN7EXAMPLE',",
"lineNumber": 5,
@@ -28,20 +13,5 @@
"date": "2019-10-24T09:29:27-04:00",
"tags": "key, AWS",
"operation": "addition"
},
{
"line": "N/A",
"lineNumber": -1,
"offender": "Filename/path offender: server.test.py",
"commit": "6557c92612d3b35979bd426d429255b3bf9fab74",
"repo": "test_repo_1",
"rule": "Python files",
"commitMessage": "commit 1 with secrets\n",
"author": "zach rice",
"email": "zricer@protonmail.com",
"file": "server.test.py",
"date": "2019-10-24T09:29:27-04:00",
"tags": "",
"operation": "addition"
}
]