Documentation
¶
Index ¶
- Constants
- func BuildTimelineMarkdown(entries []TimelineEntry) string
- func CallIDFromContext(ctx context.Context) string
- func CompactStrings(values ...string) []string
- func ContextWithCallID(ctx context.Context, callID string) context.Context
- func FirstNonEmpty(values ...string) string
- func FormatLine(prefix, body string, color Color) string
- func OutputPrefix(source string, colorFn func(string) string) string
- func RenderFile(path, format, outputPath string) error
- func RenderTimeline(w io.Writer, entries []TimelineEntry) error
- func RenderTimelineMarkdown(w io.Writer, entries []TimelineEntry) error
- func SanitizeLine(line string, color Color) string
- func StripANSI(s string) string
- func TruncateStr(s string, maxLen int) string
- type ArtifactStream
- type Color
- func (c Color) Bold(s string) string
- func (c Color) Code(code string) string
- func (c Color) Cyan(s string) string
- func (c Color) Dim(s string) string
- func (c Color) ForPriority(p string) func(string) string
- func (c Color) Green(s string) string
- func (c Color) GreenBold(s string) string
- func (c Color) Red(s string) string
- func (c Color) Status(s string) string
- func (c Color) Wrap(s, code string) string
- func (c Color) Yellow(s string) string
- func (c Color) YellowBold(s string) string
- type Error
- type Loot
- type ScanResult
- type Summary
- type TimelineEntry
- type ToolArtifact
- type ToolDataEvent
Constants ¶
View Source
const ( ANSIReset = "\033[0m" ANSIBold = "\033[1m" ANSIDim = "\033[2m" ANSIRed = "\033[31m" ANSIGreen = "\033[32m" ANSIYellow = "\033[33m" ANSICyan = "\033[36m" )
View Source
const ( ToolDataService = "service" ToolDataWeb = "web" ToolDataWeakpass = "weakpass" ToolDataVuln = "vuln" // ToolDataProgress carries one raw stdout/stderr line of a foreground // command, streamed while it runs. ToolDataProgress = "progress" )
View Source
const ( LootFingerprint = parsers.LootFingerprint LootWeakpass = parsers.LootWeakpass LootVuln = parsers.LootVuln )
Variables ¶
This section is empty.
Functions ¶
func BuildTimelineMarkdown ¶
func BuildTimelineMarkdown(entries []TimelineEntry) string
func CallIDFromContext ¶ added in v0.3.0
func CompactStrings ¶
func ContextWithCallID ¶ added in v0.3.0
func FirstNonEmpty ¶
func FormatLine ¶
func RenderFile ¶
RenderFile renders an AOP Event ProtoJSONL file. Raw scanner JSONL files are intentionally not accepted as agent timelines.
func RenderTimeline ¶
func RenderTimeline(w io.Writer, entries []TimelineEntry) error
func RenderTimelineMarkdown ¶
func RenderTimelineMarkdown(w io.Writer, entries []TimelineEntry) error
func SanitizeLine ¶
func TruncateStr ¶
Types ¶
type ArtifactStream ¶ added in v0.4.0
type ArtifactStream struct {
// contains filtered or unexported fields
}
ArtifactStream serializes structured ToolData events and exposes one lifecycle-bound handler for either a node transport or the local server.
func NewArtifactStream ¶ added in v0.4.0
func NewArtifactStream(bus *eventbus.Bus[ToolDataEvent]) *ArtifactStream
func (*ArtifactStream) Close ¶ added in v0.4.0
func (s *ArtifactStream) Close()
func (*ArtifactStream) SetHandler ¶ added in v0.4.0
func (s *ArtifactStream) SetHandler(handler func(ToolArtifact))
type ScanResult ¶ added in v0.4.0
type ScanResult struct {
Summary Summary `json:"summary"`
GOGO []*parsers.GOGOResult `json:"gogo,omitempty"`
Spray []*parsers.SprayResult `json:"spray,omitempty"`
Loots []Loot `json:"loots,omitempty"`
Errors []Error `json:"errors,omitempty"`
}
ScanResult is private collector state. Scanner-native records leave a node only as ToolArtifact messages; the server owns normalization and persistence.
type Summary ¶
type Summary struct {
Inputs int `json:"inputs"`
Ports int `json:"ports"`
Web int `json:"web"`
URLs int `json:"urls"`
Findings int `json:"findings"`
Errors int `json:"errors"`
Tasks int64 `json:"tasks"`
Requests int64 `json:"requests"`
Duration string `json:"duration"`
StartedAt time.Time `json:"started_at,omitempty"`
FinishedAt time.Time `json:"finished_at,omitempty"`
}
type TimelineEntry ¶
func ParseTimelineFile ¶
func ParseTimelineFile(path string) ([]TimelineEntry, error)
type ToolArtifact ¶ added in v0.4.0
type ToolArtifact struct {
Tool string
Kind string
Target string
Data json.RawMessage
CallID string
Timestamp time.Time
}
ToolArtifact is one scanner-native structured record. Nodes forward it unchanged; only the server normalizes it into canonical SCO documents.
Click to show internal directories.
Click to hide internal directories.