projectdiscovery/nuclei · error
couldn't iterate on nested item "%s": %s
Error message
couldn't iterate on nested item "%s": %s
What it means
Error "couldn't iterate on nested item "%s": %s" thrown in projectdiscovery/nuclei.
Source
Thrown at pkg/reporting/trackers/jira/jira.go:290
severityLabel := fmt.Sprintf("Severity:%s", event.Info.SeverityHolder.Severity.String())
if i.options.SeverityAsLabel && severityLabel != "" {
labels = append(labels, severityLabel)
}
if label := i.options.IssueType; label != "" {
labels = append(labels, label)
}
// Build template context for evaluating custom field templates
templateCtx := buildTemplateContext(event)
// Process custom fields with template evaluation support
customFields := tcontainer.NewMarshalMap()
for name, value := range i.options.CustomFields {
if valueMap, ok := value.(map[interface{}]interface{}); ok {
// Iterate over nested map
for nestedName, nestedValue := range valueMap {
fmtNestedValue, ok := nestedValue.(string)
if !ok {
return nil, fmt.Errorf(`couldn't iterate on nested item "%s": %s`, nestedName, nestedValue)
}
// Evaluate template or handle legacy $variable syntax
evaluatedValue, err := i.evaluateCustomFieldValue(fmtNestedValue, templateCtx, event)
if err != nil {
gologger.Warning().Msgf("Failed to evaluate template for field %s.%s: %v", name, nestedName, err)
evaluatedValue = fmtNestedValue // fallback to original value
}
switch nestedName {
case "id":
customFields[name] = map[string]interface{}{"id": evaluatedValue}
case "name":
customFields[name] = map[string]interface{}{"value": evaluatedValue}
case "freeform":
customFields[name] = evaluatedValue
}
}View on GitHub (pinned to 265b3a3dec)
When it happens
Trigger: Thrown at pkg/reporting/trackers/jira/jira.go:290 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of projectdiscovery/nuclei@265b3a3dec (2026-08-15).
Data as JSON: /api/errors/f13451fceba3dc29.
Report an issue: GitHub.