-
Notifications
You must be signed in to change notification settings - Fork 238
Exploit mitigations #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #74 +/- ##
==========================================
+ Coverage 93.62% 93.75% +0.12%
==========================================
Files 269 269
Lines 12730 12933 +203
==========================================
+ Hits 11919 12125 +206
+ Misses 811 808 -3
Continue to review full report at Codecov.
|
dorpvom
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please apply changes
| dict_res.update({'PIE': 'DSO'}) | ||
| else: | ||
| dict_sum.update({'PIE - Not a valid ELF file': file_path}) | ||
| dict_res.update({'PIE': 'Not a valid ELF file'}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please increase the plugin version on every change (e.g. to 0.1.1 or 0.2)
| stats['malware'] = self._clean_malware_list(result) | ||
| return stats | ||
|
|
||
| def _get_exploit_mitigations_stats(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please refactor to shorten method and increase readability
|
|
||
| def set_limit_for_data_to_chart(label_list, limit, value_list): | ||
| if limit and len(label_list) > limit: | ||
| label_list = label_list[:limit] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Untested code
| stats['exploit_mitigations'].append((0, 0, 0)) | ||
|
|
||
| def round(self, exploit_mitigation_stat, total_amount_of_files): | ||
| rounded_value = round(exploit_mitigation_stat[0][1] / total_amount_of_files, 5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Untested code
|
|
||
| def set_stats(self, exploit_mitigation, stats, total_amount_of_files): | ||
| if len(exploit_mitigation) > 0: | ||
| stats['exploit_mitigations'].append((exploit_mitigation[0][0], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Untested
|
|
||
| {# ------ Exploit Mitigation Stats ------ #} | ||
|
|
||
| {% if stats["exploit_mitigations_stats"] %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of the bars are too long (> 100 %) breaking the tooltips.
Don't know where the error is.
| self.db.update_statistic('exploit_mitigations', self._get_exploit_mitigations_stats()) | ||
| # should always be the last, because of the benchmark | ||
| self.db.update_statistic('general', self.get_general_stats()) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update script failed on first execution. Since updating some of the analysis results, the script works fine.
fixed acceptance test