Skip to content

Feature: Plugin Dependency Health Check on Startup #1979

Description

@sahare-mayur-0071

Description
Several plugins require external CLI tools (e.g., nmap, gobuster). Currently, a task simply fails at runtime if the binary is missing from the system. We should proactively check for required dependencies when the backend starts and surface warnings to the user before they try to run a scan.

Steps to Reproduce

  1. Remove nmap from your system PATH.
  2. Start the SecuScan backend; observe that no warnings are logged.
  3. Attempt to run an Nmap task from the frontend; observe it fails abruptly at runtime.

Expected Behavior

  • Backend: On initialization, loop through loaded plugins, check their dependencies array in metadata.json, and use Python's shutil.which() to verify binaries exist. Mark plugins missing dependencies as unavailable.
  • Frontend: Disable the "Start Task" button on the plugin form and show a tooltip (e.g., "Missing dependency: nmap") if the plugin is unavailable.

Implementation Hints

  • Backend: Update the PluginManager class in backend/secuscan/core/plugins.py. Add an is_available boolean to the plugin schema returned by GET /api/v1/plugins.
  • Frontend: Consume the is_available flag in the Plugin Catalogue and Form components to lock the UI accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions