{"record":{"id":"85cf97304d323862","repo":"shadow1ng/fscan","slug":"service-no-credentials-85cf97","errorCode":null,"errorMessage":"service_no_credentials","messagePattern":"service_no_credentials","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/services/oracle.go","lineNumber":45,"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, session); result != nil && result.Success {\n\t\tsession.LogSuccess(i18n.Tr(\"oracle_service\", target, result.Banner))\n\t\treturn result\n\t}\n\n\tcredentials := GenerateCredentials(\"oracle\", config)\n\tif len(credentials) == 0 {\n\t\treturn &ScanResult{\n\t\t\tSuccess: false,\n\t\t\tService: \"oracle\",\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, \"oracle\", testConfig)\n\n\tif result.Success {\n\t\tsession.LogVuln(i18n.Tr(\"oracle_credential\", target, result.Username, result.Password))\n\t}\n\n\treturn result\n}\n\n// createAuthFunc 创建Oracle认证函数\nfunc (p *OraclePlugin) createAuthFunc(info *common.HostInfo, config *common.Config, state *common.State) AuthFunc {","sourceCodeStart":27,"sourceCodeEnd":63,"githubUrl":"https://github.com/shadow1ng/fscan/blob/95cc12e753bf43de7004e5aef42a9ffba3934303/plugins/services/oracle.go#L27-L63","documentation":"Oracle service Scan first calls GenerateCredentials(\"oracle\", config); if it yields an empty list there is nothing to test, so Scan aborts with the localized service_no_credentials error instead of launching a pointless concurrent credential test. It signals a configuration problem, not a network or auth failure.","triggerScenarios":"Calling Scan with a config from which no oracle username/password pairs can be derived — e.g. no username list, no password list, and no default credential set enabled for the oracle service.","commonSituations":"Config file omits oracle credential sections; CLI flags for usernames/passwords not passed; credential generation disabled globally; typo in config keys so the generator finds no entries.","solutions":["Provide oracle usernames and passwords in the config (or enable default credential lists)","Check the i18n message key 'service_no_credentials' text for the exact hint your build gives","Validate the config with a dry-run of GenerateCredentials(\"oracle\", config) before scanning","If scanning is intended to be credential-free, use the unauthorized-access test (testUnauthorizedAccess) path instead"],"exampleFix":"// before\nScan(config) // config has no oracle credentials\n// after\nconfig.Services[\"oracle\"].Usernames = []string{\"system\", \"scott\"}\nconfig.Services[\"oracle\"].Passwords = []string{\"oracle\", \"manager\"}\nScan(config)","handlingStrategy":"validation","validationCode":"creds := GenerateCredentials(\"oracle\", config)\nif len(creds) == 0 {\n    return errors.New(\"no oracle credentials configured; add usernames/passwords to config\")\n}","typeGuard":null,"tryCatchPattern":"result, err := plugin.Scan(ctx, info, config, state)\nif err != nil && strings.Contains(err.Error(), \"service_no_credentials\") {\n    // fix config, then retry once\n    config.Services[\"oracle\"].Usernames = defaultOracleUsers\n    config.Services[\"oracle\"].Passwords = defaultOraclePasswords\n    result, err = plugin.Scan(ctx, info, config, state)\n}","preventionTips":["Validate the service config (credential lists present) before launching scans","Use config schema validation to catch missing username/password keys at load time","Keep default credential lists enabled for services meant to be brute-forced"],"tags":["oracle","credentials","configuration"],"backgroundTag":"missing-credentials","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"}