Skip to content

Commit

Permalink
Fixes #21
Browse files Browse the repository at this point in the history
  • Loading branch information
ajinabraham committed Jul 17, 2022
1 parent 26b3f92 commit ab406dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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.5.1'
__version__ = '1.5.2'
__version_info__ = tuple(int(i) for i in __version__.split('.'))
__all__ = [
'Scanner',
Expand Down
5 changes: 5 additions & 0 deletions libsast/core_matcher/pattern_matcher.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf_8 -*-
"""Pattern Macher."""
from copy import deepcopy
from operator import itemgetter

from libsast.core_matcher.helpers import (
get_rules,
Expand Down Expand Up @@ -111,3 +112,7 @@ def add_finding(self, file_path, rule, matches):
'files': [file_details],
'metadata': metadata,
}
to_sort = self.findings[rule['id']]['files']
self.findings[rule['id']]['files'] = sorted(
to_sort,
key=itemgetter('file_path', 'match_string', 'match_lines'))

0 comments on commit ab406dc

Please sign in to comment.