{"record":{"id":"43243f9bf22a4262","repo":"crowdsecurity/crowdsec","slug":"appsec-config-and-appsec-config-path-are-mutually","errorCode":null,"errorMessage":"appsec_config and appsec_config_path are mutually exclusive with appsec_configs","messagePattern":"appsec_config and appsec_config_path are mutually exclusive with appsec_configs","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/acquisition/modules/appsec/config.go","lineNumber":94,"sourceCode":"\tif w.config.Path[0] != '/' {\n\t\tw.config.Path = \"/\" + w.config.Path\n\t}\n\n\tif w.config.Mode == \"\" {\n\t\tw.config.Mode = configuration.TAIL_MODE\n\t}\n\n\t// always have at least one appsec routine\n\tif w.config.Routines == 0 {\n\t\tw.config.Routines = 1\n\t}\n\n\tif w.config.AppsecConfig == \"\" && w.config.AppsecConfigPath == \"\" && len(w.config.AppsecConfigs) == 0 {\n\t\treturn errors.New(\"appsec_config or appsec_config_path must be set\")\n\t}\n\n\tif (w.config.AppsecConfig != \"\" || w.config.AppsecConfigPath != \"\") && len(w.config.AppsecConfigs) != 0 {\n\t\treturn errors.New(\"appsec_config and appsec_config_path are mutually exclusive with appsec_configs\")\n\t}\n\n\tif w.config.Name == \"\" {\n\t\tif w.config.ListenSocket != \"\" && w.config.ListenAddr == \"\" {\n\t\t\tw.config.Name = w.config.ListenSocket\n\t\t}\n\n\t\tif w.config.ListenSocket == \"\" {\n\t\t\tw.config.Name = fmt.Sprintf(\"%s%s\", w.config.ListenAddr, w.config.Path)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc loadCertPool(caCertPath string, logger log.FieldLogger) (*x509.CertPool, error) {\n\tcaCertPool, err := x509.SystemCertPool()\n\tif err != nil {","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/crowdsecurity/crowdsec/blob/909b5157986a2b2c2163300fdaef5ed01289f7d2/pkg/acquisition/modules/appsec/config.go#L76-L112","documentation":"Validation guard in UnmarshalConfig: the configuration mixes the singular forms (appsec_config or appsec_config_path) with the plural list form (appsec_configs). Specifying both makes the intended ruleset ambiguous, so the combination is rejected rather than silently merged.","triggerScenarios":"Thrown at pkg/acquisition/modules/appsec/config.go:94 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Keep either appsec_config/appsec_config_path or appsec_configs, never both","Move all entries into the appsec_configs list if you need several configs","Re-run a config check after fixing the acquis stanza"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}