{"record":{"id":"cd4f537a8f6a0d1f","repo":"projectdiscovery/nuclei","slug":"both-verbose-and-silent-mode-specified","errorCode":null,"errorMessage":"both verbose and silent mode specified","messagePattern":"both verbose and silent mode specified","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/runner/options.go","lineNumber":156,"sourceCode":"\tif options.OfflineHTTP {\n\t\toptions.DisableHTTPProbe = true\n\t}\n}\n\n// validateOptions validates the configuration options passed\nfunc ValidateOptions(options *types.Options) error {\n\tif err := validateOptions.Struct(options); err != nil {\n\t\tif _, ok := err.(*validator.InvalidValidationError); ok {\n\t\t\treturn err\n\t\t}\n\t\terrs := []string{}\n\t\tfor _, err := range err.(validator.ValidationErrors) {\n\t\t\terrs = append(errs, err.Namespace()+\": \"+err.Tag())\n\t\t}\n\t\treturn errors.Wrap(errors.New(strings.Join(errs, \", \")), \"validation failed for these fields\")\n\t}\n\tif options.Verbose && options.Silent {\n\t\treturn errors.New(\"both verbose and silent mode specified\")\n\t}\n\n\tif (options.HeadlessOptionalArguments != nil || options.ShowBrowser || options.UseInstalledChrome) && !options.Headless {\n\t\treturn errors.New(\"headless mode (-headless) is required if -ho, -sb, -sc or -lha are set\")\n\t}\n\n\tif options.FollowHostRedirects && options.FollowRedirects {\n\t\treturn errors.New(\"both follow host redirects and follow redirects specified\")\n\t}\n\tif options.ShouldFollowHTTPRedirects() && options.DisableRedirects {\n\t\treturn errors.New(\"both follow redirects and disable redirects specified\")\n\t}\n\t// loading the proxy server list from file or cli and test the connectivity\n\tif err := loadProxyServers(options); err != nil {\n\t\treturn err\n\t}\n\tif options.Validate {\n\t\tvalidateTemplatePaths(options.Logger, config.DefaultConfig.TemplatesDirectory, options.Templates, options.Workflows)","sourceCodeStart":138,"sourceCodeEnd":174,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/internal/runner/options.go#L138-L174","documentation":"The default arm of the payload type switch in ValidatePayloads: the payload value is neither a string (wordlist file path), a map (loadable payload spec), nor a generic list. YAML scalars such as numbers or booleans, or nested structures of unexpected shape, land here and the template is rejected.","triggerScenarios":"payloads: {retries: 10} or {debug: true} - YAML parses these as int/bool rather than list or path string; also nested maps that do not match the expected payload spec shape.","commonSituations":"Unquoted scalars being type-inferred by YAML; copy-pasting a config value into a payload slot; refactoring payloads into unsupported structures.","solutions":["Turn the value into a list of strings, e.g. count: [\"10\"]","Or use a wordlist file path string, or the map form with a files key","Quote values that YAML would otherwise coerce to numbers or booleans","Re-run nuclei -validate to confirm the payload now parses"],"exampleFix":"# before\npayloads:\n  count: 10\n# after\npayloads:\n  count:\n    - \"10\"","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"func isSupportedPayloadValue(v interface{}) bool {\n    switch v.(type) {\n    case string, map[string]interface{}, []interface{}:\n        return true\n    default:\n        return false\n    }\n}","tryCatchPattern":null,"preventionTips":["Quote scalars you intend as string payloads","Use YAML lists or file paths only for payload values","Validate templates in CI"],"tags":["template","payload","yaml","type-error"],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}