{"record":{"id":"fe42c5e2e53e212a","repo":"shadow1ng/fscan","slug":"fscan-plugin-q-is-not-enabled-for-embedded-safe","errorCode":null,"errorMessage":"fscan: plugin %q is not enabled for embedded safe mode","messagePattern":"fscan: plugin %q is not enabled for embedded safe mode","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/fscan/scanner.go","lineNumber":342,"sourceCode":"\n\tif opts.controller != nil {\n\t\tsession.PauseGate = opts.controller.pauseGate\n\t\topts.controller.addState(state)\n\t}\n\n\treturn core.RunScan(ctx, info, session)\n}\n\nfunc validateConfig(config Config, targets []Target) error {\n\tif len(targets) == 0 {\n\t\treturn fmt.Errorf(\"fscan: at least one target is required\")\n\t}\n\tfor _, name := range normalizePlugins(config.Plugins) {\n\t\tif !plugins.Exists(name) {\n\t\t\treturn fmt.Errorf(\"fscan: plugin %q not found\", name)\n\t\t}\n\t\tif !config.AllowUnsafePlugins && !IsSafePlugin(name) {\n\t\t\treturn fmt.Errorf(\"fscan: plugin %q is not enabled for embedded safe mode\", name)\n\t\t}\n\t}\n\tfor _, target := range targets {\n\t\tif strings.TrimSpace(target.Host) == \"\" && strings.TrimSpace(target.URL) == \"\" {\n\t\t\treturn fmt.Errorf(\"fscan: target host or URL is required\")\n\t\t}\n\t\tif strings.TrimSpace(target.Host) != \"\" && strings.TrimSpace(target.URL) != \"\" {\n\t\t\treturn fmt.Errorf(\"fscan: target cannot set both Host and URL\")\n\t\t}\n\t\tfor _, port := range target.Ports {\n\t\t\tif port < 1 || port > 65535 {\n\t\t\t\treturn fmt.Errorf(\"fscan: invalid port %d\", port)\n\t\t\t}\n\t\t}\n\t}\n\tfor _, port := range config.Ports {\n\t\tif port < 1 || port > 65535 {\n\t\t\treturn fmt.Errorf(\"fscan: invalid port %d\", port)","sourceCodeStart":324,"sourceCodeEnd":360,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/pkg/fscan/scanner.go#L324-L360","documentation":"Validation in validateConfig: the requested plugin exists but is not in the embedded safe-mode allowlist, and AllowUnsafePlugins is false — embedded library consumers must explicitly opt in to unsafe plugins.","triggerScenarios":"Thrown at pkg/fscan/scanner.go:342 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set AllowUnsafePlugins=true if the plugin is trusted in your embedding context","Choose an equivalent safe-listed plugin","Whitelist the plugin in IsSafePlugin if you maintain the allowlist"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"95cc12e753bf43de7004e5aef42a9ffba3934303","analyzedAt":"2026-09-06T17:07:30.094Z","contentChangedAt":"2026-09-06T17:07:30.094Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}