owasp-amass/amass · error
failed to obtain the Amass output directory
Error message
failed to obtain the Amass output directory
What it means
Returned by rdapPlugin.Start when config.OutputDirectory() yields an empty string, meaning no output directory is configured (or it could not be resolved) for the Amass run. The RDAP plugin refuses to start because its disk cache (outdir/.openrdap) cannot be placed.
Source
Thrown at engine/plugins/api/rdap/plugin.go:70
name: "RDAP",
rlimit: rate.NewLimiter(limit, 1),
source: &et.Source{
Name: "RDAP",
Confidence: 100,
},
}
}
func (rd *rdapPlugin) Name() string {
return rd.name
}
func (rd *rdapPlugin) Start(r et.Registry) error {
rd.log = r.Log().WithGroup("plugin").With("name", rd.name)
outdir := config.OutputDirectory()
if outdir == "" {
return errors.New("failed to obtain the Amass output directory")
}
c := cache.NewDiskCache()
if c == nil {
return errors.New("failed to create the RDAP disk cache")
}
c.Dir = filepath.Join(outdir, ".openrdap")
bs := &bootstrap.Client{Cache: c}
tlsConfig := &tls.Config{InsecureSkipVerify: true}
transport := &http.Transport{
Proxy: http.ProxyFromEnvironment,
TLSClientConfig: tlsConfig,
}
bs.HTTP = &http.Client{
Transport: transport,
}
httpClient := &http.Client{View on GitHub (pinned to 79299dce87)
Solutions
- Set the output directory in the Amass configuration file so config.OutputDirectory() returns a valid path
- Verify the config file is actually being loaded (correct -config path)
- Ensure the environment (e.g. HOME) allows deriving the default output directory
- Print/log config.OutputDirectory() at startup to confirm it is non-empty
Example fix
// before
outdir := config.OutputDirectory()
// after
outdir := config.OutputDirectory()
if outdir == "" {
outdir = filepath.Join(config.DefaultOutputDirectory(), "rdap")
} Defensive patterns
Strategy: fallback
Validate before calling
if cfg.OutputDirectory == "" {
return errors.New("output directory must be set in the Amass config")
} Try / catch
if err := plugin.Start(registry); err != nil {
if strings.Contains(err.Error(), "output directory") {
log.Warn("rdap plugin disabled: no output directory configured")
return // continue without plugin
}
return err
} Prevention
- Always set the output directory in the Amass configuration file
- Verify config file is loaded (correct path passed to the engine)
- Log config.OutputDirectory() at startup to catch empty values early
When it happens
Trigger: Plugin startup (rdapPlugin.Start) when config.OutputDirectory() returns an empty string — typically when the Amass config's output directory setting is unset or resolves to nothing.
Common situations: Missing or empty output_directory in the Amass configuration file; running the engine without a loaded config providing default directories; HOME-derived default failing to resolve.
Understand the failure class
Background: "missing required config value" errors: why libraries refuse to start when a configuration key is empty, unset, or blank — this error's family across 48 libraries.
Related errors
- failed to create the RDAP disk cache
- unable to load the file in the alterations wordlist_file set
- failed to get absolute path of the configuration file: %v
- file does not exist: %v
- no resolver keys were found in the resolvers section
AI-assisted analysis of owasp-amass/amass@79299dce87 (2026-09-06).
Data as JSON: /api/errors/22d4fcaa852cad2b.
Report an issue: GitHub.