{"record":{"id":"8902a16198cd8071","repo":"shadow1ng/fscan","slug":"webscan-err-poc-load-failed","errorCode":null,"errorMessage":"webscan_err_poc_load_failed","messagePattern":"webscan_err_poc_load_failed","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"webscan/web_scan.go","lineNumber":39,"sourceCode":"\t\"github.com/shadow1ng/fscan/webscan/lib\"\n)\n\n// 常量定义\nconst (\n\tprotocolHTTP     = \"http://\"\n\tprotocolHTTPS    = \"https://\"\n\tyamlExt          = \".yaml\"\n\tymlExt           = \".yml\"\n\tdefaultTimeout   = 30 * time.Second\n\tconcurrencyLimit = 10 // 并发加载POC的限制\n)\n\n// 错误定义\nvar (\n\tErrInvalidURL    = errors.New(i18n.GetText(\"webscan_err_invalid_url\"))\n\tErrEmptyTarget   = errors.New(i18n.GetText(\"webscan_err_empty_target\"))\n\tErrPocNotFound   = errors.New(i18n.GetText(\"webscan_err_poc_not_found\"))\n\tErrPocLoadFailed = errors.New(i18n.GetText(\"webscan_err_poc_load_failed\"))\n)\n\n//go:embed pocs\nvar pocsFS embed.FS\n\n// pocStore 按 PocPath 缓存已加载的 POC 集合，支持多 session 使用不同 POC 路径\ntype pocStore struct {\n\tmu    sync.Mutex\n\tcache map[string][]*lib.Poc // key: pocPath（空字符串表示内嵌 POC）\n}\n\nvar globalPocStore = &pocStore{cache: make(map[string][]*lib.Poc)}\n\n// WebScan 执行Web漏洞扫描\nfunc WebScan(ctx context.Context, info *common.HostInfo, cfg *common.Config, session *common.ScanSession) {\n\t// 初始化POC配置（用于CEL回调函数）\n\tlib.InitPOCConfig(cfg.DNSLog)\n","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/webscan/web_scan.go#L21-L57","documentation":"ErrPocLoadFailed (i18n key webscan_err_poc_load_failed): a POC template file failed to parse/load (bad YAML, invalid structure, or read error), so it could not be used for scanning. The detailed cause is wrapped by the loader.","triggerScenarios":"Thrown at webscan/web_scan.go:39 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Validate the POC YAML against the expected schema and fix syntax errors","Remove or quarantine the broken template so other POCs still load","Check file permissions/path if reading embedded POCs failed"],"exampleFix":null,"handlingStrategy":"fallback","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-14T00:17:10.932Z"}