Skip to content

Update generated dashboard#124

Merged
sketch0395 merged 2 commits into
mainfrom
update-generated-dashboard
Jun 2, 2026
Merged

Update generated dashboard#124
sketch0395 merged 2 commits into
mainfrom
update-generated-dashboard

Conversation

@sketch0395
Copy link
Copy Markdown
Collaborator

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:

    • The API now classifies scan results into "continuously monitored" (nightly/full scans) and "point-in-time evaluations" (one-off assessments), using both a monitored flag and scan_type as 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]
    • Executive and technical summaries are now generated with separate sections for each group, including group-specific totals and sample findings, and clear instructions not to aggregate or blend the two. [1] [2] [3] [4]
  • Enhanced summary prompts and formatting:

    • New system prompts for OpenAI summary generation ensure that summaries are structured with clear Markdown headings for each group, explicit warnings about point-in-time data, and improved clarity for both executive and technical audiences.

Dashboard Generation and Shell Script Updates:

  • Prefer Python dashboard generator:
    • Both consolidate-security-reports.sh and 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:

  • Improved blockquote styling:
    • Adds custom CSS for blockquotes, ensuring executive warnings and notes in summaries are visually prominent and consistent with the application's design.

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):

Ronnie 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.
Copilot AI review requested due to automatic review settings June 2, 2026 18:30
@sketch0395 sketch0395 merged commit 762d6fd into main Jun 2, 2026
@sketch0395 sketch0395 deleted the update-generated-dashboard branch June 2, 2026 18:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 thread web/static/app.js
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;
Comment thread web/api/main.py

# 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 thread web/api/main.py
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 thread web/api/main.py
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 thread web/static/app.js
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>` : ''}
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.

2 participants