{"record":{"id":"a73274c8991d46c6","repo":"shadow1ng/fscan","slug":"webscan-poc-parse-failed","errorCode":"webscan_poc_parse_failed","errorMessage":"webscan_poc_parse_failed %s: %w","messagePattern":"webscan_poc_parse_failed (.+?): %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"webscan/lib/Client.go","lineNumber":421,"sourceCode":"func LoadMultiPoc(Pocs embed.FS, pocname string) []*Poc {\n\tvar pocs []*Poc\n\t// 遍历选中的POC文件\n\tfor _, f := range SelectPoc(Pocs, pocname) {\n\t\tif p, err := LoadPoc(f, Pocs); err == nil {\n\t\t\tpocs = append(pocs, p)\n\t\t} else {\n\t\t\tcommon.LogError(i18n.Tr(\"webscan_poc_load_one_failed\", f, err))\n\t\t}\n\t}\n\treturn pocs\n}\n\n// parsePocYAML 解析POC YAML内容（提取公共逻辑）\nfunc parsePocYAML(data []byte, fileName string) (*Poc, error) {\n\t// 使用通用适配器加载POC（自动识别格式）\n\tuniversalPoc, err := LoadUniversalPoc(fileName, data)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"%s %s: %w\", i18n.GetText(\"webscan_poc_parse_failed\"), fileName, err)\n\t}\n\n\t// 转换为fscan内部格式\n\tpoc, err := universalPoc.ToFscanPoc()\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"%s %s: %w\", i18n.GetText(\"webscan_poc_convert_failed\"), fileName, err)\n\t}\n\n\treturn poc, nil\n}\n\n// LoadPoc 从内嵌文件系统加载单个POC\nfunc LoadPoc(fileName string, Pocs embed.FS) (*Poc, error) {\n\t// 读取POC文件内容\n\tyamlFile, err := Pocs.ReadFile(\"pocs/\" + fileName)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"%s %s: %w\", i18n.GetText(\"webscan_poc_file_read_failed\"), fileName, err)\n\t}","sourceCodeStart":403,"sourceCodeEnd":439,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/webscan/lib/Client.go#L403-L439","documentation":"Guard in parsePocYAML: LoadUniversalPoc failed to parse the POC file's YAML content, so the named file is skipped (LoadMultiPoc logs it via webscan_poc_load_one_failed) and the error wraps the parse failure with the offending file name.","triggerScenarios":"Thrown at webscan/lib/Client.go:421 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix YAML syntax errors in the named POC file","Ensure the POC matches the supported format/schema","Regenerate or re-download a known-good POC file"],"exampleFix":null,"handlingStrategy":"try-catch","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"}