Documentation
¶
Index ¶
Constants ¶
View Source
const ( StatusAccepted = "accepted" StatusTransferred = "transferred" StatusMonitoring = "monitoring" )
Risk status constants.
Variables ¶
View Source
var ValidStatuses = map[string]bool{ StatusAccepted: true, StatusTransferred: true, StatusMonitoring: true, }
ValidStatuses lists valid risk statuses.
Functions ¶
func IsOverdueRegister ¶
func IsOverdueRegister(reg RegisterHeader) bool
IsOverdue reports whether the risk's next review date has passed.
Types ¶
type Decision ¶
type Decision struct {
Date string `yaml:"date"`
Rationale string `yaml:"rationale"`
Reviewer string `yaml:"reviewer"`
ReviewInterval string `yaml:"review_interval"` // quarterly | annually | etc.
}
Decision records the formal risk acceptance decision.
type LoadedFile ¶
type LoadedFile struct {
Path string
Data RegisterFile
}
LoadedFile is a parsed risk register file.
type RegisterFile ¶
type RegisterFile struct {
Register RegisterHeader `yaml:"risk_register"`
Risks []Risk `yaml:"risks"`
}
RegisterFile is the top-level structure of a risk register YAML file.
type RegisterHeader ¶
type RegisterHeader struct {
ID string `yaml:"id"`
Title string `yaml:"title"`
Owner string `yaml:"owner"` // platform | operator
LastReview string `yaml:"last_review"`
NextReview string `yaml:"next_review"`
}
RegisterHeader holds metadata for a risk register file.
type Risk ¶
type Risk struct {
ID string `yaml:"id"`
Finding string `yaml:"finding"` // finding ID
Profiles []string `yaml:"profiles,omitempty"` // empty = all profiles
Title string `yaml:"title"`
Severity string `yaml:"severity"` // original severity
ResidualSeverity string `yaml:"residual_severity"` // after compensating controls
Status string `yaml:"status"` // accepted | transferred | monitoring
Description string `yaml:"description"`
CompensatingControls []string `yaml:"compensating_controls"`
ResidualRisk string `yaml:"residual_risk"`
Decision Decision `yaml:"decision"`
Tracking *audit.IssueRef `yaml:"tracking,omitempty"`
}
Risk represents a single accepted/transferred risk entry.
func (*Risk) AppliesToProfile ¶
AppliesToProfile reports whether the risk applies to the given profile. A risk with no profiles applies to all profiles.
type RiskRef ¶
type RiskRef struct {
File *LoadedFile
Risk *Risk
}
RiskRef points to a risk within a loaded file.
Click to show internal directories.
Click to hide internal directories.