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

VirusTotalReporter Rate Limiting #79

Closed
mihelm opened this issue Aug 22, 2024 · 2 comments
Closed

VirusTotalReporter Rate Limiting #79

mihelm opened this issue Aug 22, 2024 · 2 comments

Comments

@mihelm
Copy link
Contributor

mihelm commented Aug 22, 2024

Hi @nstrauss

Thanks a lot for VirusTotalReporter! I've tested it a few times and would like to use it on a large set of recipes. However, I'm hesitant to do so without rate limiting, which you list as a to do.

Would it make sense to adopt the manner in which VirusTotalAnalyzer does that? Or did you have a different approach in mind?

Cheers, michael.

@nstrauss
Copy link
Contributor

VirusTotalAnalyzer doesn’t handle rate limiting at all. It only attempts to catch JSON load errors and assumes rate limiting is to blame. I’d like to eventually implement exponential backoff, but haven’t found cycles or a reason to yet.

https://github.com/hjuutilainen/autopkg-virustotalanalyzer/blob/e113937171b1ae58a0f17bfae3f05f3b538d6d78/VirusTotalAnalyzer/VirusTotalAnalyzer.py#L139-L145

I use the community key with dozens of recipes on a daily basis without being rate limited. Anecdotally, I’ve only hit rate limiting issues when submitting the same package multiple times in quick succession when testing. My recommendation is to try the community key, see if you hit rate limits, and if so register your own VirusTotal account to generate a personal key. https://virustotal.readme.io/docs/please-give-me-an-api-key

I’m also happy to review and accept PRs if you’d like to contribute the feature. Glad you’ve found the processor useful and I hope it does get more adoption.

@mihelm
Copy link
Contributor Author

mihelm commented Sep 5, 2024

Hi @nstrauss

I've submitted two PRs. The first #80 fixes a small bug that occurs when submission_timeout is supplied via the CLI to VirusTotalReporter as a PostProcessor.

The second #81 adds an implementation of an exponential backoff.

I've just run the version with both changes against a large set of recipes, and it seems to be working quite nicely.

Cheers, michael.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants