crowdsecurity/crowdsec · error
description is mandatory
Error message
description is mandatory
What it means
Validation failure in leaky-bucket Validate (reached via LoadBucket): the scenario's description field is mandatory and was empty. The bucket cannot be loaded because alert output requires a description.
Source
Thrown at pkg/leakybucket/manager_load.go:85
leakspeed time.Duration // internal representation of `Leakspeed`
duration time.Duration // internal representation of `Duration`
ret chan pipeline.Event // the bucket-specific output chan for overflows
processors []Processor // processors is the list of hooks for pour/overflow/create (cf. uniq, blackhole etc.)
scenarioHash string
Simulated bool // Set to true if the scenario instantiating the bucket was in the exclusion list
orderEvent bool
}
// we use one NameGenerator for all the future buckets
var seed = namegenerator.NewNameGenerator(time.Now().UTC().UnixNano())
func (f *BucketFactory) Validate() error {
if f.Spec.Name == "" {
return errors.New("bucket must have name")
}
if f.Spec.Description == "" {
return errors.New("description is mandatory")
}
impl, ok := bucketTypes[f.Spec.Type]
if !ok {
return fmt.Errorf("unknown bucket type '%s'", f.Spec.Type)
}
if err := impl.Validate(f); err != nil {
return fmt.Errorf("%s bucket: %w", f.Spec.Type, err)
}
return f.Spec.ScopeType.CompileFilter()
}
type SimulationChecker interface {
IsSimulated(scenario string) bool
}
View on GitHub (pinned to 909b515798)
Solutions
- Add a meaningful `description:` line to the bucket YAML
- Resubmit/validate with hubtest tooling before publishing
Example fix
# before name: my/scenario type: leaky # after name: my/scenario description: Brute force on ssh type: leaky
Defensive patterns
Strategy: validation
Validate before calling
if bucket.Spec.Description == "" {
return errors.New("scenario must define a description")
} Prevention
- Include a one-line description in every scenario skeleton
- Hub submission linters reject empty descriptions; run them pre-PR
When it happens
Trigger: Loading a bucket config where `description:` is absent or empty string, via LoadBucket validation.
Common situations: Community scenario submissions missing the mandatory description, or generated configs omitting it.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- bucket must have name
- invalid threshold: must be > 0 and <= 1
- capacity must be -1
- nameless bucket
- missing filter directive
AI-assisted analysis of crowdsecurity/crowdsec@909b515798 (2026-09-06).
Data as JSON: /api/errors/7db6a92f03ba2b35.
Report an issue: GitHub.