{"id":15792888,"url":"https://github.com/gchan/password_blocklist","last_synced_at":"2025-11-11T18:38:26.353Z","repository":{"id":16138389,"uuid":"79438569","full_name":"gchan/password_blocklist","owner":"gchan","description":"Ruby gem to check a password against a blocklist of commonly used passwords","archived":false,"fork":false,"pushed_at":"2023-06-01T04:58:08.000Z","size":7225,"stargazers_count":15,"open_issues_count":3,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-11-04T10:11:53.694Z","etag":null,"topics":["password-blocklist","pasword","ruby","ruby-gem","ruby-on-rails","rubygem","security"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/gchan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-01-19T09:44:41.000Z","updated_at":"2025-07-16T23:24:38.000Z","dependencies_parsed_at":"2023-07-14T19:14:22.624Z","dependency_job_id":null,"html_url":"https://github.com/gchan/password_blocklist","commit_stats":{"total_commits":51,"total_committers":4,"mean_commits":12.75,"dds":0.0980392156862745,"last_synced_commit":"e0ae45e389036dbb7efd3c30b1cf7c52611220ce"},"previous_names":["gchan/password_blacklist"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/gchan/password_blocklist","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gchan%2Fpassword_blocklist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gchan%2Fpassword_blocklist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gchan%2Fpassword_blocklist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gchan%2Fpassword_blocklist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gchan","download_url":"https://codeload.github.com/gchan/password_blocklist/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gchan%2Fpassword_blocklist/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":283910127,"owners_count":26915128,"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-11-11T02:00:06.610Z","response_time":65,"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":["password-blocklist","pasword","ruby","ruby-gem","ruby-on-rails","rubygem","security"],"created_at":"2024-10-04T23:06:37.372Z","updated_at":"2025-11-11T18:38:26.334Z","avatar_url":"https://github.com/gchan.png","language":"Ruby","readme":"# password_blocklist\n[![Gem Version](https://badge.fury.io/rb/password_blocklist.svg)](http://badge.fury.io/rb/password_blocklist) ![License](https://img.shields.io/badge/license-MIT-blue.svg)\n\n[![Ruby Tests on Github Actions](https://github.com/gchan/password_blocklist/actions/workflows/ruby.yml/badge.svg)](https://github.com/gchan/password_blocklist/actions/workflows/ruby.yml) [![Coverage Status](https://coveralls.io/repos/github/gchan/password_blocklist/badge.svg?branch=main)](https://coveralls.io/github/gchan/password_blocklist?branch=main) [![Code Climate](https://codeclimate.com/github/gchan/password_blocklist/badges/gpa.svg)](https://codeclimate.com/github/gchan/password_blocklist)\n\nCheck the presence of a string in a blocklist of the most commonly used passwords (sourced from berzerk0\n's [Probable-Wordlists](https://github.com/berzerk0/Probable-Wordlists)). Different sized lists are\nsupported, with the default list containing 95,000 passwords.\n\nThis very simple Ruby library can be integrated into your registration/authentication system to prevent users from setting commonly used (and easy to guess) passwords.\n\nThis gem has a tiny memory footprint with an execution cost of approximately 1 ms for the default list size. A memory persistence option is available to further reduce execution time.\n\n## Installation\n\nGemfile:\n\n```ruby\ngem 'password_blocklist'\n```\n\nOr install it yourself:\n\n    $ gem install password_blocklist\n\n## Usage\n\n```ruby\n$ irb\nrequire 'password_blocklist'\n\nPasswordBlocklist.blocklisted?(\"pokemon\")\n=\u003e true\n\nPasswordBlocklist.blocklisted?(\"AccurateUnicornCoalPaperclip\")\n=\u003e false\n```\n### Optional list size selection\n\nPass a `list_size` parameter to select a different list than the default (medium) size\n\n```ruby\nPasswordBlocklist.blocklisted?('pokemon', :lg)\n```\n\n| list_size    | File name                        | File size | Passwords\n| ----         | ----                             | ----      | ----\n| xs           | `Top1575-probable-v2.txt`        | 12 KB     | 1,575\n| sm           | `Top12Thousand-probable-v2.txt`  | 100 KB    | 12,645\n| md (default) | `Top95Thousand-probable.txt`     | 822 KB    | 94,988\n| lg           | `Top304Thousand-probable-v2.txt` | 2.8 MB    | 303,872\n| xl           | `Top1pt6Million-probable-v2.txt` | 15.9 MB   | 1,667,462\n\nNote the list size you select will use more memory and linearly affect\nthe processing time.\n\n### Test multiple passwords\n\nThe blocklist file is loaded on every call to `PasswordBlocklist.blocklisted?`. Use `PasswordBlocklist::Checker` to persist the blocklist in memory (approximately 0.8MB) if you would like to perform lots of password tests in quick succession.\n\n```ruby\nrequire 'password_blocklist'\n\nchecker = PasswordBlocklist::Checker.new\n=\u003e #\u003cPasswordBlocklist::Checker:0x3ff979c41758\u003e\n\nchecker.blocklisted?(\"pokemon\")\n=\u003e true\n\nchecker.blocklisted?(\"AccurateUnicornCoalPaperclip\")\n=\u003e false\n```\n\nYou can also use a list size other than the default 'md' list\n\n```ruby\nchecker = PasswordBlocklist::Checker.new(:xl)\n=\u003e #\u003cPasswordBlocklist::Checker:0x3ff979c41758\u003e\n\nchecker.blocklisted?(\"pokemon\")\n=\u003e true\n```\n\n## Supported Ruby versions\n\npassword_blocklist supports MRI Ruby 2.5+ and Ruby 3.x. The specific Ruby versions we build and test on can be found on this Github Action [workflow file](https://github.com/gchan/password_blocklist/blob/main/.github/workflows/ruby.yml).\n\n## Migrating to v0.5.0\n\nThis library was renamed to password_blocklist in v0.5.0\n\nTo easily migrate across:\n\n1. Update your Gemfile to use `password_blocklist` and run `bundle`\n2. Rename all instances of original Module\n  ```bash\n  sed -i s/PasswordBlacklist/PasswordBlocklist/g ./**/*.rb\n  ```\n3. Rename all method calls\n  ```bash\n  sed -i s/blacklisted?/blocklisted?/g ./**/*.rb\n  ```\n4. One last rename\n  ```bash\n  sed -i s/password_blacklist/password_blocklist/g ./**/*.rb\n  ```\n5. Verify the correct files have been updated and your code remains\nfunctional\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` or `rspec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. Use `bin/benchmark` to run some benchmarks.\n\nTo install this gem onto your local machine, run `bundle exec rake install`.\n\nTo release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\nRun `bundle exec rake spec` to manually launch specs.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://www.github.com/gchan/password_blocklist.\n\n1. Fork it ( https://github.com/gchan/password_blocklist/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Licenses\n\npassword_blocklist is Copyright (c) 2017 Gordon Chan and is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\nThe [Probable-Wordlists](https://github.com/berzerk0/Probable-Wordlists) data files are licensed under CC BY-SA 4.0 (Creative Commons Attribution-ShareAlike 4.0 International)\n\n[![Analytics](https://ga-beacon.appspot.com/UA-70790190-2/password_blocklist/README.md?flat)](https://github.com/igrigorik/ga-beacon)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgchan%2Fpassword_blocklist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgchan%2Fpassword_blocklist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgchan%2Fpassword_blocklist/lists"}