shadow1ng/fscan · error

webscan_err_poc_load_failed

Error message

webscan_err_poc_load_failed

What it means

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.

Source

Thrown at webscan/web_scan.go:39

	"github.com/shadow1ng/fscan/webscan/lib"
)

// 常量定义
const (
	protocolHTTP     = "http://"
	protocolHTTPS    = "https://"
	yamlExt          = ".yaml"
	ymlExt           = ".yml"
	defaultTimeout   = 30 * time.Second
	concurrencyLimit = 10 // 并发加载POC的限制
)

// 错误定义
var (
	ErrInvalidURL    = errors.New(i18n.GetText("webscan_err_invalid_url"))
	ErrEmptyTarget   = errors.New(i18n.GetText("webscan_err_empty_target"))
	ErrPocNotFound   = errors.New(i18n.GetText("webscan_err_poc_not_found"))
	ErrPocLoadFailed = errors.New(i18n.GetText("webscan_err_poc_load_failed"))
)

//go:embed pocs
var pocsFS embed.FS

// pocStore 按 PocPath 缓存已加载的 POC 集合,支持多 session 使用不同 POC 路径
type pocStore struct {
	mu    sync.Mutex
	cache map[string][]*lib.Poc // key: pocPath(空字符串表示内嵌 POC)
}

var globalPocStore = &pocStore{cache: make(map[string][]*lib.Poc)}

// WebScan 执行Web漏洞扫描
func WebScan(ctx context.Context, info *common.HostInfo, cfg *common.Config, session *common.ScanSession) {
	// 初始化POC配置(用于CEL回调函数)
	lib.InitPOCConfig(cfg.DNSLog)

View on GitHub (pinned to 95cc12e753)

Solutions

  1. Validate the POC YAML against the expected schema and fix syntax errors
  2. Remove or quarantine the broken template so other POCs still load
  3. Check file permissions/path if reading embedded POCs failed
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at webscan/web_scan.go:39 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of shadow1ng/fscan@95cc12e753 (2026-09-06). Data as JSON: /api/errors/8902a16198cd8071. Report an issue: GitHub.