mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-19 02:17:09 +00:00
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.
17 lines
515 B
Go
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
|
|
}
|