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

VirusTotal Resolver Support #59

Merged
merged 9 commits into from
Aug 1, 2020
Merged

VirusTotal Resolver Support #59

merged 9 commits into from
Aug 1, 2020

Conversation

chapinb
Copy link
Owner

@chapinb chapinb commented Aug 1, 2020

Initial support for resolving IP address information using VirusTotal.

Tasks:

  • Add documentation for VirusTotal module usage
  • Address 204 rate limiting responses
  • Add use cases for VirusTotal, showing example config files, CLI arguments, and output
  • Increase unit test coverage

# Conflicts:
#	libchickadee/backends/ipapi.py
* Added fields to VT counters
* Allowed specification of resolver and multiple API keys
* Renamed backends to resolvers
* Depreciated the environment variable for an API key
* Added writer handler to flatten complex objects for CSVs
* Updated default language and field handling
* Reorganized classes
@chapinb chapinb self-assigned this Aug 1, 2020
Implemented sleeping functionality for VirusTotal
* Updated Makefile to move documentation to proper directory
* Reduced padding to sleep to .25 seconds from 1 second
@sourcery-ai
Copy link

sourcery-ai bot commented Aug 1, 2020

Sourcery Code Quality Report (beta)

❌  Merging this PR will decrease code quality in the affected files by 0.22 out of 10.

Quality metrics Before After Change
Complexity 2.20 2.17 -0.03 🔵
Method Length 63.53 77.94 14.41 🔴
Quality 8.34 8.12 -0.22 🔴
Other metrics Before After Change
Lines 1876 1721 -155
Changed files Quality Before Quality After Quality Change
doc_src/source/conf.py 9.14 9.14 0.00
libchickadee/init.py 9.58 9.58 0.00
libchickadee/chickadee.py 7.48 7.45 -0.03 🔴
libchickadee/resolvers/virustotal.py 7.71
libchickadee/test/test_chickadee.py 8.53 8.49 -0.04 🔴
libchickadee/test/test_resolver_virustotal.py 8.62

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Overall Recommendation
libchickadee/resolvers/virustotal.py ProResolver.parse_vt_resp 6 439.26 4.53 Split out functionality
libchickadee/chickadee.py entry 8 237.70 5.06 Split out functionality
libchickadee/test/test_chickadee.py ChickadeeFileTestCase.setUp 0 235.38 5.87 Split out functionality
libchickadee/chickadee.py arg_handling 0 219.28 6.00 Split out functionality
libchickadee/test/test_chickadee.py ChickadeeFileTestCase.test_ipapi_resolve_query_folder 0 157.98 6.71 Split out functionality

Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Let us know what you think of it via email or our Gitter!

@chapinb chapinb linked an issue Aug 1, 2020 that may be closed by this pull request
@chapinb chapinb added this to the Black-capped Chickadee Release milestone Aug 1, 2020
@chapinb chapinb added this to In Progress in Black-capped Chickadee release Aug 1, 2020
@chapinb chapinb added the enhancement New feature or request label Aug 1, 2020
@chapinb chapinb marked this pull request as ready for review August 1, 2020 20:29
@chapinb chapinb merged commit 0a470ef into master Aug 1, 2020
Black-capped Chickadee release automation moved this from In Progress to Done Aug 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

Add support for VTI
1 participant