{"record":{"id":"ea7b9fa661f8d56a","repo":"kgretzky/evilginx2","slug":"intercept-missing-path-field","errorCode":null,"errorMessage":"intercept: missing `path` field","messagePattern":"intercept: missing `path` field","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/phishlet.go","lineNumber":500,"sourceCode":"\t\t\t}\n\t\t\terr := p.addJsInject(*js.TriggerDomains, *js.TriggerPaths, js.TriggerParams, p.paramVal(*js.Script))\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\tif fp.Intercept != nil {\n\t\tfor _, ic := range *fp.Intercept {\n\t\t\tvar err error\n\t\t\tvar body, mime string\n\t\t\tif ic.Domain == nil {\n\t\t\t\treturn fmt.Errorf(\"intercept: missing `domain` field\")\n\t\t\t}\n\t\t\tif *ic.Domain == \"\" {\n\t\t\t\treturn fmt.Errorf(\"intercept: `domain` field cannot be empty\")\n\t\t\t}\n\t\t\tif ic.Path == nil {\n\t\t\t\treturn fmt.Errorf(\"intercept: missing `path` field\")\n\t\t\t}\n\t\t\tpath_re, err := regexp.Compile(*ic.Path)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"intercept: `path` invalid regular expression: %v\", err)\n\t\t\t}\n\t\t\tif ic.HttpStatus == nil {\n\t\t\t\treturn fmt.Errorf(\"intercept: missing `http_status` field\")\n\t\t\t}\n\t\t\tif ic.Body != nil {\n\t\t\t\tbody = *ic.Body\n\t\t\t}\n\t\t\tif ic.Mime != nil {\n\t\t\t\tmime = *ic.Mime\n\t\t\t}\n\t\t\terr = p.addIntercept(*ic.Domain, path_re, *ic.HttpStatus, body, mime)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}","sourceCodeStart":482,"sourceCodeEnd":518,"githubUrl":"https://github.com/kgretzky/evilginx2/blob/4c0988a1d9db4d172a185e979a38bfd0efdb5830/core/phishlet.go#L482-L518","documentation":"This error is thrown when validating a phishlet's `intercept` block: the `domain` field passed the checks, but the required `path` field is missing entirely. Every intercept entry must specify a regular expression matching the request path it applies to. The parser rejects the phishlet at load time.","triggerScenarios":"An intercept block in the phishlet YAML defines `domain` but omits the `path` key entirely, e.g. `intercept:\\n  - domain: accounts` with no `path:` line.","commonSituations":"Incomplete phishlet copied from an example; manually removing the path line; a generator or older phishlet format that did not include path in intercept entries.","solutions":["Add a `path` field with a valid regular expression to the intercept block (e.g. `path: ^/login$`).","Check the phishlet against the current format documentation/example phishlets for required intercept fields.","Validate the YAML indentation so `path` is actually parsed as a child of the intercept entry, not a sibling."],"exampleFix":"// before (phishlet.yml)\nintercept:\n  - domain: accounts\n// after\nintercept:\n  - domain: accounts\n    path: ^/login$","handlingStrategy":"validation","validationCode":"for i, ic := range cfg.Intercept {\n    if ic.Path == nil {\n        return fmt.Errorf(\"intercept[%d]: missing `path` field\", i)\n    }\n}","typeGuard":"func hasPath(ic InterceptCfg) bool {\n    return ic.Path != nil && *ic.Path != \"\"\n}","tryCatchPattern":null,"preventionTips":["Use a complete example intercept block as a template and fill in values rather than writing from scratch.","Validate required keys (domain, path, http_status) with a YAML schema linter.","Keep intercept entries minimal but complete; never delete single fields from a working entry."],"tags":["phishlet","configuration","yaml-validation"],"backgroundTag":"missing-required-argument","analyzedSha":"4c0988a1d9db4d172a185e979a38bfd0efdb5830","analyzedAt":"2026-09-05T19:23:07.238Z","contentChangedAt":"2026-09-05T19:23:07.238Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}