{"id":18234629,"url":"https://github.com/lionheart/django-pwnedpasswords-validator","last_synced_at":"2025-09-15T23:43:43.383Z","repository":{"id":57421429,"uuid":"122754723","full_name":"lionheart/django-pwnedpasswords-validator","owner":"lionheart","description":"Django password validator that checks for passwords in known data breaches.","archived":false,"fork":false,"pushed_at":"2019-02-06T13:58:36.000Z","size":132,"stargazers_count":15,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-10T06:14:44.779Z","etag":null,"topics":["django","django-passwords","library","password-validation","password-validator","passwords","python","python-library","security"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lionheart.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-02-24T15:55:11.000Z","updated_at":"2025-08-25T13:12:40.000Z","dependencies_parsed_at":"2022-09-10T13:21:02.329Z","dependency_job_id":null,"html_url":"https://github.com/lionheart/django-pwnedpasswords-validator","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/lionheart/django-pwnedpasswords-validator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lionheart%2Fdjango-pwnedpasswords-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lionheart%2Fdjango-pwnedpasswords-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lionheart%2Fdjango-pwnedpasswords-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lionheart%2Fdjango-pwnedpasswords-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lionheart","download_url":"https://codeload.github.com/lionheart/django-pwnedpasswords-validator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lionheart%2Fdjango-pwnedpasswords-validator/sbom","scorecard":{"id":591805,"data":{"date":"2025-08-11","repo":{"name":"github.com/lionheart/django-pwnedpasswords-validator","commit":"ac1b95eced5abacc884af8a3745d6de0a0db703a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 1/29 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":"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":"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":"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":"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":"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":"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":"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: Apache License 2.0: 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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 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-20T22:08:24.078Z","repository_id":57421429,"created_at":"2025-08-20T22:08:24.078Z","updated_at":"2025-08-20T22:08:24.078Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274471669,"owners_count":25291619,"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-10T02:00:12.551Z","response_time":83,"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":["django","django-passwords","library","password-validation","password-validator","passwords","python","python-library","security"],"created_at":"2024-11-04T23:04:28.698Z","updated_at":"2025-09-15T23:43:43.346Z","avatar_url":"https://github.com/lionheart.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"![](meta/repo-banner-2.png)\n[![](meta/repo-banner-bottom.png)][lionheart-url]\n\n[![Version][version-badge]][pypi-url]\n[![Python Versions][versions-badge]][pypi-url]\n\n`django-pwnedpasswords-validator` is a Django password validator that checks if a user-provided password exists in a data breach using the [Pwned Passwords v2 API](https://haveibeenpwned.com/API/v2#PwnedPasswords). All provided password data is [k-anonymized][k-anonymous-url] before being sent to the API, so plaintext passwords never leave your server.\n\nFrom https://haveibeenpwned.com/API/v2#PwnedPasswords:\n\n\u003e Pwned Passwords are more than half a billion passwords which have previously been exposed in data breaches. The service is detailed in the [launch blog post](https://www.troyhunt.com/introducing-306-million-freely-downloadable-pwned-passwords/) then [further expanded on with the release of version 2](https://www.troyhunt.com/ive-just-launched-pwned-passwords-version-2). The entire data set is [both downloadable and searchable online via the Pwned Passwords page](https://haveibeenpwned.com/Passwords).\n\n## Installation\n\ndjango-pwnedpasswords-validator is available for download through [PyPi][pypi-url]. You can install it right away using pip.\n\n```bash\npip install django-pwnedpasswords-validator\n```\n\nThen, add django-pwnedpasswords-validator to your `INSTALLED_APPS`:\n\n```python\nINSTALLED_APPS = (\n    ...\n    'django_pwnedpasswords_validator'\n)\n```\n\nFinally, add django-pwnedpasswords-validator to `AUTH_PASSWORD_VALIDATORS`:\n\n```python\nAUTH_PASSWORD_VALIDATORS = [\n    ...\n    {\n        'NAME': \"django_pwnedpasswords_validator.validation.PwnedPasswordValidator\"\n    }\n]\n```\n\nIf you'd like to customize the error message (the default is *\"This password has previously appeared in a data breach and should not be used.\"*), you can pass in an alternate in the `OPTIONS` parameter for the validator.\n\n```python\nAUTH_PASSWORD_VALIDATORS = [\n    ...\n    {\n        'NAME': \"django_pwnedpasswords_validator.validation.PwnedPasswordValidator\",\n        'OPTIONS': {\n            'error_text': \"Your password was found in a data breach.\",\n        }\n    }\n]\n```\n\n#### Security Note\n\nNo plaintext passwords ever leave your server using django-pwnedpasswords-validator.\n\nHow does that work? Well, the Pwned Passwords v2 API has a pretty cool [k-anonymity][k-anonymous-url] implementation.\n\nFrom https://blog.cloudflare.com/validating-leaked-passwords-with-k-anonymity/:\n\n\u003e Formally, a data set can be said to hold the property of k-anonymity, if for every record in a released table, there are k − 1 other records identical to it.\n\nThis allows us to only provide the first 5 characters of the SHA-1 hash of the password in question. The API then responds with a list of SHA-1 hash suffixes with that prefix. On average, that list contains 478 results.\n\nPeople smarter than I am have used [math](https://blog.cloudflare.com/validating-leaked-passwords-with-k-anonymity/) to prove that 5-character prefixes are sufficient to maintain k-anonymity for this database.\n\nIn short: your plaintext passwords are protected if you use this library. You won't leak any enough data to identity which passwords you're searching for.\n\n## Thanks\n\nSpecial thanks to [Troy Hunt](https://www.troyhunt.com) for collecting this data and providing this service.\n\n## Authors\n\n[Dan Loewenherz](https://github.com/dlo)\n\n## See also\n\n[pwnedpasswords](https://github.com/lionheart/pwnedpasswords), a command-line utility and Python library for the Pwned Passwords v2 API.\n\n## License\n\nApache License, Version 2.0. See [LICENSE](LICENSE) for details.\n\n[ci-badge]: https://img.shields.io/travis/lionheart/django-pwnedpasswords-validator.svg?style=flat\n[version-badge]: https://img.shields.io/pypi/v/django-pwnedpasswords-validator.svg?style=flat\n[versions-badge]: https://img.shields.io/pypi/pyversions/django-pwnedpasswords-validator.svg?style=flat\n\n[travis-repo-url]: https://travis-ci.org/lionheart/django-pwnedpasswords-validator\n[k-anonymous-url]: https://en.wikipedia.org/wiki/K-anonymity\n[semver-url]: http://www.semver.org\n[pypi-url]: https://pypi.python.org/pypi/django-pwnedpasswords-validator\n[lionheart-url]: https://lionheartsw.com/\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flionheart%2Fdjango-pwnedpasswords-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flionheart%2Fdjango-pwnedpasswords-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flionheart%2Fdjango-pwnedpasswords-validator/lists"}