Skip to content

Fix: disable virustotal module at startup when API key is missing (#1490) - #2135

Open
Adnan9-63 wants to merge 1 commit into
stratosphereips:masterfrom
Adnan9-63:fix-virustotal-api-key
Open

Adnan9-63 wants to merge 1 commit into
stratosphereips:masterfrom
Adnan9-63:fix-virustotal-api-key

Conversation

@Adnan9-63

Copy link
Copy Markdown

Fixes Issue

Closes #1490

Changes proposed

  • In managers/process_manager/config_mixin.py, added a check in get_runtime_disabled_modules() to verify vt_api_key_file. If the key file is not specified, does not exist, cannot be read, or contains an empty key, Modules.VIRUSTOTAL is added to runtime_disabled_modules. This prevents Slips from spawning an unnecessary background process for VirusTotal when no valid API key is present.
  • Updated test_config_mixin.py expectations and added parametrized unit tests (test_virustotal_disabled_without_api_key) covering valid, empty, and missing key scenarios.

Steps I followed to test the changes purposed in this PR:

  • Ran unit tests: python3 -m pytest tests/unit/managers/process_manager/test_config_mixin.py (41 passed).
  • Verified that VirusTotal is added to runtime disabled modules when no valid API key is configured.

Check List

  • My code follows the code style of this project.
  • My change requires changes to the documentation.
  • I have updated the documentation accordingly.
  • All new and existing tests passed.
  • This PR does not contain plagiarized content.
  • The title of my pull request is a short description of the requested changes.
  • My PR is based on develop branch. (mandatory)

Note to reviewers

Fixes #1490 by checking the API key availability during ProcessManager runtime module resolution, preventing the process from starting when unconfigured.
I have tried my best ,if there is anything wrong or needs to be better please tell!!

Copilot AI balanced review requested due to automatic review settings October 3, 2026 14:53
@github-project-automation github-project-automation Bot moved this to Todo in Slips Oct 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

virustotal module shouldnt start when there's no API key available

2 participants