{"record":{"id":"e8366cbfe1c26a95","repo":"kgretzky/evilginx2","slug":"credentials-missing-password-search-field","errorCode":null,"errorMessage":"credentials: missing password `search` field","messagePattern":"credentials: missing password `search` field","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/phishlet.go","lineNumber":601,"sourceCode":"\tfor _, au := range fp.AuthUrls {\n\t\tre, err := regexp.Compile(p.paramVal(au))\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tp.authUrls = append(p.authUrls, re)\n\t}\n\n\tif fp.Credentials.Username.Key == nil {\n\t\treturn fmt.Errorf(\"credentials: missing username `key` field\")\n\t}\n\tif fp.Credentials.Username.Search == nil {\n\t\treturn fmt.Errorf(\"credentials: missing username `search` field\")\n\t}\n\tif fp.Credentials.Password.Key == nil {\n\t\treturn fmt.Errorf(\"credentials: missing password `key` field\")\n\t}\n\tif fp.Credentials.Password.Search == nil {\n\t\treturn fmt.Errorf(\"credentials: missing password `search` field\")\n\t}\n\n\tp.username.key, err = regexp.Compile(p.paramVal(*fp.Credentials.Username.Key))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"credentials: %v\", err)\n\t}\n\n\tp.username.search, err = regexp.Compile(p.paramVal(*fp.Credentials.Username.Search))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"credentials: %v\", err)\n\t}\n\n\tp.password.key, err = regexp.Compile(p.paramVal(*fp.Credentials.Password.Key))\n\tif err != nil {\n\t\treturn fmt.Errorf(\"credentials: %v\", err)\n\t}\n\n\tp.password.search, err = regexp.Compile(p.paramVal(*fp.Credentials.Password.Search))","sourceCodeStart":583,"sourceCodeEnd":619,"githubUrl":"https://github.com/kgretzky/evilginx2/blob/4c0988a1d9db4d172a185e979a38bfd0efdb5830/core/phishlet.go#L583-L619","documentation":"Thrown when the phishlet's credentials.password block is missing the 'search' field. 'search' is the regex extracting the password value from the POST body; without it captured passwords cannot be parsed, so the phishlet is rejected.","triggerScenarios":"A phishlet YAML defines credentials.password.key but omits 'search', or 'search' is misplaced by indentation.","commonSituations":"Writing password block with key only; copy-paste losing the search line; editing that accidentally removed it.","solutions":["Add 'search: <capture regex>' under credentials.password","Ensure key and search are siblings within credentials.password","Re-validate the phishlet after the edit"],"exampleFix":"// before\ncredentials:\n  password:\n    key: 'password'\n// after\ncredentials:\n  password:\n    key: 'password'\n    search: 'password=([^&]*)'","handlingStrategy":"validation","validationCode":"if cfg.Credentials.Password.Search == nil || *cfg.Credentials.Password.Search == \"\" {\n  return errors.New(\"credentials: missing password search\")\n}","typeGuard":"func hasPasswordSearch(fp FakePost) bool { return fp.Credentials.Password.Search != nil && *fp.Credentials.Password.Search != \"\" }","tryCatchPattern":null,"preventionTips":["Pair password key with a capturing search regex","Verify the regex against a sample POST body","Validate phishlets before deployment"],"tags":["phishlet","config","credentials","validation"],"backgroundTag":"phishlet-schema-validation","analyzedSha":"4c0988a1d9db4d172a185e979a38bfd0efdb5830","analyzedAt":"2026-09-05T19:23:07.238Z","contentChangedAt":"2026-09-05T19:23:07.238Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}