Documentation
¶
Overview ¶
Package security provides security posture scanning for CloudMock environments. It checks mock AWS resources for common misconfigurations and compliance violations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Finding ¶
type Finding struct {
CheckID string `json:"check_id"`
Resource string `json:"resource"` // ARN or identifier
Service string `json:"service"`
Status string `json:"status"` // "pass", "fail", "warning"
Detail string `json:"detail"`
FoundAt time.Time `json:"found_at"`
}
Finding records the result of a check against a specific resource.
func FindingsByCategory ¶
func FindingsByCategory(findings []Finding, checks []SecurityCheck, category string) []Finding
FindingsByCategory filters findings by check category.
type ScanResult ¶
type ScanResult struct {
ScanID string `json:"scan_id"`
StartedAt time.Time `json:"started_at"`
FinishedAt time.Time `json:"finished_at"`
Findings []Finding `json:"findings"`
Summary Summary `json:"summary"`
}
ScanResult holds the output of a full security scan.
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner runs security checks against the service registry.
func NewScanner ¶
NewScanner creates a scanner with built-in checks.
func (*Scanner) Checks ¶
func (s *Scanner) Checks() []SecurityCheck
Checks returns the list of available security checks.
func (*Scanner) LastScan ¶
func (s *Scanner) LastScan() *ScanResult
LastScan returns the cached results from the most recent scan.
func (*Scanner) Registry ¶
Registry returns the underlying service registry for inspecting services.
func (*Scanner) Scan ¶
func (s *Scanner) Scan() *ScanResult
Scan runs all checks and caches the results.
type SecurityCheck ¶
type SecurityCheck struct {
ID string `json:"id"`
Name string `json:"name"`
Category string `json:"category"` // "iam", "s3", "encryption", "network"
Severity string `json:"severity"` // "critical", "high", "medium", "low", "info"
Description string `json:"description"`
Remediation string `json:"remediation"`
}
SecurityCheck defines a check that the scanner runs.