owasp-amass/amass · error
alterations enabled is not a bool
Error message
alterations enabled is not a bool
What it means
In loadAlterationSettings, once the alterations map is decoded, the "enabled" sub-key is asserted to be a bool via `alterations["enabled"].(bool)`. The assertion failed because the value is a string, number, or nil. The library requires a strict boolean to set Config.Alterations.
Source
Thrown at config/brute.go:77
c.Wordlist = stringset.Deduplicate(c.Wordlist)
return nil
}
func (c *Config) loadAlterationSettings(cfg *Config) error {
alterationsRaw, ok := c.Options["alterations"]
if !ok {
return nil
}
alterations, ok := alterationsRaw.(map[string]interface{})
if !ok {
return fmt.Errorf("alterations is not a map[string]interface{}")
}
enabled, ok := alterations["enabled"].(bool)
if !ok {
return fmt.Errorf("alterations enabled is not a bool")
}
c.Alterations = enabled
if !c.Alterations {
return nil
}
if wordlistPathRaw, ok := alterations["wordlists"]; ok {
wordlistPaths, ok := wordlistPathRaw.([]interface{})
if !ok {
return fmt.Errorf("alterations wordlist_file is not an array")
}
for _, wordlistPathRaw := range wordlistPaths {
wordlistPath, ok := wordlistPathRaw.(string)
if !ok {
return fmt.Errorf("alterations wordlist_file item is not a string")
}View on GitHub (pinned to 79299dce87)
Solutions
- Set alterations.enabled to a plain boolean: alterations:\n enabled: true
- Replace string/number/yes-no values with true or false
- Delete the key if you want it omitted rather than malformed
- Add a config schema validation step that verifies enabled is bool before load
Example fix
# before alterations: enabled: 1 # after alterations: enabled: true
Defensive patterns
Strategy: type-guard
Validate before calling
func validateAltEnabled(alterations map[string]interface{}) error {
v, ok := alterations["enabled"]
if !ok {
return fmt.Errorf("alterations.enabled is required")
}
if _, ok := v.(bool); !ok {
return fmt.Errorf("alterations.enabled must be true/false, got %T", v)
}
return nil
} Type guard
func isBool(v interface{}) bool { _, ok := v.(bool); return ok } Try / catch
if err := cfg.LoadSettings(); err != nil {
if strings.Contains(err.Error(), "alterations enabled is not a bool") {
// set enabled to unquoted true/false and reload
}
log.Fatal(err)
} Prevention
- Write enabled as a bare true/false token, unquoted
- Avoid yes/no/1/0 conventions from other tools
- Remove leftover empty keys after editing the config
- Validate the config file automatically in CI before distribution
When it happens
Trigger: A config where alterations is a map but alterations.enabled is not a bool, e.g. enabled: "true", enabled: 1, or enabled: (null/empty).
Common situations: Quoted booleans from hand-edited configs; yes/on values from other tools' conventions; an empty key left behind after deleting a value.
Related errors
- failed to parse active setting, value is not a boolean
- bruteforce enabled is not a bool
- bruteforce is not a map[string]interface{}
- bruteforce wordlist_file is not an array
- bruteforce wordlist_file item is not a string
AI-assisted analysis of owasp-amass/amass@79299dce87 (2026-09-06).
Data as JSON: /api/errors/8b95c9ec517f3eab.
Report an issue: GitHub.