ktg-plugin-marketplace/plugins/llm-security/commands/dashboard.md

1.9 KiB

name description allowed-tools model
security:dashboard Cross-project security dashboard — machine-wide posture overview with per-project grades Read, Glob, Grep, Bash sonnet

/security dashboard

Machine-wide security dashboard. Discovers all Claude Code projects, runs posture-scanner on each, shows aggregated overview.

Step 1: Run Dashboard Aggregator

Run the aggregator (uses 24h cache by default):

node <this plugin's scanners/dashboard-aggregator.mjs>

If user specified --no-cache or --fresh, add --no-cache flag.

Parse the JSON output. The result contains:

  • meta.scanner, meta.version, meta.timestamp, meta.from_cache
  • machine.grade (weakest link), machine.projects_scanned, machine.total_findings, machine.counts
  • projects[] with path, display_name, grade, risk_score, risk_band, worst_category, worst_status, findings_count, counts
  • errors[] with path, display_name, error

Step 2: Format Dashboard

Present the results:

# Security Dashboard

| Field | Value |
|-------|-------|
| **Machine Grade** | [A-F] (weakest link) |
| **Projects Scanned** | [N] |
| **Total Findings** | [N] |
| **Scan Time** | [N]ms |
| **Cache** | [Fresh scan / Cached (age)] |

## Project Overview

| Project | Grade | Risk | Worst Category | Findings |
|---------|-------|------|----------------|----------|
[one row per project, sorted by grade (worst first)]

## Errors

[List any projects that failed to scan, if any]

Sort the project table by grade (F first, A last), then by risk score descending.

Step 3: Recommendations

  • If machine grade is A/B: "Machine posture is solid. Re-run after major changes or new plugin installs."
  • If machine grade is C: "Some projects need attention. Run /security posture in the worst-graded project."
  • If machine grade is D/F: "Significant exposure. Run /security audit in projects graded D/F."
  • If from_cache: "Results cached. Run /security dashboard --fresh for a live scan."