{"record":{"id":"1532a8e2fc192350","repo":"projectdiscovery/nuclei","slug":"invalid-file-extension-supported-extensions-are","errorCode":null,"errorMessage":"invalid file extension: supported extensions are .yml,.yaml and .json got %s","messagePattern":"invalid file extension: supported extensions are \\.yml,\\.yaml and \\.json got (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/authprovider/authx/file.go","lineNumber":210,"sourceCode":"\tslice := strings.Split(tmp, \";\")\n\tif len(slice) == 0 {\n\t\treturn fmt.Errorf(\"invalid raw cookie no ; found\")\n\t}\n\t// first element is the cookie name and value\n\tcookie := strings.Split(slice[0], \"=\")\n\tif len(cookie) == 2 {\n\t\tc.Key = cookie[0]\n\t\tc.Value = cookie[1]\n\t\treturn nil\n\t}\n\treturn fmt.Errorf(\"invalid raw cookie: %s\", c.Raw)\n}\n\n// GetAuthDataFromFile reads the auth data from file\nfunc GetAuthDataFromFile(file string) (*Authx, error) {\n\text := filepath.Ext(file)\n\tif !generic.EqualsAny(ext, \".yml\", \".yaml\", \".json\") {\n\t\treturn nil, fmt.Errorf(\"invalid file extension: supported extensions are .yml,.yaml and .json got %s\", ext)\n\t}\n\tbin, err := os.ReadFile(file)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif ext == \".yml\" || ext == \".yaml\" {\n\t\treturn GetAuthDataFromYAML(bin)\n\t}\n\treturn GetAuthDataFromJSON(bin)\n}\n\n// GetTemplatePathsFromSecretFile reads the template IDs from the secret file\nfunc GetTemplatePathsFromSecretFile(file string) ([]string, error) {\n\tauth, err := GetAuthDataFromFile(file)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar paths []string","sourceCodeStart":192,"sourceCodeEnd":228,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/authprovider/authx/file.go#L192-L228","documentation":"Error \"invalid file extension: supported extensions are .yml,.yaml and .json got %s\" thrown in projectdiscovery/nuclei.","triggerScenarios":"Thrown at pkg/authprovider/authx/file.go:210 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}