findings

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: Apache-2.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package findings records what a security engagement turned up.

A finding discovered and not written down is a finding lost. This is the ledger the security roles write to as they work and the report role reads from at the end — the connective tissue between testing and the report.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Finding

type Finding struct {
	ID          string   `json:"id"`
	Title       string   `json:"title"`
	Severity    Severity `json:"severity"`
	Target      string   `json:"target,omitempty"`
	Description string   `json:"description"`
	// Reproduce is the exact steps someone can follow to see it.
	Reproduce string `json:"reproduce,omitempty"`
	// Impact is what an attacker gains.
	Impact string `json:"impact,omitempty"`
	// Remediation is the concrete fix.
	Remediation string `json:"remediation,omitempty"`
	// CWE is an optional classification, e.g. "CWE-89".
	CWE string `json:"cwe,omitempty"`
	// Endpoint is the specific URL/parameter/API route, finer than Target.
	Endpoint string `json:"endpoint,omitempty"`
	// AttackVector is how it is reached, e.g. "network", "authenticated user".
	AttackVector string `json:"attack_vector,omitempty"`
	// PoC is a proof-of-concept: a request, payload, or snippet that shows it.
	PoC string `json:"poc,omitempty"`
	// Status tracks triage: new, confirmed, duplicate, or wontfix.
	Status Status `json:"status,omitempty"`
	// DuplicateOf points at the earlier finding this one repeats, when Status
	// is duplicate.
	DuplicateOf string    `json:"duplicate_of,omitempty"`
	CreatedAt   time.Time `json:"created_at"`
}

Finding is one recorded issue.

type Severity

type Severity string

Severity ranks a finding. The order matters: a report leads with the worst.

const (
	Critical Severity = "critical"
	High     Severity = "high"
	Medium   Severity = "medium"
	Low      Severity = "low"
	Info     Severity = "info"
)

func NormalizeSeverity

func NormalizeSeverity(s string) Severity

NormalizeSeverity maps free text to a known level, defaulting to info so an odd value never silently becomes critical.

type Status

type Status string

Status is where a finding sits in triage.

const (
	StatusNew       Status = "new"
	StatusConfirmed Status = "confirmed"
	StatusDuplicate Status = "duplicate"
	StatusWontfix   Status = "wontfix"
)

func NormalizeStatus

func NormalizeStatus(s string) Status

NormalizeStatus maps free text onto a known status, defaulting to new.

type Store

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

Store persists findings per session as one JSON file each.

func NewStore

func NewStore(dir string) *Store

NewStore roots a store at dir.

func (*Store) Add

func (s *Store) Add(sessionID string, f Finding) (Finding, error)

Add records a finding and returns it with its assigned id and time.

func (*Store) Clear

func (s *Store) Clear(sessionID string) error

Clear forgets a session's findings.

func (*Store) List

func (s *Store) List(sessionID string) ([]Finding, error)

List returns a session's findings, worst first.

func (*Store) Remove

func (s *Store) Remove(sessionID, id string) (bool, error)

Remove deletes one finding by id.

func (*Store) Report

func (s *Store) Report(sessionID, title string) (string, error)

Report renders a session's findings as a Markdown report body.

func (*Store) Triage

func (s *Store) Triage(sessionID, id string, status Status, duplicateOf string) (Finding, bool, error)

Triage sets a finding's status. Marking one confirmed clears any duplicate link; marking it duplicate needs the id it duplicates.

Jump to

Keyboard shortcuts

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