{"record":{"id":"978ddf98a8a14767","repo":"projectdiscovery/subfinder","slug":"invalid-source-s-specified-in-rls-flag","errorCode":null,"errorMessage":"invalid source %s specified in -rls flag","messagePattern":"invalid source (.+?) specified in -rls flag","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/runner/validate.go","lineNumber":75,"sourceCode":"\t\t\tif options.matchRegexes[i], err = regexp.Compile(stripRegexString(re)); err != nil {\n\t\t\t\treturn errors.New(\"invalid value for match regex option\")\n\t\t\t}\n\t\t}\n\t}\n\tif options.Filter != nil {\n\t\toptions.filterRegexes = make([]*regexp.Regexp, len(options.Filter))\n\t\tvar err error\n\t\tfor i, re := range options.Filter {\n\t\t\tif options.filterRegexes[i], err = regexp.Compile(stripRegexString(re)); err != nil {\n\t\t\t\treturn errors.New(\"invalid value for filter regex option\")\n\t\t\t}\n\t\t}\n\t}\n\n\tsources := mapsutil.GetKeys(passive.NameSourceMap)\n\tfor source := range options.RateLimits.AsMap() {\n\t\tif !sliceutil.Contains(sources, source) {\n\t\t\treturn fmt.Errorf(\"invalid source %s specified in -rls flag\", source)\n\t\t}\n\t}\n\treturn nil\n}\nfunc stripRegexString(val string) string {\n\tval = strings.ReplaceAll(val, \".\", \"\\\\.\")\n\tval = strings.ReplaceAll(val, \"*\", \".*\")\n\treturn fmt.Sprint(\"^\", val, \"$\")\n}\n\n// ConfigureOutput configures the output on the screen\nfunc (options *Options) ConfigureOutput() {\n\t// If the user desires verbose output, show verbose output\n\tif options.Verbose {\n\t\tgologger.DefaultLogger.SetMaxLevel(levels.LevelVerbose)\n\t}\n\tif options.NoColor {\n\t\tgologger.DefaultLogger.SetFormatter(formatter.NewCLI(true))","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/projectdiscovery/subfinder/blob/7a0b91f0fac01b62c65328bd771a3560ae611d6a/pkg/runner/validate.go#L57-L93","documentation":"The -rls (rate-limit per source) flag only accepts keys that are known passive source names, checked against passive.NameSourceMap. If a rate-limit key is not one of the built-in source names, validateOptions rejects it with this error.","triggerScenarios":"Running with -rls containing a key not present in passive.NameSourceMap, e.g. a misspelled or renamed source (source names change between releases).","commonSituations":"Typo'd source names in scripts; following outdated documentation after a source was renamed or removed; using an alias that is not the canonical source key.","solutions":["List the valid sources and use the exact name as the -rls key (e.g. -rls 'github=10/m')","Check the release notes/docs for renamed or removed sources in your subfinder version","Upgrade or downgrade subfinder so the source name matches the version in use"],"exampleFix":"// before\nsubfinder -d example.com -rls 'Github=10/m'\n// after\nsubfinder -d example.com -rls 'github=10/m'","handlingStrategy":"validation","validationCode":"sources := mapsutil.GetKeys(passive.NameSourceMap)\nfor source := range rateLimits.AsMap() {\n    if !sliceutil.Contains(sources, source) {\n        return fmt.Errorf(\"unknown rate-limit source: %s\", source)\n    }\n}","typeGuard":null,"tryCatchPattern":"opts, err := runner.ParseOptions()\nif err != nil && strings.Contains(err.Error(), \"invalid source\") {\n    // strip -rls or correct source name, retry\n}","preventionTips":["Use exact source names from the docs for -rls keys","After upgrading subfinder, re-check for renamed sources","Keep rate-limit strings in a reviewed config, not inline in scripts"],"tags":["cli","rate-limit","validation"],"backgroundTag":"invalid-argument-value","analyzedSha":"7a0b91f0fac01b62c65328bd771a3560ae611d6a","analyzedAt":"2026-09-06T23:52:02.109Z","contentChangedAt":"2026-09-06T23:52:02.109Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}