Files
skillshare/internal/audit/analyzer_crossskill.go
T
Willie 6e86537987 fix(audit): honor enabled:false for synthetic tier and cross-skill findings
Tier and cross-skill findings are generated programmatically rather than
compiled from the rule list, so they bypassed the disabled-ID filter applied
at rule-compile time. Setting enabled:false in audit-rules.yaml marked the
rule disabled in the listing but the scan still fired it at full severity.

Filter synthetic findings against the disabled-ID set in both the skill-scan
and single-file paths, threading the set through the cross-skill call sites
(analyzer, cmd, server). Fixes #204.
2026-06-05 20:51:32 +08:00

17 lines
515 B
Go

package audit
// crossSkillAnalyzer wraps bundle-level cross-skill risk analysis.
// Runs once after all skills are scanned.
type crossSkillAnalyzer struct{}
func (a *crossSkillAnalyzer) ID() string { return AnalyzerCrossSkill }
func (a *crossSkillAnalyzer) Scope() AnalyzerScope { return ScopeBundle }
func (a *crossSkillAnalyzer) Analyze(ctx *AnalyzeContext) ([]Finding, error) {
xr := CrossSkillAnalysis(ctx.Results, ctx.DisabledIDs)
if xr == nil {
return nil, nil
}
return xr.Findings, nil
}