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
- Remove
nmap from your system PATH.
- Start the SecuScan backend; observe that no warnings are logged.
- 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.
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
nmapfrom your system PATH.Expected Behavior
dependenciesarray inmetadata.json, and use Python'sshutil.which()to verify binaries exist. Mark plugins missing dependencies as unavailable.Implementation Hints
PluginManagerclass inbackend/secuscan/core/plugins.py. Add anis_availableboolean to the plugin schema returned byGET /api/v1/plugins.is_availableflag in the Plugin Catalogue and Form components to lock the UI accordingly.