{"record":{"id":"d25941c3c68333ab","repo":"owasp-amass/amass","slug":"active-enumeration-cannot-be-performed-without-dns","errorCode":null,"errorMessage":"active enumeration cannot be performed without DNS resolution","messagePattern":"active enumeration cannot be performed without DNS resolution","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"config/config.go","lineNumber":242,"sourceCode":"\t}\n}\n\n// UpdateConfig allows the provided Updater to update the current configuration.\nfunc (c *Config) UpdateConfig(update Updater) error {\n\treturn update.OverrideConfig(c)\n}\n\n// CheckSettings runs some sanity checks on the configuration options selected.\nfunc (c *Config) CheckSettings() error {\n\tvar err error\n\n\tif c.BruteForcing {\n\t\tif c.Passive {\n\t\t\treturn errors.New(\"brute forcing cannot be performed without DNS resolution\")\n\t\t}\n\t}\n\tif c.Passive && c.Active {\n\t\treturn errors.New(\"active enumeration cannot be performed without DNS resolution\")\n\t}\n\n\tc.Wordlist, err = ExpandMaskWordlist(c.Wordlist)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tc.AltWordlist, err = ExpandMaskWordlist(c.AltWordlist)\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn err\n}\n\n// LoadSettings parses settings from an .yaml file and assigns them to the Config.\nfunc (c *Config) LoadSettings(path string) error {\n\t// Determine and store the absolute path of the config file\n\tabsolutePath, err := filepath.Abs(path)","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/owasp-amass/amass/blob/79299dce87b0085db0f2f4ef3e9c52cccb49f514/config/config.go#L224-L260","documentation":"CheckSettings rejects a configuration where both Passive and Active modes are enabled. Passive mode means no DNS resolution is performed, so active enumeration (which requires DNS queries) cannot coexist with it.","triggerScenarios":"Calling Config.CheckSettings() when c.Passive == true && c.Active == true, e.g. a config file or flag combination that enables both enumeration modes.","commonSituations":"Merging a passive-mode config with an active-mode default, or passing flags like '-p' together with '-a' so both booleans end up true.","solutions":["Set Active: false to run purely passively, or Passive: false to allow active enumeration.","Fix CLI flag parsing so the modes are mutually exclusive (passive implies active off).","Check the loaded config file for both 'active' and 'passive' keys set to true.","Pre-validate flags at startup and print a clear usage message."],"exampleFix":"// before\ncfg.Passive = true\ncfg.Active = true\n// after\ncfg.Passive = true\ncfg.Active = false","handlingStrategy":"validation","validationCode":"if passive && active {\n    return errors.New(\"passive and active modes are mutually exclusive\")\n}","typeGuard":null,"tryCatchPattern":"if err := cfg.CheckSettings(); err != nil {\n    if strings.Contains(err.Error(), \"active enumeration cannot be performed\") {\n        // set Active=false or Passive=false and rebuild the config\n    }\n    return err\n}","preventionTips":["Enforce mutual exclusivity of mode flags at the CLI layer.","Use a single mode enum rather than two booleans.","Document the semantics of passive vs active in docs/help.","Add unit tests covering all flag combinations."],"tags":["config","dns","validation"],"backgroundTag":"conflicting-config-options","analyzedSha":"79299dce87b0085db0f2f4ef3e9c52cccb49f514","analyzedAt":"2026-09-06T08:22:48.198Z","contentChangedAt":"2026-09-06T08:22:48.198Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}