Skip to content
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

FIX: statistics_host returns if no host value is given #2104

Merged
1 commit merged into from
Sep 10, 2021
Merged

Conversation

waldbauer-certat
Copy link
Contributor

Fixes #2103

Fixes #2103

Signed-off-by: Sebastian Waldbauer <waldbauer@cert.at>
@waldbauer-certat waldbauer-certat marked this pull request as draft September 9, 2021 08:56
@codecov-commenter
Copy link

codecov-commenter commented Sep 9, 2021

Codecov Report

Merging #2104 (aaf90df) into develop (9f07fcb) will decrease coverage by 0.04%.
The diff coverage is 42.19%.

@@             Coverage Diff             @@
##           develop    #2104      +/-   ##
===========================================
- Coverage    76.07%   76.03%   -0.05%     
===========================================
  Files          429      434       +5     
  Lines        23070    23221     +151     
  Branches      3085     3105      +20     
===========================================
+ Hits         17551    17656     +105     
- Misses        4812     4854      +42     
- Partials       707      711       +4     
Impacted Files Coverage Δ
intelmq/bots/collectors/http/collector_http.py 59.61% <ø> (ø)
...elmq/bots/collectors/http/collector_http_stream.py 40.00% <ø> (ø)
intelmq/bots/collectors/misp/collector.py 41.86% <ø> (ø)
...s/collectors/shadowserver/collector_reports_api.py 89.28% <ø> (ø)
intelmq/bots/outputs/misp/output_api.py 24.75% <ø> (ø)
intelmq/bots/parsers/hibp/parser_callback.py 94.44% <ø> (ø)
intelmq/bots/parsers/microsoft/parser_ctip.py 85.88% <ø> (ø)
intelmq/bots/parsers/shadowserver/_config.py 98.73% <ø> (ø)
intelmq/bots/parsers/shadowserver/parser_json.py 78.50% <ø> (ø)
intelmq/lib/bot_debugger.py 20.52% <0.00%> (ø)
... and 103 more

@ghost ghost added this to the 3.0.2 milestone Sep 9, 2021
@waldbauer-certat waldbauer-certat marked this pull request as ready for review September 9, 2021 16:26
Comment on lines +27 to +28
if host is None:
return
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is only applicable because the only code calling this cache is the bots.py for the statistics. If any other code would use this class, this fix silently ignores misconfiguration

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add a changelog entry

@ghost ghost added the component: core label Sep 9, 2021
@ghost ghost merged commit 7aedd9f into develop Sep 10, 2021
@sebix sebix deleted the fix-2103 branch May 23, 2022 05:42
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bot statistics enabled by default cause performance drop, disabling them is not possible
2 participants