Summary
Add an optional Href field to compliance.Control and common.ComplianceControl so that control IDs in reports can link to their relevant documentation (STIG viewer, SANS checklist, NIST references, etc.).
Problem
Control IDs like V-206694, SANS-FW-012, and FIREWALL-029 appear in audit reports but provide no direct path to the authoritative documentation. Auditors must manually search for the control definition.
Proposed Solution
Add Href string to both:
internal/compliance/interfaces.go — Control struct:
type Control struct {
ID string
Href string `json:"href,omitempty"` // Link to control documentation
Title string
// ... existing fields
}
pkg/model/enrichment.go — ComplianceControl export model:
type ComplianceControl struct {
ID string `json:"id,omitempty" yaml:"id,omitempty"`
Href string `json:"href,omitempty" yaml:"href,omitempty"`
Status string `json:"status" yaml:"status"`
// ... existing fields
}
Markdown rendering
In writePluginControlsTable, render the Control ID as a markdown link when Href is set:
controlID := ctrl.ID
if ctrl.Href != "" {
controlID = fmt.Sprintf("[%s](%s)", ctrl.ID, ctrl.Href)
}
Plugin population
Each plugin sets Href on its controls:
| Plugin |
Example Href |
| STIG |
https://stigviewer.com/stig/firewall_security_requirements_guide/finding/V-206694 |
| SANS |
https://www.sans.org/media/score/checklists/FirewallChecklist.pdf |
| Firewall |
docs/firewall-security-controls-reference.md (local docs link) |
Mapping
mapControls in cmd/audit_handler.go copies Href from compliance.Control to common.ComplianceControl during conversion.
Acceptance Criteria
Related
Summary
Add an optional
Hreffield tocompliance.Controlandcommon.ComplianceControlso that control IDs in reports can link to their relevant documentation (STIG viewer, SANS checklist, NIST references, etc.).Problem
Control IDs like
V-206694,SANS-FW-012, andFIREWALL-029appear in audit reports but provide no direct path to the authoritative documentation. Auditors must manually search for the control definition.Proposed Solution
Add
Href stringto both:internal/compliance/interfaces.go—Controlstruct:pkg/model/enrichment.go—ComplianceControlexport model:Markdown rendering
In
writePluginControlsTable, render the Control ID as a markdown link when Href is set:Plugin population
Each plugin sets Href on its controls:
https://stigviewer.com/stig/firewall_security_requirements_guide/finding/V-206694https://www.sans.org/media/score/checklists/FirewallChecklist.pdfdocs/firewall-security-controls-reference.md(local docs link)Mapping
mapControlsincmd/audit_handler.gocopiesHreffromcompliance.Controltocommon.ComplianceControlduring conversion.Acceptance Criteria
Hreffield added tocompliance.Controlandcommon.ComplianceControlmapControlscopies Href during mapping[ID](href)when Href is sethreffield when setmodel-reference.mdregeneratedRelated