{"record":{"id":"938df29eeb500da3","repo":"owasp-amass/amass","slug":"failed-to-parse-rigid-boundaries-setting-value-is","errorCode":null,"errorMessage":"failed to parse rigid_boundaries setting, value is not a boolean","messagePattern":"failed to parse rigid_boundaries setting, value is not a boolean","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"config/rigid.go","lineNumber":19,"sourceCode":"// Copyright © by Jeff Foley 2017-2026. All rights reserved.\n// Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.\n// SPDX-License-Identifier: Apache-2.0\n\npackage config\n\nimport \"fmt\"\n\nfunc (c *Config) loadRigidSettings(cfg *Config) error {\n\t// retrieve the rigid_boundaries option from the configuration\n\trigidinterface, ok := c.Options[\"rigid_boundaries\"]\n\tif !ok {\n\t\t// \"rigid_boundaries\" not found in options, so nothing to do here\n\t\treturn nil\n\t}\n\n\trigid, ok := rigidinterface.(bool)\n\tif !ok {\n\t\treturn fmt.Errorf(\"failed to parse rigid_boundaries setting, value is not a boolean\")\n\t}\n\n\tc.Rigid = rigid\n\treturn nil\n}\n","sourceCodeStart":1,"sourceCodeEnd":25,"githubUrl":"https://github.com/owasp-amass/amass/blob/79299dce87b0085db0f2f4ef3e9c52cccb49f514/config/rigid.go#L1-L25","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Change the value to an unquoted boolean: rigid_boundaries: true (YAML) or \"rigid_boundaries\": true (JSON)","If set programmatically, pass a bool (true/false), not a string or int","Check the code that builds the options map and ensure it does not stringify config values"],"exampleFix":"// before\noptions[\"rigid_boundaries\"] = \"true\"\n// after\noptions[\"rigid_boundaries\"] = true","handlingStrategy":"type-guard","validationCode":"v, ok := options[\"rigid_boundaries\"]; if ok { if _, isBool := v.(bool); !isBool { return fmt.Errorf(\"rigid_boundaries must be bool, got %T\", v) } }","typeGuard":"func isBool(v interface{}) bool { _, ok := v.(bool); return ok }","tryCatchPattern":"if err := loadRigidSettings(); err != nil { return fmt.Errorf(\"config option rigid_boundaries: %w\", err) }","preventionTips":["Never quote booleans in YAML/JSON configs","Cast types explicitly when building option maps","Schema-validate config files at startup","Watch for float64 leakage from JSON decoding"],"tags":["config","type-mismatch","boolean"],"backgroundTag":"config-type-mismatch","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"}