output

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

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 (
	LootFingerprint = parsers.LootFingerprint
	LootWeakpass    = parsers.LootWeakpass
	LootVuln        = parsers.LootVuln
)

Variables

This section is empty.

Functions

func BuildEventMarkdown

func BuildEventMarkdown(events []*aop.Event) string

func CompactStrings

func CompactStrings(values ...string) []string

func FirstNonEmpty

func FirstNonEmpty(values ...string) string

func FormatLine

func FormatLine(prefix, body string, color Color) string

func OutputPrefix

func OutputPrefix(source string, colorFn func(string) string) string

func ReadJSONL

func ReadJSONL(path string) ([]*aop.Event, error)

func RenderEventFile

func RenderEventFile(path, format, outputPath string) error

RenderEventFile renders an AOP Event ProtoJSONL file.

func RenderEvents

func RenderEvents(w io.Writer, events []*aop.Event) error

func RenderEventsMarkdown

func RenderEventsMarkdown(w io.Writer, events []*aop.Event) error

func SanitizeLine

func SanitizeLine(line string, color Color) string

func ScanJSONL

func ScanJSONL(path string, visit func(*aop.Event) error) error

ScanJSONL decodes the canonical append-only AOP event stream one line at a time. Empty and non-JSON lines are ignored; malformed AOP event lines fail.

func StripANSI

func StripANSI(s string) string

func TruncateStr

func TruncateStr(s string, maxLen int) string

func ValidateJSONLTarget

func ValidateJSONLTarget(path string) error

Types

type ArtifactResult

type ArtifactResult struct {
	ResultID string `json:"result_id"`
	Tool     string `json:"tool"`
	Kind     string `json:"kind"`
	Target   string `json:"target"`
	Data     any    `json:"data"`
}

ArtifactResult keeps the scanner-native result paired with a Loot marker. Data is serialized directly into aop.tool.Artifact without reshaping.

type Color

type Color struct {
	Enabled bool
}

func NewColor

func NewColor(enabled bool) Color

func (Color) Bold

func (c Color) Bold(s string) string

func (Color) Code

func (c Color) Code(code string) string

func (Color) Cyan

func (c Color) Cyan(s string) string

func (Color) Dim

func (c Color) Dim(s string) string

func (Color) ForPriority

func (c Color) ForPriority(p string) func(string) string

func (Color) Green

func (c Color) Green(s string) string

func (Color) GreenBold

func (c Color) GreenBold(s string) string

func (Color) Red

func (c Color) Red(s string) string

func (Color) Status

func (c Color) Status(s string) string

func (Color) Wrap added in v0.2.7

func (c Color) Wrap(s, code string) string

func (Color) Yellow

func (c Color) Yellow(s string) string

func (Color) YellowBold

func (c Color) YellowBold(s string) string

type Error

type Error struct {
	Source  string `json:"source,omitempty"`
	Message string `json:"message"`
}

type JSONLRecorder

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

JSONLRecorder is the single append-only subscriber for persisted AOP events.

func NewJSONLRecorder

func NewJSONLRecorder(bus *eventbus.Bus[*aop.Event], path string) (*JSONLRecorder, error)

func (*JSONLRecorder) Close

func (r *JSONLRecorder) Close() error

func (*JSONLRecorder) Path

func (r *JSONLRecorder) Path() string

func (*JSONLRecorder) Switch

func (r *JSONLRecorder) Switch(path string) error

func (*JSONLRecorder) Write

func (r *JSONLRecorder) Write(event *aop.Event) error

type Loot

type Loot = parsers.Loot

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"`
	Artifacts []ArtifactResult       `json:"artifacts,omitempty"`
	Loots     []Loot                 `json:"loots,omitempty"`
	Errors    []Error                `json:"errors,omitempty"`
}

ScanResult is private collector state. Scanner-native records leave a node only as canonical aop.tool.Artifact messages.

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"`
}

Jump to

Keyboard shortcuts

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