{"id":37807059,"url":"https://github.com/paemuri/brdoc","last_synced_at":"2026-01-16T15:31:03.401Z","repository":{"id":37532248,"uuid":"72237794","full_name":"paemuri/brdoc","owner":"paemuri","description":"Brazilian docs validator for Go - CPF, CNPJ, CEP, RENAVAM, CNH and license plate!","archived":false,"fork":false,"pushed_at":"2025-06-15T03:13:58.000Z","size":117,"stargazers_count":139,"open_issues_count":6,"forks_count":30,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-06-15T03:34:04.822Z","etag":null,"topics":["brazil","cep","cnh","cnpj","cns","cpf","go","golang","license-plate","renavam","validation"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paemuri.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-10-28T19:55:51.000Z","updated_at":"2025-06-15T03:14:02.000Z","dependencies_parsed_at":"2022-08-19T04:50:49.625Z","dependency_job_id":"87183ae6-9d09-484e-9c22-5a2a22f78a2d","html_url":"https://github.com/paemuri/brdoc","commit_stats":{"total_commits":121,"total_committers":16,"mean_commits":7.5625,"dds":0.7851239669421488,"last_synced_commit":"005e8d5b0978261369943fb9aa6adc18f0017fee"},"previous_names":["nhanderu/brdoc"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/paemuri/brdoc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paemuri%2Fbrdoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paemuri%2Fbrdoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paemuri%2Fbrdoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paemuri%2Fbrdoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paemuri","download_url":"https://codeload.github.com/paemuri/brdoc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paemuri%2Fbrdoc/sbom","scorecard":{"id":683777,"data":{"date":"2025-08-11","repo":{"name":"github.com/paemuri/brdoc","commit":"fa4eb352b34eed11336ceb22781c0b9f5cc85564"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.5,"checks":[{"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":10,"reason":"21 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"Code-Review","score":1,"reason":"Found 4/29 approved changesets -- score normalized to 1","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":"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":"Pinned-Dependencies","score":1,"reason":"dependency not pinned by hash detected -- score normalized to 1","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/paemuri/brdoc/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/paemuri/brdoc/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:8: update your workflow using https://app.stepsecurity.io/secureworkflow/paemuri/brdoc/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/paemuri/brdoc/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/paemuri/brdoc/ci.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yaml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/paemuri/brdoc/ci.yaml/main?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 goCommand 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":["Warn: no topLevel permission defined: .github/workflows/ci.yaml: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":"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":"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":"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:0","Info: FSF or OSI recognized license: The Unlicense: 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 '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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 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"}},{"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-22T00:02:10.975Z","repository_id":37532248,"created_at":"2025-08-22T00:02:10.975Z","updated_at":"2025-08-22T00:02:10.975Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"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":["brazil","cep","cnh","cnpj","cns","cpf","go","golang","license-plate","renavam","validation"],"created_at":"2026-01-16T15:31:02.333Z","updated_at":"2026-01-16T15:31:03.162Z","avatar_url":"https://github.com/paemuri.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BR Doc\n\n[![License][badge-1-img]][badge-1-link]\n[![go.dev][badge-2-img]][badge-2-link]\n[![Go Report Card][badge-3-img]][badge-3-link]\n\nCPF, CNPJ, CEP, CNH, PIS/PASEP, RENAVAM, CNS, license plate and voter ID\nvalidator for Go!\n\nEverything in this file, but the [License](#license) section, is in portuguese.\n\n## Descrição\n\nBR Doc é um pacote para validação, tanto do formato quanto dos dígitos, de\ndocumentos brasileiros.\n\nAceito PRs de todas as formas. Está permitido escrever em português, também. :)\n\n## Uso\n\nPrincipais funções:\n\n- `func IsCPF(doc string) bool`\n- `func IsCNPJ(doc string) bool`\n- `func IsCEP(doc string) (valid bool, uf UF)`\n- `func IsCEPFrom(doc string, ufs ...UF) bool`\n- `func IsCNH(doc string) bool`\n- `func IsPIS(doc string) bool`\n- `func IsRENAVAM(doc string) bool`\n- `func IsPlate(doc string) bool`\n- `func IsNationalPlate(doc string) bool`\n- `func IsMercosulPlate(doc string) bool`\n- `func IsCNS(doc string) bool`\n- `func IsRG(doc string, uf UF) (valid bool, err error)`\n- `func IsVoterID(doc string) bool`\n- `func IsPhone(phone string) (valid bool, uf UF)`\n- `func IsPhoneFrom(phone string, ufs ...UF) bool`\n\n## Coisas a fazer\n\n- [x] validação de CPF\n- [x] validação de CNPJ\n- [x] validação de CEP\n- [x] validação de CNH\n- [x] validação de RENAVAM\n- [x] validação de placa veicular\n- [x] validação de CNS\n- [x] validação de título de eleitor\n- [x] validação de telefone\n- [ ] validação de RG\n  - [x] SP\n  - [x] RJ\n  - [ ] demais estados\n\n## License\n\nThis project code is in the public domain. See the [LICENSE file][1].\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you shall be in the public domain, without any\nadditional terms or conditions.\n\n[1]: ./LICENSE\n\n[badge-1-img]: https://img.shields.io/github/license/paemuri/brdoc?style=flat-square\n[badge-1-link]: https://github.com/paemuri/brdoc/blob/master/LICENSE\n[badge-2-img]: https://img.shields.io/badge/go.dev-reference-007d9c?style=flat-square\u0026logo=go\u0026logoColor=white\n[badge-2-link]: https://pkg.go.dev/github.com/paemuri/brdoc\n[badge-3-img]: https://goreportcard.com/badge/github.com/paemuri/brdoc?style=flat-square\n[badge-3-link]: https://goreportcard.com/report/github.com/paemuri/brdoc\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaemuri%2Fbrdoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaemuri%2Fbrdoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaemuri%2Fbrdoc/lists"}