{"id":15345357,"url":"https://github.com/fishy/badcerts","last_synced_at":"2025-09-08T09:40:10.173Z","repository":{"id":57514454,"uuid":"136701407","full_name":"fishy/badcerts","owner":"fishy","description":"Go library to deal with bad https certs","archived":false,"fork":false,"pushed_at":"2020-12-27T10:42:01.000Z","size":12,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-15T08:36:23.487Z","etag":null,"topics":["cert","certificate","go","golang","https"],"latest_commit_sha":null,"homepage":"https://godoc.org/github.com/fishy/badcerts","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fishy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-09T07:34:11.000Z","updated_at":"2024-05-09T20:00:33.000Z","dependencies_parsed_at":"2022-09-06T03:01:53.633Z","dependency_job_id":null,"html_url":"https://github.com/fishy/badcerts","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/fishy/badcerts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fishy%2Fbadcerts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fishy%2Fbadcerts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fishy%2Fbadcerts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fishy%2Fbadcerts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fishy","download_url":"https://codeload.github.com/fishy/badcerts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fishy%2Fbadcerts/sbom","scorecard":{"id":401425,"data":{"date":"2025-08-11","repo":{"name":"github.com/fishy/badcerts","commit":"41ecff2809fabd408297f6e1fbd8a65a2475059a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"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":"Code-Review","score":0,"reason":"Found 0/11 approved changesets -- score normalized to 0","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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"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":"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":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":"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"}}]},"last_synced_at":"2025-08-18T20:10:37.105Z","repository_id":57514454,"created_at":"2025-08-18T20:10:37.106Z","updated_at":"2025-08-18T20:10:37.106Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274166485,"owners_count":25233957,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cert","certificate","go","golang","https"],"created_at":"2024-10-01T11:13:06.403Z","updated_at":"2025-09-08T09:40:10.110Z","avatar_url":"https://github.com/fishy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![PkgGoDev](https://pkg.go.dev/badge/go.yhsif.com/badcerts)](https://pkg.go.dev/go.yhsif.com/badcerts)\n[![Go Report Card](https://goreportcard.com/badge/go.yhsif.com/badcerts)](https://goreportcard.com/report/go.yhsif.com/badcerts)\n\n# BadCerts\n\nBadCerts is a [Go](https://golang.org) library to deal with bad ssl cert(s)\n(e.g. self-signed certificates).\n\n**NOTE**: For self-signed certs, a better approach to deal with them is to use\n[`x509.CertPool`](https://pkg.go.dev/crypto/x509#CertPool),\nwhich is faster than using BadCerts library.\nAn example can be found\n[here](https://github.com/fishy/blynk-proxy/blob/741ab221c0624d8b522428f7ac0958584c6d2a1f/main.go#L59-L77)\n(Thanks to\n[/u/loosecanonsandvich](https://www.reddit.com/r/golang/comments/8prc19/a_go_library_to_deal_with_bad_https_certs/e0dmnzp/)).\nBadCerts library is still kinda useful to deal with other types of bad certs,\nlike expired certs or certs with wrong common names.\n\n## Example\n\n```go\n// This is the cert fingerprint from https://self-signed.badssl.com/\nmyCertFingerprint := \"9SLklscvzMYj8f+52lp5ze/hY0CFHyLSPQzSpYYIBm8=\"\n\nclient := \u0026http.Client{\n\tTransport: \u0026http.Transport{\n\t\tDialTLS: badcerts.DialTLSWithWhitelistCerts(\n\t\t\tbadcerts.IsSelfSignedError,\n\t\t\tmyCertFingerprint,\n\t\t),\n\t},\n}\n\n// Now client can handle https://self-signed.badssl.com/ just fine:\n\n_, err := client.Get(\"https://self-signed.badssl.com/\")\nif err != nil {\n\tpanic(err)\n}\nfmt.Println(\"Everything is awesome.\")\n\n// And it will still return error for other bad certificates.\n```\n\n## FAQs\n\n### But I could just disable certificate verification?\n\nYes you can,\nbut then you won't know if it's replaced by a different, malicious MITM cert.\nOr you could use the same http client with sites with legit certs and now you\nare losing protection.\n\nBadCerts library still have all the normal certificate verification protections,\nit just trust the whitelisted certificate(s) additionally, but nothing more.\n\n### How do I get the fingerprint for my self-signed cert?\n\nIt comes with a command line tool\n[badcerts-fingerprint](https://pkg.go.dev/go.yhsif.com/badcerts/cmd/badcerts-fingerprint).\n\n### Aren't those certs bad?\n\nYes they are.\nYou should use [Let's Encrypt](https://letsencrypt.org/) on your site.\nThis is more for the sites you cannot control and have to deal with.\n\n## Acknowledges\n\nThis library is inspired by [tam7t/hpkp](https://github.com/tam7t/hpkp)\n\n## License\n\n[BSD 3-Clause](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffishy%2Fbadcerts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffishy%2Fbadcerts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffishy%2Fbadcerts/lists"}