From 8a35a5b791b1396eaef039ae81c37855f5d07d43 Mon Sep 17 00:00:00 2001 From: Jamie Banks Date: Fri, 17 Jul 2026 01:33:26 +0100 Subject: [PATCH] feat: add session-based authentication to the web interface and API routes --- README.md | 9 ++ frontend/src/App.vue | 14 +- frontend/src/components/FindingsInspector.vue | 1 + frontend/src/components/Login.vue | 56 ++++++++ frontend/src/components/ScansHistory.vue | 1 + frontend/src/components/TargetManager.vue | 1 + frontend/src/router.js | 26 +++- internal/api/auth.go | 131 ++++++++++++++++++ internal/api/handlers.go | 16 ++- 9 files changed, 245 insertions(+), 10 deletions(-) create mode 100644 frontend/src/components/Login.vue create mode 100644 internal/api/auth.go diff --git a/README.md b/README.md index 1c7cd99..9064a89 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,14 @@ +
+ Nucleus + # Nucleus - Vulnerability Scan Orchestrator Nucleus is a single, self-contained Go binary that acts as an orchestration manager for scheduled [Nuclei](https://github.com/projectdiscovery/nuclei) vulnerability scans. It serves an embedded Vue 3 SPA web dashboard, reads/writes scan states to a local SQLite database, and automatically dispatches beautifully formatted HTML email reports via SMTP when scans discover vulnerabilities. +
+ ## Prerequisites - **Go 1.22+** - **Node.js & npm** (for building the frontend) @@ -65,6 +70,10 @@ Environment="SMTP_TO=admin@example.com" # Environment="SMTP_USER=username" # Environment="SMTP_PASS=password" +# Optional: Add basic authentication to protect the web dashboard +# Environment="WEB_USER=admin" +# Environment="WEB_PASS=supersecret" + Restart=always RestartSec=5 diff --git a/frontend/src/App.vue b/frontend/src/App.vue index a27f6ba..0e5894a 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -6,9 +6,10 @@ Nucleus Logo

Nucleus

-