Skip to content

Commit

Permalink
Bump semgrep, add support for ignore, cwe typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ajinabraham committed May 30, 2021
1 parent 7f3f0d6 commit d1072dc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libsast/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
__title__ = 'libsast'
__authors__ = 'Ajin Abraham'
__copyright__ = 'Copyright 2020 Ajin Abraham, OpenSecurity'
__version__ = '1.4.4'
__version__ = '1.4.5'
__version_info__ = tuple(int(i) for i in __version__.split('.'))
__all__ = [
'Scanner',
Expand Down
3 changes: 3 additions & 0 deletions libsast/core_matcher/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ def comment_replacer(matches, data):
if ':' + stripm in data:
# possible URLs http://, do not strip
continue
if 'ignore:' in data:
# preserve ignore tags
continue
to_replace.add(match.group())
for itm in to_replace:
dummy = repl_regex.sub(' ', itm)
Expand Down
2 changes: 1 addition & 1 deletion libsast/standards/cwe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ cwe:
cwe-749: "CWE-749 Exposed Dangerous Method or Function"
cwe-754: "CWE-754 Improper Check for Unusual or Exceptional Conditions"
cwe-756: "CWE-756 Missing Custom Error Page"
cwe-757: "CWE-757 Selection of Less-Secure Algorithm During Negotiat"
cwe-757: "CWE-757 Selection of Less-Secure Algorithm During Negotiation"
cwe-759: "CWE-759 Use of a One-Way Hash without a Salt"
cwe-76: "CWE-76 Improper Neutralization of Equivalent Special Elements"
cwe-763: "CWE-763 Release of Invalid Pointer or Reference"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def get_requires():
requires = [
'requests>=2.22.0',
'pyyaml>=5.3',
'semgrep==0.50.1;platform_system!="Windows"',
'semgrep==0.53.0;platform_system!="Windows"',
]
return requires

Expand Down

0 comments on commit d1072dc

Please sign in to comment.