-
Notifications
You must be signed in to change notification settings - Fork 50
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
Blocklist blocks scanning, not only reporting #585
Conversation
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.
Generally, ok. But I would opt for putting blocklist in some form of DB with easy key retrieval. This would allow code to be simplified, eg blocklist_reports
could use only one for loop, now it is really O(N*M)
artemis/blocklist.py
Outdated
|
||
for item in data: | ||
# Assert there are no additional or missing keys | ||
unexpected_keys = set(item.keys()) - { |
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.
put differenced set as a variable, no need for it to be initialized every item
artemis/module_base.py
Outdated
else: | ||
if should_block_scanning(domain=domain, ip=None, karton_name=self.identity, blocklist=self._blocklist): | ||
return True | ||
else: |
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.
elif is_ip_address(host)
, and then delete assert below
No description provided.