owasp-amass/amass · error
no resolver keys were found in the resolvers section
Error message
no resolver keys were found in the resolvers section
What it means
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.
Source
Thrown at cmd/oam_i2y/ini.go:225
// Parse the Database information and assign to the Config
if err := child.MapTo(db); err == nil {
db.System = name
c.GraphDBs = append(c.GraphDBs, db)
}
}
return nil
}
func (c *Config) loadResolverSettings(cfg *ini.File) error {
sec, err := cfg.GetSection("resolvers")
if err != nil {
return nil
}
c.Resolvers = stringset.Deduplicate(sec.Key("resolver").ValueWithShadows())
if len(c.Resolvers) == 0 {
return errors.New("no resolver keys were found in the resolvers section")
}
return nil
}
func (c *Config) loadScopeSettings(cfg *ini.File) error {
scope, err := cfg.GetSection("scope")
if err != nil {
return nil
}
if scope.HasKey("address") {
c.Addresses = append(c.Addresses, scope.Key("address").ValueWithShadows()...)
}
if scope.HasKey("cidr") {
for _, cidr := range scope.Key("cidr").ValueWithShadows() {
// Verify the CIDR is validView on GitHub (pinned to 79299dce87)
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).
Example fix
# before [resolvers] # resolver = 8.8.8.8 # after [resolvers] resolver = 8.8.8.8 resolver = 1.1.1.1
Defensive patterns
Strategy: validation
Validate before calling
sec, err := f.GetSection("resolvers")
if err != nil || len(sec.Key("resolver").ValueWithShadows()) == 0 {
return errors.New("config must define at least one resolver key")
} Try / catch
if err := loadResolverSettings(cfg); err != nil {
if strings.Contains(err.Error(), "no resolver keys") {
// prompt user to add a resolver entry or fall back to defaults
}
return err
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- brute forcing cannot be performed without DNS resolution
- active enumeration cannot be performed without DNS resolutio
- no valid resolvers were found
- failed to load the configuration file: %v
- error mapping configuration settings to internal values: %v
AI-assisted analysis of owasp-amass/amass@79299dce87 (2026-09-06).
Data as JSON: /api/errors/92542671b058f446.
Report an issue: GitHub.