shadow1ng/fscan · error
webscan_nuclei_no_http_rules
webscan_nuclei_no_http_rules
Error message
webscan_nuclei_no_http_rules
What it means
ToFscanPoc converts a NucleiPoc into fscan-style rules by mapping each nuclei HTTP request definition to a Rule. If no HTTP request rules could be extracted (the nuclei template only contains non-HTTP protocols or nothing mappable), the conversion fails with webscan_nuclei_no_http_rules rather than returning an empty POC.
Source
Thrown at webscan/lib/poc_adapter.go:272
Headers: httpReq.Headers,
Body: httpReq.Body,
}
// 转换matchers为expression
if len(httpReq.Matchers) > 0 {
expr := convertNucleiMatchers(httpReq.Matchers, httpReq.MatchersCondition)
rule.Expression = expr
} else {
// 默认检查200状态码
rule.Expression = "response.status == 200"
}
poc.Rules = append(poc.Rules, rule)
}
}
if len(poc.Rules) == 0 {
return nil, fmt.Errorf("%s", i18n.GetText("webscan_nuclei_no_http_rules"))
}
return poc, nil
}
func normalizeNucleiPath(path string) string {
path = strings.TrimSpace(path)
path = strings.TrimPrefix(path, "{{BaseURL}}")
path = strings.TrimPrefix(path, "{{RootURL}}")
if path == "" {
return "/"
}
return path
}
// convertNucleiMatchers 转换Nuclei matchers为fscan expression
func convertNucleiMatchers(matchers []NucleiMatcher, matchersCondition string) string {
var conditions []stringView on GitHub (pinned to 95cc12e753)
Solutions
- Only convert nuclei templates that contain http: request blocks; filter templates by protocol first.
- Skip or log non-HTTP templates (dns/network/workflow) instead of converting them.
- If a template should be convertible, check its http block structure against the mapping code above the len(poc.Rules)==0 check.
- Write an equivalent fscan POC manually for non-HTTP targets.
Example fix
// before
for _, tpl := range templates {
fpoc, err := tpl.ToFscanPoc() // fails for dns/network templates
...
}
// after
for _, tpl := range templates {
if !tpl.HasHTTPRequests() { continue }
fpoc, err := tpl.ToFscanPoc()
...
} Defensive patterns
Strategy: validation
Validate before calling
func hasHTTPRules(np *NucleiPoc) bool {
for _, r := range np.Requests {
if strings.EqualFold(r.Type, "http") || r.Type == "" {
return true
}
}
return false
} Try / catch
fpoc, err := np.ToFscanPoc()
if err != nil {
if strings.Contains(err.Error(), "webscan_nuclei_no_http_rules") {
return nil // non-HTTP template, skip
}
return err
} Prevention
- Filter nuclei templates to http-protocol ones before conversion.
- Skip dns/network/workflow templates explicitly and log them.
- Prefer templates with concrete http request blocks over matcher-only templates.
When it happens
Trigger: Calling ToFscanPoc on a NucleiPoc whose Requests/Rules contain zero convertible HTTP entries — e.g., dns://, network://, or workflows-only templates — leaving poc.Rules empty after conversion.
Common situations: Converting nuclei template bundles wholesale; many community templates target DNS/TCP/network protocols that fscan rules can't represent; templates using only matchers without an http block.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- webscan_poc_convert_failed
- webscan_nuclei_format_parse_failed
- webscan_xray_no_rules
- %s (webscan_afrog_no_rules)
- webscan_poc_file_read_failed
AI-assisted analysis of shadow1ng/fscan@95cc12e753 (2026-09-06).
Data as JSON: /api/errors/ddab4cff43297818.
Report an issue: GitHub.