{"record":{"id":"9698e9b5de39be6e","repo":"shadow1ng/fscan","slug":"service-not-identified-9698e9","errorCode":null,"errorMessage":"service_not_identified","messagePattern":"service_not_identified","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/services/postgresql.go","lineNumber":263,"sourceCode":"\t\tstate.IncrementTCPSuccessPacketCount()\n\t}\n\n\tvar banner string\n\tif err != nil {\n\t\terrMsg := strings.ToLower(err.Error())\n\t\tif strings.Contains(errMsg, \"postgres\") ||\n\t\t\tstrings.Contains(errMsg, \"authentication\") ||\n\t\t\tstrings.Contains(errMsg, \"database\") ||\n\t\t\tstrings.Contains(errMsg, \"password\") ||\n\t\t\tstrings.Contains(errMsg, \"role\") ||\n\t\t\tstrings.Contains(errMsg, \"user\") ||\n\t\t\tstrings.Contains(errMsg, \"pq:\") {\n\t\t\tbanner = \"PostgreSQL\"\n\t\t} else {\n\t\t\treturn &ScanResult{\n\t\t\t\tSuccess: false,\n\t\t\t\tService: \"postgresql\",\n\t\t\t\tError:   fmt.Errorf(\"%s\", i18n.Tr(\"service_not_identified\", \"PostgreSQL\")),\n\t\t\t}\n\t\t}\n\t} else {\n\t\tbanner = \"PostgreSQL\"\n\t}\n\n\tsession.LogSuccess(i18n.Tr(\"postgresql_service\", target, banner))\n\n\treturn &ScanResult{\n\t\tType:    plugins.ResultTypeService,\n\t\tSuccess: true,\n\t\tService: \"postgresql\",\n\t\tBanner:  banner,\n\t}\n}\n\nfunc init() {\n\tRegisterPluginWithPorts(\"postgresql\", func() Plugin {","sourceCodeStart":245,"sourceCodeEnd":281,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/plugins/services/postgresql.go#L245-L281","documentation":"Guard in PostgreSQL identifyService: the error text from the connection/login probe contained none of the PostgreSQL keywords (postgres, authentication, password, role, user, pq:), so the port cannot be confirmed as PostgreSQL and identification fails with this shared sentinel.","triggerScenarios":"Thrown at plugins/services/postgresql.go:263 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm the port actually runs PostgreSQL","Expand the keyword list used for banner matching","Inspect the raw error message to see what service answered"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"95cc12e753bf43de7004e5aef42a9ffba3934303","analyzedAt":"2026-09-06T17:07:30.094Z","contentChangedAt":"2026-09-06T17:07:30.094Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}