crowdsecurity/crowdsec · error
no appsec-rules found for pattern %s
Error message
no appsec-rules found for pattern %s
What it means
After globbing the appsec collections directory for the given pattern, zero appsec collections were loaded — no seclang files, no hub items, no custom rules matched. The pattern (from an appsec config 'load' directive) matched nothing usable, so the runtime has no rules for that config.
Source
Thrown at pkg/appsec/appsec_rules_collection.go:200
loadSecLangFilesRules(appsecRule, hub, logger, &appsecCol)
if appsecRule.SecLangRules != nil {
logger.Tracef("Adding inline rules %+v", appsecRule.SecLangRules)
appsecCol.NativeRules = append(appsecCol.NativeRules, appsecRule.SecLangRules...)
}
if err := loadCustomRules(appsecRule, logger, &appsecCol); err != nil {
return nil, err
}
initRuleData(appsecRule, hub, logger)
ret = append(ret, appsecCol)
}
if len(ret) == 0 {
return nil, fmt.Errorf("no appsec-rules found for pattern %s", pattern)
}
return ret, nil
}
func (w AppsecCollection) String() string {
ret := ""
for _, rule := range w.Rules {
ret += rule + "\n"
}
return ret
}
View on GitHub (pinned to 909b515798)
Solutions
- Check the pattern path in the appsec configuration's load directive (typos, wrong relative base)
- Ensure the referenced hub appsec configs are installed (`cscli hub list` / `cscli collections install appsec_*`)
- Verify the files inside the matched directory actually contain appsec rules
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pkg/appsec/appsec_rules_collection.go:200 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of crowdsecurity/crowdsec@909b515798 (2026-09-06).
Data as JSON: /api/errors/7bf8c464586bf53d.
Report an issue: GitHub.