dashboard

package
v0.0.0-...-ac51153 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlowGraph

type FlowGraph struct {
	Nodes []FlowNode `json:"nodes"`
	Links []FlowLink `json:"links"`
}
type FlowLink struct {
	Source    string `json:"source"`
	Target    string `json:"target"`
	Sensitive bool   `json:"sensitive"`
	Label     string `json:"label"`
}

type FlowNode

type FlowNode struct {
	ID    string `json:"id"`
	Label string `json:"label"`
	Type  string `json:"type"`
	File  string `json:"file"`
	Line  int    `json:"line"`
	Risky bool   `json:"risky"`
}

type RepositoryStats

type RepositoryStats struct {
	TotalAssets       int            `json:"total_assets"`
	AssetsByType      map[string]int `json:"assets_by_type"`
	TotalThreats      int            `json:"total_threats"`
	ThreatsBySeverity map[string]int `json:"threats_by_severity"`
	TotalFlows        int            `json:"total_flows"`
	SensitiveFlows    int            `json:"sensitive_flows"`
	AverageRisk       float64        `json:"average_risk"`
}

type RepositorySummary

type RepositorySummary struct {
	ID            string `json:"id"`
	URL           string `json:"url"`
	Language      string `json:"language"`
	Framework     string `json:"framework"`
	ThreatCount   int    `json:"threat_count"`
	AssetCount    int    `json:"asset_count"`
	CriticalCount int    `json:"critical_count"`
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server serves the threat intelligence dashboard

func NewServer

func NewServer(addr string) (*Server, error)

NewServer creates a new dashboard server

func (*Server) AddRepository

func (s *Server) AddRepository(repo *scanner.Repository, threats []mapper.MappedThreat)

AddRepository adds a scanned repository to the dashboard

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Start starts the HTTP server

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL