{"record":{"id":"53527d19c2cd9e12","repo":"crowdsecurity/crowdsec","slug":"nameless-bucket","errorCode":null,"errorMessage":"nameless bucket","messagePattern":"nameless bucket","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/leakybucket/manager_load.go","lineNumber":145,"sourceCode":"\t\tf := BucketFactory{}\n\n\t\terr = dec.Decode(&f.Spec)\n\t\tif err != nil {\n\t\t\tif !errors.Is(err, io.EOF) {\n\t\t\t\tlog.Errorf(\"Bad yaml in %s: %v\", itemPath, err)\n\t\t\t\treturn nil, fmt.Errorf(\"bad yaml in %s: %w\", itemPath, err)\n\t\t\t}\n\n\t\t\tlog.Tracef(\"End of yaml file\")\n\n\t\t\tbreak\n\t\t}\n\n\t\tf.DataDir = hub.GetDataDir()\n\t\t// check empty\n\t\tif f.Spec.Name == \"\" {\n\t\t\tlog.Errorf(\"Won't load nameless bucket\")\n\t\t\treturn nil, errors.New(\"nameless bucket\")\n\t\t}\n\t\t// check compat\n\t\tif f.Spec.FormatVersion == \"\" {\n\t\t\tlog.Tracef(\"no version in %s : %s, assuming '1.0'\", f.Spec.Name, itemPath)\n\t\t\tf.Spec.FormatVersion = \"1.0\"\n\t\t}\n\n\t\tok, err := constraint.Satisfies(f.Spec.FormatVersion, constraint.Scenario)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to check version: %w\", err)\n\t\t}\n\n\t\tif !ok {\n\t\t\tlog.Errorf(\"can't load %s : %s doesn't satisfy scenario format %s, skip\", f.Spec.Name, f.Spec.FormatVersion, constraint.Scenario)\n\t\t\tcontinue\n\t\t}\n\n\t\tf.Filename = filepath.Clean(itemPath)","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/crowdsecurity/crowdsec/blob/909b5157986a2b2c2163300fdaef5ed01289f7d2/pkg/leakybucket/manager_load.go#L127-L163","documentation":"loadBucketFactoriesFromFile logs 'Won't load nameless bucket' and returns this error when a parsed bucket file has an empty Spec.Name. Unlike Validate, this is raised during bulk loading of the hub directory, aborting the load of that file.","triggerScenarios":"Parsing a bucket file from disk whose name field is empty, via LoadBuckets.","commonSituations":"A corrupted or hand-edited scenario file in /etc/crowdsec/scenarios, a bad hub sync that wrote partial YAML, or a mounted config missing the name key.","solutions":["Inspect the offending scenario file reported in logs and add the `name:` field","Re-sync the hub (`cscli hub update` + `cscli hub upgrade`) to restore pristine files","Remove or fix the broken local override file"],"exampleFix":"# before (broken file)\ntype: leaky\nfilter: \"...\"\n# after\ntype: leaky\nname: author/scenario-name\nfilter: \"...\"","handlingStrategy":"validation","validationCode":"for _, f := range scenarioFiles {\n    if parseBucket(f).Spec.Name == \"\" {\n        log.Printf(\"file %s has no name; fix before reload\", f)\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Version-control /etc/crowdsec/scenarios to spot corrupted edits","Re-run `cscli hub update && cscli hub upgrade` after bad syncs","Tail crowdsec logs on startup for 'nameless bucket' warnings"],"tags":["crowdsec","leakybucket","load-error","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-14T05:17:10.506Z"}