{"record":{"id":"e1e15edfd2634552","repo":"projectdiscovery/nuclei","slug":"invalid-signature-type","errorCode":null,"errorMessage":"invalid signature type: ","messagePattern":"invalid signature type: ","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/protocols/http/signature.go","lineNumber":42,"sourceCode":"\tAWSSignature: \"AWS\",\n}\n\nfunc GetSupportedSignaturesTypes() []SignatureType {\n\tvar result []SignatureType\n\tfor index := SignatureType(1); index < signatureLimit; index++ {\n\t\tresult = append(result, index)\n\t}\n\treturn result\n}\n\nfunc toSignatureType(valueToMap string) (SignatureType, error) {\n\tnormalizedValue := normalizeValue(valueToMap)\n\tfor key, currentValue := range signatureTypeMappings {\n\t\tif normalizedValue == currentValue {\n\t\t\treturn key, nil\n\t\t}\n\t}\n\treturn -1, errors.New(\"invalid signature type: \" + valueToMap)\n}\n\nfunc (t SignatureType) String() string {\n\treturn signatureTypeMappings[t]\n}\n\n// SignatureTypeHolder is used to hold internal type of the signature\ntype SignatureTypeHolder struct {\n\tValue SignatureType\n}\n\nfunc (holder SignatureTypeHolder) JSONSchema() *jsonschema.Schema {\n\tgotType := &jsonschema.Schema{\n\t\tType:        \"string\",\n\t\tTitle:       \"type of the signature\",\n\t\tDescription: \"Type of the signature\",\n\t}\n\tfor _, types := range GetSupportedSignaturesTypes() {","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/protocols/http/signature.go#L24-L60","documentation":"The `signature:` field on an HTTP request is mapped by toSignatureType (trim + case-normalize) against the signatureTypeMappings table. Currently the only supported value is \"AWS\" (AWS Signature Version 4 signing via the signer package); any other string fails template compilation with this error.","triggerScenarios":"Setting `signature:` to an unsupported scheme such as `signature: HMAC`, `signature: BASIC`, or a near-miss like `signature: AWS4` / `signature: SigV4`. Only `signature: AWS` (any casing) is accepted.","commonSituations":"Assuming multiple auth-signing schemes exist; copying doc examples for other tools; guessing the identifier for SigV4.","solutions":["Use `signature: AWS` for AWS Signature V4 signing, or remove the signature field entirely","For other auth schemes use the dedicated auth fields (bearer-token, basic auth) or headers","Validate the template with nuclei -validate"],"exampleFix":"# before\nhttp:\n  - raw:\n      - |\n        GET / HTTP/1.1\n    signature: AWS4\n\n# after\nhttp:\n  - raw:\n      - |\n        GET / HTTP/1.1\n    signature: AWS","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"func isValidSignatureType(v string) bool {\n    return strings.ToUpper(strings.TrimSpace(v)) == \"AWS\" // only supported value today\n}","tryCatchPattern":null,"preventionTips":["Use `signature: AWS` only — it is currently the single supported scheme (SigV4)","Consult GetSupportedSignaturesTypes() when enumerating allowed values programmatically","For other auth schemes, use bearer/basic auth fields or raw headers instead of signature:"],"tags":["http","signature","enum","template","aws"],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}