owasp-amass/amass · error

failed to parse rigid_boundaries setting, value is not a…

Error message

failed to parse rigid_boundaries setting, value is not a boolean

What it means

loadRigidSettings expects the optional 'rigid_boundaries' config option to be a Go bool. If the key is present but holds any other type (string, number), the type assertion fails and this error is returned instead of silently coercing.

Solutions

  1. Change the value to an unquoted boolean: rigid_boundaries: true (YAML) or "rigid_boundaries": true (JSON)
  2. If set programmatically, pass a bool (true/false), not a string or int
  3. Check the code that builds the options map and ensure it does not stringify config values

Example fix

// before
options["rigid_boundaries"] = "true"
// after
options["rigid_boundaries"] = true
Defensive patterns

Strategy: type-guard

Validate before calling

v, ok := options["rigid_boundaries"]; if ok { if _, isBool := v.(bool); !isBool { return fmt.Errorf("rigid_boundaries must be bool, got %T", v) } }

Type guard

func isBool(v interface{}) bool { _, ok := v.(bool); return ok }

Try / catch

if err := loadRigidSettings(); err != nil { return fmt.Errorf("config option rigid_boundaries: %w", err) }

Prevention

When it happens

Trigger: The config map contains "rigid_boundaries": "true" (string) or 1 (int) instead of a real boolean true/false, typically from a YAML/JSON config parsed into interface{} values or programmatic options built with the wrong type.

Common situations: Hand-edited config files quoting boolean values; generating config from templates that stringify everything; calling the settings API with untyped maps where JSON numbers become float64.

Understand the failure class

Related errors


AI-assisted analysis of owasp-amass/amass@79299dce87 (2026-09-06). Data as JSON: /api/errors/938df29eeb500da3. Report an issue: GitHub.

Appendix: source

Thrown at config/rigid.go:19

// Copyright © by Jeff Foley 2017-2026. All rights reserved.
// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
// SPDX-License-Identifier: Apache-2.0

package config

import "fmt"

func (c *Config) loadRigidSettings(cfg *Config) error {
	// retrieve the rigid_boundaries option from the configuration
	rigidinterface, ok := c.Options["rigid_boundaries"]
	if !ok {
		// "rigid_boundaries" not found in options, so nothing to do here
		return nil
	}

	rigid, ok := rigidinterface.(bool)
	if !ok {
		return fmt.Errorf("failed to parse rigid_boundaries setting, value is not a boolean")
	}

	c.Rigid = rigid
	return nil
}

View on GitHub (pinned to 79299dce87)