{"record":{"id":"92542671b058f446","repo":"owasp-amass/amass","slug":"no-resolver-keys-were-found-in-the-resolvers-secti","errorCode":null,"errorMessage":"no resolver keys were found in the resolvers section","messagePattern":"no resolver keys were found in the resolvers section","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/oam_i2y/ini.go","lineNumber":225,"sourceCode":"\t\t// Parse the Database information and assign to the Config\n\t\tif err := child.MapTo(db); err == nil {\n\t\t\tdb.System = name\n\t\t\tc.GraphDBs = append(c.GraphDBs, db)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc (c *Config) loadResolverSettings(cfg *ini.File) error {\n\tsec, err := cfg.GetSection(\"resolvers\")\n\tif err != nil {\n\t\treturn nil\n\t}\n\n\tc.Resolvers = stringset.Deduplicate(sec.Key(\"resolver\").ValueWithShadows())\n\tif len(c.Resolvers) == 0 {\n\t\treturn errors.New(\"no resolver keys were found in the resolvers section\")\n\t}\n\n\treturn nil\n}\n\nfunc (c *Config) loadScopeSettings(cfg *ini.File) error {\n\tscope, err := cfg.GetSection(\"scope\")\n\tif err != nil {\n\t\treturn nil\n\t}\n\n\tif scope.HasKey(\"address\") {\n\t\tc.Addresses = append(c.Addresses, scope.Key(\"address\").ValueWithShadows()...)\n\t}\n\n\tif scope.HasKey(\"cidr\") {\n\t\tfor _, cidr := range scope.Key(\"cidr\").ValueWithShadows() {\n\t\t\t// Verify the CIDR is valid","sourceCodeStart":207,"sourceCodeEnd":243,"githubUrl":"https://github.com/owasp-amass/amass/blob/79299dce87b0085db0f2f4ef3e9c52cccb49f514/cmd/oam_i2y/ini.go#L207-L243","documentation":"This error is thrown by loadResolverSettings when the 'resolvers' section of the INI config file exists but contains no 'resolver' keys (after merging shadowed values). The library requires at least one DNS resolver to be configured for enumeration to work, since all lookups depend on resolvers.","triggerScenarios":"Calling loadResolverSettings (via config loading) on an ini.File whose resolvers section has no 'resolver' keys, so stringset.Deduplicate(sec.Key(\"resolver\").ValueWithShadows()) returns an empty slice.","commonSituations":"The user has a [resolvers] section header in the config file but forgot to add resolver entries, misspelled the key (e.g. 'resolvers = ...' instead of 'resolver = ...'), or all resolver lines are commented out.","solutions":["Add at least one 'resolver' entry under the resolvers section (e.g. resolver = 8.8.8.8).","Fix the key spelling so it is exactly 'resolver'.","Uncomment or remove blank/commented resolver lines and re-run.","Verify the correct config file path is being loaded (the file being read may differ from the one you edited)."],"exampleFix":"# before\n[resolvers]\n# resolver = 8.8.8.8\n# after\n[resolvers]\nresolver = 8.8.8.8\nresolver = 1.1.1.1","handlingStrategy":"validation","validationCode":"sec, err := f.GetSection(\"resolvers\")\nif err != nil || len(sec.Key(\"resolver\").ValueWithShadows()) == 0 {\n    return errors.New(\"config must define at least one resolver key\")\n}","typeGuard":null,"tryCatchPattern":"if err := loadResolverSettings(cfg); err != nil {\n    if strings.Contains(err.Error(), \"no resolver keys\") {\n        // prompt user to add a resolver entry or fall back to defaults\n    }\n    return err\n}","preventionTips":["Always ship a default resolvers block in config templates.","Lint config files for required keys at startup.","Keep key name exactly 'resolver'.","Uncomment all needed resolver lines in shared configs."],"tags":["config","dns","ini"],"backgroundTag":"missing-required-config-field","analyzedSha":"79299dce87b0085db0f2f4ef3e9c52cccb49f514","analyzedAt":"2026-09-06T08:22:48.198Z","contentChangedAt":"2026-09-06T08:22:48.198Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}