{"id":28625482,"url":"https://github.com/querateam/django-pwned","last_synced_at":"2025-10-11T05:18:08.837Z","repository":{"id":57421424,"uuid":"449331603","full_name":"QueraTeam/django-pwned","owner":"QueraTeam","description":"A collection of django password validators","archived":false,"fork":false,"pushed_at":"2025-01-18T10:21:49.000Z","size":53,"stargazers_count":24,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-25T08:58:52.166Z","etag":null,"topics":["django","password","python","security"],"latest_commit_sha":null,"homepage":"","language":"Python","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/QueraTeam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2022-01-18T15:07:01.000Z","updated_at":"2025-08-28T14:49:34.000Z","dependencies_parsed_at":"2024-06-15T08:45:39.890Z","dependency_job_id":"6767db4f-ae73-48cd-a3b6-bd41007c6178","html_url":"https://github.com/QueraTeam/django-pwned","commit_stats":{"total_commits":26,"total_committers":3,"mean_commits":8.666666666666666,"dds":"0.11538461538461542","last_synced_commit":"d9c730e5c4b34471e30be31b8f026bf2f066c233"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/QueraTeam/django-pwned","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QueraTeam%2Fdjango-pwned","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QueraTeam%2Fdjango-pwned/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QueraTeam%2Fdjango-pwned/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QueraTeam%2Fdjango-pwned/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QueraTeam","download_url":"https://codeload.github.com/QueraTeam/django-pwned/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QueraTeam%2Fdjango-pwned/sbom","scorecard":{"id":116068,"data":{"date":"2025-08-11","repo":{"name":"github.com/QueraTeam/django-pwned","commit":"904bc9bbfd3a352e99fc31e58e824082a3233f4a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Code-Review","score":1,"reason":"Found 3/27 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":"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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/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":"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":"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":"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/test.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/QueraTeam/django-pwned/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/QueraTeam/django-pwned/test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/QueraTeam/django-pwned/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/QueraTeam/django-pwned/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/QueraTeam/django-pwned/test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/QueraTeam/django-pwned/test.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/QueraTeam/django-pwned/test.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:34","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:35","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:36","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned","Info:   0 out of   3 pipCommand 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":"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.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt: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 6 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-16T01:19:08.938Z","repository_id":57421424,"created_at":"2025-08-16T01:19:08.938Z","updated_at":"2025-08-16T01:19:08.938Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006351,"owners_count":26084084,"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-10-11T02:00:06.511Z","response_time":55,"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","password","python","security"],"created_at":"2025-06-12T08:10:46.296Z","updated_at":"2025-10-11T05:18:08.785Z","avatar_url":"https://github.com/QueraTeam.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Django Pwned\n\n[![pypi](https://img.shields.io/pypi/v/django-pwned.svg)](https://pypi.python.org/pypi/django-pwned/)\n[![tests ci](https://github.com/QueraTeam/django-pwned/workflows/Tests/badge.svg)](https://github.com/QueraTeam/django-pwned/actions)\n[![coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/quera-org/9813850da17ec3e10442c3f288d09065/raw/pytest-coverage__main.json)](https://github.com/QueraTeam/django-pwned/actions)\n[![MIT](https://img.shields.io/github/license/QueraTeam/django-pwned.svg)](https://github.com/QueraTeam/django-pwned/blob/master/LICENSE.txt)\n[![black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\nA collection of django password validators.\n\n## Compatibility\n\n- Python: **3.8**, **3.9**, **3.10**, **3.11**, **3.12**\n- Django: **4.2**, **5.0**\n\n## Installation\n\n```\npip install django-pwned\n```\n\nFor translations to work, add `django_pwned` to `INSTALLED_APPS`.\n\n## TL;DR:\n\n```python\nAUTH_PASSWORD_VALIDATORS = [\n    {\"NAME\": \"django.contrib.auth.password_validation.UserAttributeSimilarityValidator\"},\n    {\"NAME\": \"django_pwned.validators.GitHubLikePasswordValidator\"},\n    {\"NAME\": \"django_pwned.validators.MinimumUniqueCharactersPasswordValidator\"},\n    {\"NAME\": \"django_pwned.validators.PwnedPasswordValidator\"},\n]\n```\n\n## Validators\n\n### PwnedPasswordValidator(request_timeout=1.5, count_threshold=1)\n\nThis validator uses the [Pwned Passwords API] to check for compromised passwords.\n\nInternally, this validator checks password with django's\n`CommonPasswordValidator` and if password was not in django's list,\nuses Pwned API to check password. So you can remove `CommonPasswordValidator`\nif you're using this validator.\n\n```python\nAUTH_PASSWORD_VALIDATORS = [\n    # ...\n    # {\"NAME\": \"django.contrib.auth.password_validation.CommonPasswordValidator\"},\n    {\"NAME\": \"django_pwned.validators.PwnedPasswordValidator\"},\n    # ...\n]\n```\n\nYou can set the API request timeout with the `request_timeout` parameter (in seconds).\n\nYou can set the `count_threshold` to reject a password if it appears at least\na certain number of times in the Pwned Passwords data set.\nBy default, this threshold is set to `1`.\nFor instance, setting `count_threshold=2` means the password will be rejected\nif it appears in the data set at least twice.\n\nExample configuration:\n\n```python\nAUTH_PASSWORD_VALIDATORS = [\n    # ...\n    {\n      \"NAME\": \"django_pwned.validators.PwnedPasswordValidator\",\n      \"OPTIONS\": {\n        \"request_timeout\": 2,\n        \"count_threshold\": 5,\n      },\n    },\n    # ...\n]\n```\n\nIf for any reason (connection issues, timeout, ...) the request to Pwned API fails,\nthis validator skips checking password and logs a message.\n\n### GitHubLikePasswordValidator(min_length=8, safe_length=15)\n\nValidates whether the password is at least:\n\n- 8 characters long, if it includes a number and a lowercase letter, or\n- 15 characters long with any combination of characters\n\nBased on GitHub's documentation about [creating a strong password].\n\nYou may want to disable Django's `NumericPasswordValidator`\nand `MinimumLengthValidator` if you want to use\n`GitHubLikePasswordValidator`.\n\nThe minimum number of characters can be customized with the `min_length`\nparameter. The length at which we remove the restriction about\nrequiring both number and lowercase letter can be customized with the\n`safe_length` parameter.\n\n### MinimumUniqueCharactersPasswordValidator(min_unique_characters=4)\n\nValidates whether the password contains at least 4 unique characters.\nFor example `aaaaaaaaaabbbbbbccc` is an invalid password, but `aAbB` is a valid password.\n\nThe minimum number of unique characters can be customized with the\n`min_unique_characters` parameter.\n\n## Development\n\n- Create and activate a python virtualenv.\n- Install development dependencies in your virtualenv: `pip install -e '.[dev]'`\n- Install pre-commit hooks: `pre-commit install`\n- Run tests with coverage: `py.test --cov`\n\n## License\n\nMIT\n\n[pwned passwords api]: https://haveibeenpwned.com/API/v3#PwnedPasswords\n[creating a strong password]: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-strong-password\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquerateam%2Fdjango-pwned","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquerateam%2Fdjango-pwned","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquerateam%2Fdjango-pwned/lists"}