{"id":13582009,"url":"https://github.com/projectdiscovery/retryabledns","last_synced_at":"2026-04-01T22:34:31.601Z","repository":{"id":37884727,"uuid":"252586771","full_name":"projectdiscovery/retryabledns","owner":"projectdiscovery","description":"Retryable DNS client in Go","archived":false,"fork":false,"pushed_at":"2026-03-21T16:07:32.000Z","size":375,"stargazers_count":134,"open_issues_count":2,"forks_count":32,"subscribers_count":11,"default_branch":"main","last_synced_at":"2026-03-21T17:16:30.733Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/projectdiscovery.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-04-02T23:26:19.000Z","updated_at":"2026-03-21T16:07:34.000Z","dependencies_parsed_at":"2023-02-16T08:15:18.367Z","dependency_job_id":"2d4ddbe3-6997-456e-9798-b457edeea728","html_url":"https://github.com/projectdiscovery/retryabledns","commit_stats":null,"previous_names":[],"tags_count":116,"template":false,"template_full_name":null,"purl":"pkg:github/projectdiscovery/retryabledns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectdiscovery%2Fretryabledns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectdiscovery%2Fretryabledns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectdiscovery%2Fretryabledns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectdiscovery%2Fretryabledns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/projectdiscovery","download_url":"https://codeload.github.com/projectdiscovery/retryabledns/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectdiscovery%2Fretryabledns/sbom","scorecard":{"id":746583,"data":{"date":"2025-08-11","repo":{"name":"github.com/projectdiscovery/retryabledns","commit":"e8d07bf706ffd21b87980521b157acc3296bea88"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.7,"checks":[{"name":"Code-Review","score":6,"reason":"Found 2/3 approved changesets -- score normalized to 6","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":5,"reason":"6 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/autorelease-tag.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/projectdiscovery/retryabledns/autorelease-tag.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/autorelease-tag.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/projectdiscovery/retryabledns/autorelease-tag.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/autorelease-tag.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/projectdiscovery/retryabledns/autorelease-tag.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-test.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/projectdiscovery/retryabledns/build-test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-test.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/projectdiscovery/retryabledns/build-test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/projectdiscovery/retryabledns/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/projectdiscovery/retryabledns/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/projectdiscovery/retryabledns/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/projectdiscovery/retryabledns/codeql-analysis.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/dep-auto-merge.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/projectdiscovery/retryabledns/dep-auto-merge.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/dep-auto-merge.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/projectdiscovery/retryabledns/dep-auto-merge.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint-test.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/projectdiscovery/retryabledns/lint-test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint-test.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/projectdiscovery/retryabledns/lint-test.yml/main?enable=pin","Info:   0 out of  10 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:12","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:13","Warn: no topLevel permission defined: .github/workflows/autorelease-tag.yml:1","Warn: no topLevel permission defined: .github/workflows/build-test.yml:1","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/lint-test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/projectdiscovery/.github/SECURITY.md:1","Info: Found linked content: github.com/projectdiscovery/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/projectdiscovery/.github/SECURITY.md:1","Info: Found text in security policy: github.com/projectdiscovery/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":10,"reason":"SAST tool is run on all commits","details":["Info: SAST configuration detected: CodeQL","Info: all commits (30) are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T18:57:03.884Z","repository_id":37884727,"created_at":"2025-08-22T18:57:03.885Z","updated_at":"2025-08-22T18:57:03.885Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31292653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T15:02:22.891Z","updated_at":"2026-04-01T22:34:31.575Z","avatar_url":"https://github.com/projectdiscovery.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Retryable dns resolver\n\nBased on `miekg/dns` and freely inspired by `bogdanovich/dns_resolver`.\n\n## Features\n\n- Supports both system default DNS resolvers and user-provided ones\n- Retries DNS requests in case of I/O errors, timeouts, or network failures\n- Allows arbitrary query types\n- Resolution with random resolvers\n- Compatible with various DNS resolver protocols (TCP, UDP, DoH, and DoT)\n\n### Using *go get*\n\n```console\n$ go get github.com/projectdiscovery/retryabledns\n```\n\nAfter this command *retryabledns* library source will be in your $GOPATH\n\n## `/etc/hosts` file processing\n\nBy default, the library processes the `/etc/hosts` file up to a maximum amount of lines for efficiency (4096). If your setup has a larger hosts file and you want to process more lines, you can easily configure this limit by adjusting the `hostsfile.MaxLines` variable.\n\nFor example:\n\n``` go\nhostsfile.MaxLines = 10000  // Now the library will process up to 10000 lines from the hosts file\n```\n\n## Example\n\nUsage Example:\n\n``` go\npackage main\n\nimport (\n    \"log\"\n\n    \"github.com/projectdiscovery/retryabledns\"\n    \"github.com/miekg/dns\"\n)\n\nfunc main() {\n    // It requires a list of resolvers.\n    // Valid protocols are \"udp\", \"tcp\", \"doh\", \"dot\". Default are \"udp\".\n    resolvers := []string{\"8.8.8.8:53\", \"8.8.4.4:53\", \"tcp:1.1.1.1\"}\n    retries := 2\n    hostname := \"hackerone.com\"\n\n    dnsClient, err := retryabledns.New(resolvers, retries)\n    if err != nil {\n        log.Fatal(err)\n    }\n\n    ips, err := dnsClient.Resolve(hostname)\n    if err != nil {\n        log.Fatal(err)\n    }\n\n    log.Println(ips)\n\n    // Query Types: dns.TypeA, dns.TypeNS, dns.TypeCNAME, dns.TypeSOA, dns.TypePTR, dns.TypeMX, dns.TypeANY\n    // dns.TypeTXT, dns.TypeAAAA, dns.TypeSRV (from github.com/miekg/dns)\n    // retryabledns.ErrRetriesExceeded will be returned if a result isn't returned in max retries\n    dnsResponses, err := dnsClient.Query(hostname, dns.TypeA)\n    if err != nil {\n        log.Fatal(err)\n    }\n\n    log.Println(dnsResponses)\n}\n```\n\nCredits:\n\n- `https://github.com/lixiangzhong/dnsutil`\n- `https://github.com/rs/dnstrace`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectdiscovery%2Fretryabledns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprojectdiscovery%2Fretryabledns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectdiscovery%2Fretryabledns/lists"}