Skip to content

[BUG] list-plugins command unnecessarily initializes full Scanner #28

Description

@KbWen

Describe the Bug

In cli.py, the list-plugins command handler is placed inside the main try block (line 230-238) that occurs after the full Scanner initialization (line 193-199). This means running ghostcheck list-plugins unnecessarily:

  1. Loads and instantiates all 34 security checker modules
  2. Loads and parses the results cache from disk
  3. Initializes baseline fingerprinting
  4. Auto-detects framework presets

None of these are needed just to list available plugins.

Expected Behavior

ghostcheck list-plugins should be handled early in the CLI flow (similar to list-checks at line 164) to avoid unnecessary Scanner initialization overhead.

Proposed Fix

Move the list-plugins handler block to be adjacent to the list-checks handler (before Scanner initialization), using PluginManager directly instead of scanner.plugin_manager.

Impact

  • Faster list-plugins execution (skip ~500ms of unnecessary init)
  • No behavioral change for end users

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions