Phase 5: Findings diagnostics panel; pin Go toolchain 1.27.2 (0 called stdlib vulns); npm audit clean

This commit is contained in:
Andy Dixon
2026-10-09 22:01:03 +01:00
parent 68702f1b2e
commit fa5445e4a4
8 changed files with 185 additions and 0 deletions
+14
View File
@@ -2,6 +2,7 @@ package api
import (
"net/http"
"pilens.dev/pilens/internal/capture"
"strconv"
)
@@ -12,6 +13,7 @@ func (s *Server) analysisRoutes(priv func(string, http.HandlerFunc)) {
priv("GET /api/captures/{id}/follow", s.withSession(s.follow))
priv("GET /api/captures/{id}/dns", s.withSession(s.dns))
priv("GET /api/captures/{id}/tls", s.withSession(s.tls))
priv("GET /api/captures/{id}/findings", s.withSession(s.findings))
}
func qint(r *http.Request, k string, def int) int {
@@ -85,3 +87,15 @@ func (s *Server) tls(w http.ResponseWriter, r *http.Request, id string) {
writeJSON(w, map[string]any{"handshakes": handshakes, "certificates": certs,
"note": "Observed metadata only. In capture-only mode TLS payloads are not decrypted; interception status is 'encrypted pass-through' for every session."})
}
func (s *Server) findings(w http.ResponseWriter, r *http.Request, id string) {
f, err := s.Engine.Findings(r.Context(), id, int64(qint(r, "min", 1)))
if err != nil {
engineErr(w, err)
return
}
if f == nil {
f = []capture.Finding{}
}
writeJSON(w, f)
}