Skip to content

feat(gain-web): security + supply-chain pane (tier 1 / depends #162) #171

Description

@thehoff

Background

#162 ships the gain --web dashboard reading from history.db. The Tirith gate and supply-chain check write to two separate JSONL files outside that DB:

  • `~/Library/Application Support/contextcrawler/downgrades.jsonl` (Tirith block + downgrade events)
  • `~/Library/Application Support/contextcrawler/supply_chain.jsonl` (per-install verdicts + findings)

The CLI `contextcrawler security` and `security log --histogram` already surface this data. The dashboard does not.

Proposed scope (tier 1 — no schema change)

New endpoints (read-only, JSONL tail with byte cap — mirrors existing `tirith_gate::read_recent_downgrades` discipline):

  • `GET /api/security/gate` — downgrades histogram (by rule_id, by action) + recent N events
  • `GET /api/security/supply-chain` — verdict counts (allow/block/skip), top blocked packages, recent block events

New dashboard pane "Security" with cards: gate block rate, supply-chain block rate, top blocked packages leaderboard, recent block timeline.

Why now

Out of scope

Effort

S — 1-2 days.

Dependencies

Depends on #162 landing first (this pane plugs into the same SPA + nav).

Activity

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

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