From c3d686cfac2beb7d58e63eb5142e90c082b9594c Mon Sep 17 00:00:00 2001 From: Mick Grove Date: Thu, 16 Apr 2026 09:56:56 -0700 Subject: [PATCH] performance improvements and access map viewer improvements --- docs/access-map-viewer/index.html | 793 ++++++++++++- src/findings_store.rs | 99 +- src/main.rs | 10 +- src/scanner/validation.rs | 240 ++-- src/validation.rs | 1845 +++++++++++++++-------------- 5 files changed, 1921 insertions(+), 1066 deletions(-) diff --git a/docs/access-map-viewer/index.html b/docs/access-map-viewer/index.html index 3df851c..478cf8e 100644 --- a/docs/access-map-viewer/index.html +++ b/docs/access-map-viewer/index.html @@ -243,12 +243,12 @@ /* Upload */ .upload-area { - padding: 32px; + padding: 36px 28px 24px; text-align: center; background: var(--surface-muted); cursor: pointer; transition: all 0.2s ease; - border-bottom: 1px solid var(--border); + border: 1px dashed var(--border); border-radius: var(--radius); } .upload-area:hover, @@ -256,9 +256,95 @@ background: var(--brand-soft); border-color: var(--brand); } - .upload-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.8; } - .upload-text { font-size: 16px; font-weight: 500; } - .upload-sub { color: var(--text-muted); margin-top: 4px; } + .upload-icon { + width: 68px; + height: 68px; + margin: 0 auto 16px; + border-radius: 18px; + display: flex; + align-items: center; + justify-content: center; + font-size: 34px; + background: var(--surface); + border: 1px solid var(--border); + box-shadow: var(--shadow-sm); + opacity: 0.9; + } + .upload-text { + font-size: 28px; + line-height: 1.2; + font-weight: 700; + letter-spacing: -0.02em; + color: var(--text-main); + max-width: 420px; + margin: 0 auto; + } + .upload-sub { + color: var(--text-muted); + margin-top: 8px; + font-size: 15px; + line-height: 1.5; + max-width: 560px; + margin-left: auto; + margin-right: auto; + } + .upload-action-row { + display: flex; + justify-content: center; + align-items: center; + gap: 12px; + flex-wrap: wrap; + margin-top: 18px; + } + .upload-primary { + display: inline-flex; + align-items: center; + justify-content: center; + padding: 10px 16px; + border-radius: 999px; + background: var(--brand); + color: #fff; + font-size: 13px; + font-weight: 700; + letter-spacing: 0.01em; + box-shadow: var(--shadow-sm); + } + .upload-action-hint { + font-size: 12px; + color: var(--text-muted); + font-weight: 600; + } + .upload-help-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); + gap: 12px; + margin-top: 22px; + text-align: left; + } + .upload-help-card { + background: var(--surface); + border: 1px solid var(--border); + border-radius: 12px; + padding: 14px 14px 12px; + box-shadow: var(--shadow-sm); + } + .upload-help-label { + font-size: 11px; + font-weight: 700; + text-transform: uppercase; + letter-spacing: 0.06em; + color: var(--brand-dark); + margin-bottom: 6px; + } + .upload-help-text { + font-size: 13px; + line-height: 1.5; + color: var(--text-muted); + } + .upload-help-text strong { + color: var(--text-main); + font-weight: 700; + } /* Metrics */ .metrics-grid { @@ -639,13 +725,120 @@ flex-shrink: 0; } - #status-chart { + #status-chart, + #source-chart { background: var(--surface-muted); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-sm); } + .dashboard-breakdown { + padding: 0 20px 20px; + } + .breakdown-card { + background: var(--surface); + border: 1px solid var(--border); + border-radius: var(--radius); + box-shadow: var(--shadow-sm); + overflow: hidden; + } + .breakdown-header { + display: flex; + align-items: center; + justify-content: space-between; + gap: 12px; + padding: 14px 16px; + border-bottom: 1px solid var(--border); + background: var(--surface-strong); + } + .breakdown-title { + font-size: 14px; + font-weight: 700; + color: var(--text-main); + } + .breakdown-sub { + font-size: 12px; + color: var(--text-muted); + margin-top: 3px; + } + .breakdown-controls { + display: flex; + align-items: center; + gap: 10px; + flex-wrap: wrap; + } + .breakdown-toggle { + display: inline-flex; + align-items: center; + gap: 8px; + font-size: 12px; + color: var(--text-main); + font-weight: 600; + cursor: pointer; + user-select: none; + } + .breakdown-table { + width: 100%; + border-collapse: collapse; + font-size: 13px; + } + .breakdown-table th, + .breakdown-table td { + padding: 10px 14px; + border-bottom: 1px solid var(--border); + text-align: left; + vertical-align: top; + } + .breakdown-table th { + font-size: 11px; + text-transform: uppercase; + letter-spacing: 0.05em; + color: var(--text-muted); + font-weight: 700; + background: var(--surface); + } + .breakdown-sort-btn { + border: 0; + background: transparent; + padding: 0; + margin: 0; + display: inline-flex; + align-items: center; + gap: 6px; + color: inherit; + font: inherit; + text-transform: inherit; + letter-spacing: inherit; + font-weight: inherit; + cursor: pointer; + } + .breakdown-sort-indicator { + font-size: 11px; + color: var(--text-muted); + min-width: 10px; + text-align: center; + } + .breakdown-table tr:last-child td { + border-bottom: 0; + } + .breakdown-name { + font-weight: 700; + color: var(--text-main); + word-break: break-word; + } + .breakdown-count { + font-weight: 700; + color: var(--text-main); + white-space: nowrap; + } + .breakdown-empty { + padding: 24px 16px; + text-align: center; + color: var(--text-muted); + font-size: 13px; + } + /* Findings table */ .table-container { width: 100%; overflow-x: auto; } .table { width: 100%; border-collapse: collapse; font-size: 13px; } @@ -1238,9 +1431,9 @@ Access Map & Findings -
+
- +
@@ -1257,9 +1450,30 @@
πŸ“„
-
Drag & drop reports here
-
...or click to choose files
-
Your files stay in the browser. Supported inputs: Kingfisher JSON/JSONL, Gitleaks JSON, and TruffleHog JSON/JSONL. Multiple files are merged and deduplicated.
+
Load one or more reports
+
Drop files anywhere in this card, or click to choose them from disk.
+
+ Choose Reports + JSON and JSONL only +
+
+
+
Formats
+
Kingfisher JSON/JSONL, Gitleaks JSON, and TruffleHog JSON/JSONL.
+
+
+
Merge More
+
Choose multiple files at once, or drag in more report files after loading to merge them into the same view.
+
+
+
Deduplication
+
Kingfisher reports are already deduplicated. For imported Gitleaks and TruffleHog reports, the viewer attempts deduplication by finding fingerprint: native fingerprints when present, otherwise a synthetic fingerprint built from the tool, detector, and secret identity, with path/line/snippet fallback when needed.
+
+
+
Privacy
+
Everything stays in your browser. Files are not uploaded anywhere.
+
+
@@ -1343,7 +1557,7 @@

Finding Status Distribution

-

Active vs Inactive vs Not Attempted

+

Validation state and report source mix

@@ -1353,6 +1567,55 @@
+
+ +
+ +
+
+
+ +
+
+
+

Detector Families

+

Collapsed Kingfisher rule families plus imported detector names

+
+
+
+
+
+
+
Detector distribution by source
+
Top detector families for each loaded tool, grouped into a chart per source.
+
+
+
+ +
+
+
+
+
+
+
+
Most frequent findings
+
Use this to spot the noisiest rule families and imported detectors quickly.
+
+
+
+ + 0 of 0 + +
+ +
+
+
+
@@ -1394,6 +1657,12 @@ +