Skip to content

fix(hero): make the top strip reflect the user's own scan, drop the XC dashboard link - #59

Merged
henleda merged 2 commits into
mainfrom
fix-hero-relevance
Aug 19, 2026
Merged

fix(hero): make the top strip reflect the user's own scan, drop the XC dashboard link#59
henleda merged 2 commits into
mainfrom
fix-hero-relevance

Conversation

@henleda

@henleda henleda commented Aug 18, 2026

Copy link
Copy Markdown
Owner

What & why

The persistent hero band (console and standalone report) was mixing real scan-derived numbers with data that wasn't the user's — and carried a dashboard link the operator asked to remove.

1. Removed the XC Security Dashboard link

Gone from the top of every UI page (console hero + report). Cleaned up the dead plumbing behind it — the DASHBOARD JS var and the dashboard field /api/defaults served. The xc_dashboard_url() library helper is kept (still tested); it's just no longer rendered.

2. Top numbers now reflect the active scan, not demo/marketing figures

  • Change-control contrast is opt-in. CHANGE_CONTROL_DAYS used to default to 25 — a fixed narrative baseline, not a number from the user's scan. It now returns None when unset, so the "vs N days normal change control" block and the derived "N× faster" speedup are omitted entirely. Set it explicitly and they return.
  • mitigated live by XCmitigated live · <point>. Hardcoding XC was wrong now that a band-aid can land on BIG-IP or NGINX. impact() exposes points_live (bigip_awaf→BIG-IP, nginx_app_protect→NGINX, else XC), derived from the same entries the mitigated count uses so the label can never disagree with the number above it.
  • The already-real numbers (exploitable vulns, mitigated, time-to-mitigate, code-fix PRs) read from the current scan's OUT dir and are unchanged.

Tests

  • test_impact.py: opt-in change_control_days, contrast/speedup omitted when unset, points_live names the enforcement point.
  • test_report.py: contrast is opt-in, point-naming label, no dashboard link.
  • Full suite: 1182 passed, 15 skipped.

🤖 Generated with Claude Code

Daniel Henley and others added 2 commits August 18, 2026 13:33
The ④ Mitigate "Apply on your own NGINX" panel + its help told the operator to set
NGINX_SSH_* "in ⚙ Setup", but Setup had no NGINX fields — the only way to point it
at the box was hand-editing .env. Added the NGINX_SSH_* keys to MANAGED_KEYS (so the
generic Setup config editor renders them as fields) with NGINX_SSH_PASSWORD in
SECRET_KEYS (the key PATH is not secret), plus a NGINX + App Protect card in Setup's
Advanced integrations with a live status readout (loadNginx → /api/nginx-lab),
mirroring the BIG-IP card. +2 tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…C dashboard link

The persistent hero band (console + standalone report) mixed real scan-derived
numbers with two things that were not the user's data:

- a fixed "vs 25 days normal change control · N× faster" contrast
  (CHANGE_CONTROL_DAYS defaulted to 25 — a narrative baseline, not a scan number)
- a hardcoded "mitigated live by XC" label, wrong now that a band-aid can land
  on BIG-IP or NGINX

And a persistent "XC security dashboard ↗" link the operator asked to remove.

Changes:
- change_control_days() returns None when CHANGE_CONTROL_DAYS is unset; impact()
  omits the contrast and the derived speedup unless the operator opts in.
- impact() exposes points_live (bigip_awaf→BIG-IP, nginx_app_protect→NGINX, else
  XC), derived from the same set the mitigated count uses so label and number
  never disagree; the hero label reads "mitigated live · <point>".
- Remove the XC dashboard link + its plumbing (hero DASHBOARD var, /api/defaults
  `dashboard` field). xc_dashboard_url() helper kept (still tested).

Full suite: 1182 passed, 15 skipped.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant