{"record":{"id":"8bc938928ce37df9","repo":"projectdiscovery/nuclei","slug":"imported-file-content-count-does-not-match-importe","errorCode":null,"errorMessage":"imported-file content count does not match imported-file path count","messagePattern":"imported-file content count does not match imported-file path count","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/templates/signer/tmpl_signer.go","lineNumber":215,"sourceCode":"\n\tcontent = normalizeTemplateContentForSignature(content)\n\n\tbuff, err := templateContentWithImports(content, tmpl)\n\tif err != nil {\n\t\treturn false, err\n\t}\n\n\treturn t.verify(buff.Bytes(), digest)\n}\n\nfunc templateContentWithImports(content []byte, tmpl SignableTemplate) (*bytes.Buffer, error) {\n\tbuff := bytes.NewBuffer(content)\n\timports := tmpl.GetFileImports()\n\n\tif provider, ok := tmpl.(fileImportContentProvider); ok {\n\t\tif importedContents, captured := provider.GetFileImportContents(); captured {\n\t\t\tif len(importedContents) != len(imports) {\n\t\t\t\treturn nil, fmt.Errorf(\"imported-file content count does not match imported-file path count\")\n\t\t\t}\n\n\t\t\tfor _, importedContent := range importedContents {\n\t\t\t\tbuff.WriteRune('\\n')\n\t\t\t\tbuff.Write(importedContent)\n\t\t\t}\n\n\t\t\treturn buff, nil\n\t\t}\n\t}\n\n\tfor _, file := range imports {\n\t\tbin, err := os.ReadFile(file)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\n\t\tbuff.WriteRune('\\n')","sourceCodeStart":197,"sourceCodeEnd":233,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/templates/signer/tmpl_signer.go#L197-L233","documentation":"Error \"imported-file content count does not match imported-file path count\" thrown in projectdiscovery/nuclei.","triggerScenarios":"Thrown at pkg/templates/signer/tmpl_signer.go:215 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}