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 ¶
- type Finding
- type Severity
- type Status
- type Store
- func (s *Store) Add(sessionID string, f Finding) (Finding, error)
- func (s *Store) Clear(sessionID string) error
- func (s *Store) List(sessionID string) ([]Finding, error)
- func (s *Store) Remove(sessionID, id string) (bool, error)
- func (s *Store) Report(sessionID, title string) (string, error)
- func (s *Store) Triage(sessionID, id string, status Status, duplicateOf string) (Finding, bool, error)
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.
func NormalizeSeverity ¶
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.
func NormalizeStatus ¶
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.