Skip to content

Add security-tracker-stats-dashboard tool + skill - #248

Merged
potiuk merged 1 commit into
apache:mainfrom
potiuk:add-security-tracker-stats-dashboard
May 22, 2026
Merged

potiuk merged 1 commit into
apache:mainfrom
potiuk:add-security-tracker-stats-dashboard

Conversation

@potiuk

@potiuk potiuk commented May 22, 2026

Copy link
Copy Markdown
Member

Summary

Adds a new skill + tool pair, security-tracker-stats-dashboard, that
renders a self-contained HTML dashboard of <tracker> repository
statistics. Generalised from the in-tree airflow-s implementation
that has been driving the security team's monthly review cadence.

Output: line / area charts (no bars, connectgaps: true) covering

  • Lifecycle bands (stacked) — open_untriaged / open_triaged
    / open_pr_merged / fixed_released / closed_other, evaluated
    per-bucket via configurable predicates.
  • Backlog — opened-in-bucket vs. untriaged-at-bucket-end.
  • Cumulative opened vs. closed.
  • Mean time to triage (hours).
  • Mean time to first response (hours).
  • Mean time createdAt -> PR opened (days, requires <upstream>).
  • Mean time PR-open -> PR-merged (days, requires <upstream>).
  • Mean time PR-merged -> advisory announced (days, requires
    <upstream>).

Vertical annotations on every chart mark the project-configurable
milestones (e.g. "skill adoption", "team handover").

Why it's useful

Steward adopters today don't have a built-in way to see how their
tracker is trending over time. The reference dashboard is what
gave the airflow-s team a clear "the new skill suite has cut median
time-to-triage from ~5d to <4h" data point, and it surfaced
backlog pressure that drove process tweaks. Making it
project-configurable means any adopter can get the same visibility
without re-implementing the data-plane.

The tool is read-only on GitHub. Both the slash-command path (the
skill) and the script path (run.sh) run the same fetch + render
pipeline.

Config schema

buckets: monthly                  # monthly | quarterly
start: null                       # null = first tracker createdAt
upstream_repo: apache/airflow     # null -> omit PR charts
milestones:                       # vertical annotations
  - date: 2026-04-20
    label: skill adoption
scope_labels: [airflow, providers, chart]
categories: [...]                 # first-match-wins predicates
triage:
  keywords: [...]
  bot_prefixes: [...]

Load order (highest priority last):

  1. tools/security-tracker-stats-dashboard/default-config.yaml.
  2. $TRACKER_STATS_CONFIG overlay (deep-merged; lists REPLACED).
  3. Env-var quick overrides: TRACKER_STATS_BUCKETS,
    TRACKER_STATS_START, TRACKER_STATS_UPSTREAM_REPO.

Predicate keys: state, state_reason, any_label, all_labels,
not_label, not_any_label, no_scope_label, has_scope_label,
pr_merged_by_snapshot, plus any_of / all_of combinators.
Documented in tools/security-tracker-stats-dashboard/README.md and inline
in default-config.yaml.

Defaults reproduce the airflow-s reference byte-for-byte

The shipped default-config.yaml reproduces the airflow-s
implementation exactly. With the same cache, the new renderer
emits a dashboard whose chart data series are identical to the
existing one (per-bucket counts, cumulative series, mean-time
values, etc.). Differences in the emitted HTML are limited to
variable rename (months -> buckets) and the title text.

Files

tools/security-tracker-stats-dashboard/
├── README.md                 (overview + config schema)
├── default-config.yaml       (framework defaults)
├── render.py                 (renderer; reads config)
├── fetch_issues.py
├── fetch_roster.py
├── fetch_bodies.py
├── fetch_events.py
├── fetch_prs.py
└── run.sh

.claude/skills/security-tracker-stats-dashboard/
└── SKILL.md                  (placeholder-convention header,
                               adopter-override + snapshot-drift
                               sections, prerequisites, inputs,
                               how-to-invoke, golden rules)

projects/_template/
└── security-tracker-stats.md          (adopter template doc)

Security family integration

The skill is named security-tracker-stats-dashboard and lives under
the security-* family prefix, so it joins the security-issue family
that adopters already opt into via the families: security lock-file
entry. No setup-steward changes are needed — adopt and upgrade
already pick up any security-* skill the snapshot ships.

Adopters' existing .gitignore pattern /.claude/skills/security-*
already excludes the symlink the snapshot creates, so no gitignore
edit is required either.

Adopter migration note

Adopters who previously committed a local copy at
<adopter-repo>/.claude/skills/security-tracker-stats-dashboard/ will,
after running /setup-steward upgrade, get the framework version
symlinked in. They should git rm -r the committed local copy in
favour of the symlink; the gitignore already excludes the resulting
dangling symlink. The airflow-s adopter has been verified to render
identically before and after the swap.

Test plan

  • Refactored renderer reproduces the airflow-s reference
    output's chart data series byte-for-byte.
  • TRACKER_STATS_BUCKETS=quarterly renders a valid quarterly
    dashboard with 13 buckets (2023-Q2 through 2026-Q2).
  • milestones: [] overlay removes all vertical lines.
  • upstream_repo: null overlay omits the three PR-driven
    charts without crashing.
  • PyYAML-absent fallback parses default-config.yaml
    correctly.
  • Reviewer to sanity-check the SKILL.md against the
    framework's other skill files for cross-link correctness.

🤖 Generated with Claude Code

Generalised from the airflow-s reference dashboard, this adds a
read-only stats dashboard for any apache-steward adopter. Output is a
self-contained HTML page with Plotly charts: lifecycle bands (per
adopter-configurable categories), opened-vs-untriaged backlog,
cumulative opened/closed, mean time to triage, mean time to first
response, and PR-driven mean times (createdAt -> PR-opened, PR-open
-> PR-merged, PR-merged -> advisory announced).

Configuration lives in a YAML overlay the adopter places at
`.apache-steward-overrides/security-tracker-stats.yaml` (path configurable in
`<project-config>/security-tracker-stats.md`). Defaults reproduce the
airflow-s reference implementation byte-for-byte; everything that
was hardcoded there (bucket granularity, milestones, scope labels,
category predicates, triage keywords, bot prefixes, upstream repo)
is now an overrideable knob.

The skill at `.claude/skills/security-tracker-stats-dashboard/SKILL.md`
follows the framework's standard structural template (placeholder
convention header, adopter-override section, snapshot-drift section,
prerequisites, inputs, how-to-invoke, golden rules, failure modes).

The renderer prefers PyYAML when available and falls back to a tiny
bundled YAML subset parser when it is not, so adopters without a
build step still get the dashboard.
@potiuk
potiuk merged commit f2104ed into apache:main May 22, 2026
13 checks passed
@potiuk potiuk added the substrate:analytics Tool substrate: read-only metrics / dashboards / renderers label Sep 25, 2026
@potiuk potiuk added capability:stats Read-only dashboards, metrics, governance evidence family:docs Docs, MISSION.md, READMEs family:security security-* skills family:setup setup-* skills family:tools tools/* labels Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

capability:stats Read-only dashboards, metrics, governance evidence family:docs Docs, MISSION.md, READMEs family:security security-* skills family:setup setup-* skills family:tools tools/* substrate:analytics Tool substrate: read-only metrics / dashboards / renderers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant