Documentation
¶
Index ¶
- Constants
- Variables
- func Run(client *vdb.Client, files []scan.DetectedFile, pollInterval int, ...) error
- func RunTriage(alerts []triage.EnrichedAlert) error
- func SeverityColor(severity string) lipgloss.Color
- func SeverityStyle(severity string) lipgloss.Style
- type AllPollsCompleteMsg
- type AllUploadsCompleteMsg
- type DetailLoadedMsg
- type DetailTab
- type KeyMap
- type Model
- type OutputSavedMsg
- type Phase
- type TaskUpdatedMsg
- type TriageModel
Constants ¶
const NumTabs = 5
NumTabs is the total number of detail tabs.
Variables ¶
var ( ColorCritical = lipgloss.Color("#FF0000") ColorHigh = lipgloss.Color("#FF8800") ColorMedium = lipgloss.Color("#FFCC00") ColorLow = lipgloss.Color("#0088FF") ColorInfo = lipgloss.Color("#888888") ColorSuccess = lipgloss.Color("#00CC00") ColorError = lipgloss.Color("#FF4444") ColorMalware = lipgloss.Color("#FF00FF") ColorMuted = lipgloss.Color("#666666") ColorAccent = lipgloss.Color("#00CCFF") ColorTeal = lipgloss.Color("#00B4B4") ColorWhite = lipgloss.Color("#FFFFFF") )
Exported color constants for use by other packages (e.g., internal/display).
Functions ¶
func Run ¶
func Run(client *vdb.Client, files []scan.DetectedFile, pollInterval int, outputFormat string, gitCtx *gitctx.GitContext, repoRoot string) error
Run starts the TUI program. This is the main entry point called from cmd/scan.go.
func RunTriage ¶ added in v1.21.0
func RunTriage(alerts []triage.EnrichedAlert) error
RunTriage starts the triage TUI program.
func SeverityColor ¶
SeverityColor returns the color for a severity level.
func SeverityStyle ¶
SeverityStyle returns the lipgloss style for a severity level.
Types ¶
type AllPollsCompleteMsg ¶
AllPollsCompleteMsg is sent when all polls have finished.
type AllUploadsCompleteMsg ¶
AllUploadsCompleteMsg is sent when all uploads have finished.
type DetailLoadedMsg ¶
DetailLoadedMsg is sent when lazy-loaded detail data arrives.
type KeyMap ¶
type KeyMap struct {
Quit key.Binding
Up key.Binding
Down key.Binding
Enter key.Binding
Tab key.Binding
TabScores key.Binding
TabExploit key.Binding
TabTime key.Binding
TabFixes key.Binding
TabRemed key.Binding
Output key.Binding
Help key.Binding
Escape key.Binding
PageUp key.Binding
PageDown key.Binding
}
KeyMap defines all keybindings for the TUI.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the main bubbletea model for the scan TUI.
func NewModel ¶
func NewModel(client *vdb.Client, files []scan.DetectedFile, pollInterval int, outputFormat string, gitCtx *gitctx.GitContext, repoRoot string) *Model
NewModel creates a new TUI model.
type OutputSavedMsg ¶
OutputSavedMsg is sent when output has been written to a file.
type TaskUpdatedMsg ¶
TaskUpdatedMsg is sent when a scan task's status changes.
type TriageModel ¶ added in v1.21.0
type TriageModel struct {
// contains filtered or unexported fields
}
TriageModel is the bubbletea model for the triage TUI.
func NewTriageModel ¶ added in v1.21.0
func NewTriageModel(alerts []triage.EnrichedAlert) *TriageModel
NewTriageModel creates a new triage TUI model.
func (*TriageModel) Init ¶ added in v1.21.0
func (m *TriageModel) Init() tea.Cmd
Init implements tea.Model.
func (*TriageModel) View ¶ added in v1.21.0
func (m *TriageModel) View() string
View implements tea.Model.