{"record":{"id":"d8a471aa1b924f28","repo":"shadow1ng/fscan","slug":"service-no-credentials-d8a471","errorCode":null,"errorMessage":"service_no_credentials","messagePattern":"service_no_credentials","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/services/postgresql.go","lineNumber":50,"sourceCode":"\tstate := session.State\n\ttarget := info.Target()\n\n\tif config.DisableBrute {\n\t\treturn p.identifyService(ctx, info, session)\n\t}\n\n\t// 先测试未授权访问\n\tif result := p.testUnauthorizedAccess(ctx, info, config, state); result != nil && result.Success {\n\t\tsession.LogVuln(i18n.Tr(\"postgresql_vuln\", target, result.VulInfo))\n\t\treturn result\n\t}\n\n\tcredentials := GenerateCredentials(\"postgresql\", config)\n\tif len(credentials) == 0 {\n\t\treturn &ScanResult{\n\t\t\tSuccess: false,\n\t\t\tService: \"postgresql\",\n\t\t\tError:   fmt.Errorf(\"%s\", i18n.GetText(\"service_no_credentials\")),\n\t\t}\n\t}\n\n\t// 使用公共框架进行并发凭据测试\n\tauthFn := p.createAuthFunc(info, config, state)\n\ttestConfig := DefaultConcurrentTestConfigWithTarget(config, info)\n\n\tresult := TestCredentialsConcurrently(ctx, credentials, authFn, \"postgresql\", testConfig)\n\n\tif result.Success {\n\t\tsession.LogVuln(i18n.Tr(\"postgresql_credential\", target, result.Username, result.Password))\n\t}\n\n\treturn result\n}\n\n// createAuthFunc 创建PostgreSQL认证函数\nfunc (p *PostgreSQLPlugin) createAuthFunc(info *common.HostInfo, config *common.Config, state *common.State) AuthFunc {","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/plugins/services/postgresql.go#L32-L68","documentation":"Guard in PostgreSQLPlugin.Scan: GenerateCredentials produced no postgresql credential pairs (empty username/password config for this service), so brute forcing is impossible and the scan aborts with this shared sentinel before testing any logins.","triggerScenarios":"Thrown at plugins/services/postgresql.go:50 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add postgres usernames/passwords to the scan configuration","Enable default credential sets for postgresql","Use --disable-brute to run identification only"],"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"}