{"record":{"id":"7db6a92f03ba2b35","repo":"crowdsecurity/crowdsec","slug":"description-is-mandatory","errorCode":null,"errorMessage":"description is mandatory","messagePattern":"description is mandatory","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/leakybucket/manager_load.go","lineNumber":85,"sourceCode":"\tleakspeed           time.Duration       // internal representation of `Leakspeed`\n\tduration            time.Duration       // internal representation of `Duration`\n\tret                 chan pipeline.Event // the bucket-specific output chan for overflows\n\tprocessors          []Processor         // processors is the list of hooks for pour/overflow/create (cf. uniq, blackhole etc.)\n\tscenarioHash        string\n\tSimulated           bool                // Set to true if the scenario instantiating the bucket was in the exclusion list\n\torderEvent          bool\n}\n\n// we use one NameGenerator for all the future buckets\nvar seed = namegenerator.NewNameGenerator(time.Now().UTC().UnixNano())\n\nfunc (f *BucketFactory) Validate() error {\n\tif f.Spec.Name == \"\" {\n\t\treturn errors.New(\"bucket must have name\")\n\t}\n\n\tif f.Spec.Description == \"\" {\n\t\treturn errors.New(\"description is mandatory\")\n\t}\n\n\timpl, ok := bucketTypes[f.Spec.Type]\n\tif !ok {\n\t\treturn fmt.Errorf(\"unknown bucket type '%s'\", f.Spec.Type)\n\t}\n\n\tif err := impl.Validate(f); err != nil {\n\t\treturn fmt.Errorf(\"%s bucket: %w\", f.Spec.Type, err)\n\t}\n\n\treturn f.Spec.ScopeType.CompileFilter()\n}\n\ntype SimulationChecker interface {\n\tIsSimulated(scenario string) bool\n}\n","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/crowdsecurity/crowdsec/blob/909b5157986a2b2c2163300fdaef5ed01289f7d2/pkg/leakybucket/manager_load.go#L67-L103","documentation":"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.","triggerScenarios":"Loading a bucket config where `description:` is absent or empty string, via LoadBucket validation.","commonSituations":"Community scenario submissions missing the mandatory description, or generated configs omitting it.","solutions":["Add a meaningful `description:` line to the bucket YAML","Resubmit/validate with hubtest tooling before publishing"],"exampleFix":"# before\nname: my/scenario\ntype: leaky\n# after\nname: my/scenario\ndescription: Brute force on ssh\ntype: leaky","handlingStrategy":"validation","validationCode":"if bucket.Spec.Description == \"\" {\n    return errors.New(\"scenario must define a description\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Include a one-line description in every scenario skeleton","Hub submission linters reject empty descriptions; run them pre-PR"],"tags":["crowdsec","leakybucket","config-validation","missing-field"],"backgroundTag":"missing-required-config-field","analyzedSha":"909b5157986a2b2c2163300fdaef5ed01289f7d2","analyzedAt":"2026-09-06T12:27:26.012Z","contentChangedAt":"2026-09-06T12:27:26.012Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}