Update generated dashboard#124
Merged
Merged
Conversation
added 2 commits
June 2, 2026 11:18
- Refactored app.js to replace AI overview section with Executive and Technical Summary sections. - Added functions to generate executive and technical summaries, including loading states and error handling. - Created a new Python script (generate-dashboard.py) to generate a self-contained HTML dashboard from scan data. - The dashboard mimics the Epyon web UI and embeds necessary CSS and JS for offline viewing. - Enhanced the scan object builder to include additional metadata and findings.
… scan preference and blockquote support
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Epyon’s security reporting pipeline to better separate continuously monitored applications from one-off evaluations, improving the accuracy and clarity of both backend-generated AI summaries and the frontend dashboard experience. It also introduces a Python-based static dashboard generator that can render scan details offline using the same web UI assets.
Changes:
- Backend: classify/segment global executive + technical AI summaries into “continuously monitored” vs “point-in-time evaluations”, with group-specific totals and prompts.
- Frontend: split Overview AI section into separate Executive and Technical generation flows; improve Markdown rendering (headings, blockquotes, ordered lists, horizontal rules); add static/offline scan detail rendering.
- Scripts: prefer a new Python generator (
generate-dashboard.py) for web-UI-style dashboards, with fallbacks to legacy shell-based generation.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| web/static/app.js | Splits overview summaries (exec/tech), expands Markdown rendering, and adds static/offline scan detail rendering. |
| web/static/app.css | Adds styling for blockquotes used by AI summaries. |
| web/api/openai_summary.py | Reworks global summary payloads/prompts to produce separated exec/tech briefs by monitoring classification. |
| web/api/main.py | Chooses “comprehensive” scans for vulnerability counts and passes monitoring metadata into global summary aggregation. |
| scripts/shell/generate-security-dashboard.sh | Prefers Python dashboard generator before falling back to legacy shell generator. |
| scripts/shell/generate-interactive-dashboard.sh | Prefers Python dashboard generator before falling back to legacy shell generator. |
| scripts/shell/generate-dashboard.py | New Python generator producing a self-contained offline dashboard using web/static assets and embedded scan JSON. |
| scripts/shell/consolidate-security-reports.sh | Prefers Python dashboard generator during report consolidation, with legacy fallback. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
4912
to
+4915
| window.addEventListener('hashchange', resolve); | ||
| window.addEventListener('load', () => { | ||
| // In static (offline) mode the scan is embedded — skip API-based routing | ||
| if (window.__SCAN__) return; |
|
|
||
| # Scan types that run the full tool suite (Anchore, Trivy, Checkov, etc.) | ||
| # Quick/stig/local_model scans do not produce complete vulnerability counts. | ||
| _COMPREHENSIVE_SCAN_TYPES = frozenset({"full", "nightly"}) |
Comment on lines
302
to
+306
| "last_scanned": latest.get("timestamp", ""), | ||
| "scan_type": latest.get("scan_type", ""), | ||
| "critical": latest.get("critical", 0), | ||
| "high": latest.get("high", 0), | ||
| "medium": latest.get("medium", 0), | ||
| "low": latest.get("low", 0), | ||
| "status": parsers.get_status(latest), | ||
| "critical": latest_comprehensive.get("critical", 0), | ||
| "high": latest_comprehensive.get("high", 0), | ||
| "medium": latest_comprehensive.get("medium", 0), |
Comment on lines
+1447
to
+1449
| for d, _ in entries_sorted: | ||
| st = (parsers._read_json(d / "scan-metadata.json") or {}).get("scan_type", "") | ||
| if st in _COMPREHENSIVE_SCAN_TYPES: |
Comment on lines
+233
to
+236
| if parsers: | ||
| try: sbom_data = parsers.load_sbom_packages(scan_dir) | ||
| except Exception: pass | ||
| try: api_data = parsers.load_api_discovery(scan_dir) |
Comment on lines
+1896
to
+1900
| ${showExec ? `<div class="section-heading exec-heading">📋 Executive Summary</div> | ||
| <div class="section-body">${mdToHtml(exec)}</div>` : ''} | ||
|
|
||
| <div class="section-heading tech-heading">🔧 Technical Summary</div> | ||
| <div class="section-body">${mdToHtml(tech)}</div> | ||
| ${showTech ? `<div class="section-heading tech-heading">🔧 Technical Summary</div> | ||
| <div class="section-body">${mdToHtml(tech)}</div>` : ''} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant improvements to how security scan results are processed, summarized, and presented in both backend and frontend components. The main focus is to distinguish between continuously monitored applications (with regular, automated scans) and one-off point-in-time evaluations, ensuring executive and technical summaries accurately reflect the security posture. The dashboard generation scripts are also updated to prefer a new Python-based generator, with fallbacks for reliability.
Backend API and Summary Generation Improvements:
Distinction between continuous monitoring and point-in-time evaluations:
monitoredflag andscan_typeas fallback. This ensures that vulnerability counts and summaries reflect the true ongoing security posture and do not get skewed by ad-hoc scans. [1] [2] [3] [4] [5] [6]Enhanced summary prompts and formatting:
Dashboard Generation and Shell Script Updates:
consolidate-security-reports.shand related scripts now attempt to use a new Python-based dashboard generator for a richer, web-UI-compatible output, falling back to the legacy shell script if necessary. This improves dashboard reliability and maintainability. [1] [2] [3] [4]Frontend/UI Enhancements:
These changes collectively ensure that security reporting is more accurate, actionable, and clearly communicated to both technical and executive stakeholders.
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):