-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Improve certificate validation rules. Made a few rules less strict. Added test cases. Added additional "disabled certificate validation" rules. * Add correctness rule (invalid date format string). * Add additional dynamic execution rules (plus swift). * Add comment support for batch files Disable VS Code pipeline until fixed builds can be produced. Co-authored-by: Gabe Stocco <[email protected]>
- Loading branch information
Showing
7 changed files
with
301 additions
and
163 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
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 |
---|---|---|
@@ -1,4 +1,8 @@ | ||
[ | ||
{ | ||
"name": "batch", | ||
"extensions": [ ".bat" ] | ||
}, | ||
{ | ||
"name": "c", | ||
"extensions": [ ".c", ".h" ] | ||
|
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,33 @@ | ||
[ | ||
{ | ||
"name": "Possible incorrect datetime format", | ||
"id": "DS600100", | ||
"description": "The %M format is 'minute' but used like 'month'", | ||
"recommendation": "Change the format to %m.", | ||
"applies_to": [ | ||
"python" | ||
], | ||
"tags": [ | ||
"Correctness.DateTime.Format" | ||
], | ||
"severity": "moderate", | ||
"rule_info": "", | ||
"patterns": [ | ||
{ | ||
"pattern": "(%Y-%M-%d)|(%M-%d-%Y)|(%M/%d/%Y)", | ||
"type": "regex", | ||
"scopes": [ | ||
"code" | ||
] | ||
} | ||
], | ||
"must-match": [ | ||
"when = [tm.strftime('%M/%d/%Y %I:%M %p') for tm in when]", | ||
"return '%s [%s:%s] ' % (time.strftime('%Y-%M-%d %X')," | ||
], | ||
"must-not-match": [ | ||
"when = tm.strftime('%m/%d/%Y %I:%M %p')", | ||
"%Y-%m-%d %H:%M:%S" | ||
] | ||
} | ||
] |
Oops, something went wrong.