dodgy
Dodgy: Searches for dodgy looking lines in Python code
What it is and what it does
Dodgy is a lightweight static analysis tool that searches Python codebases for suspicious code patterns using regular expressions. It targets common security oversights like accidental version control markers, hardcoded passwords, and embedded API keys—problems particularly dangerous in open-source projects where secrets become publicly visible. The tool is designed to run as a pre-commit hook to catch these issues before code is checked in.
The package has no runtime dependencies and installs cleanly, but it is no longer maintained. The last release was in late 2019 and the last repository commit in mid-2021. While it still functions on supported Python versions, it will not evolve to handle new secret patterns, modern Python syntax, or compatibility issues with newer language versions.
Use it for:
- Run as a pre-commit hook in open-source projects to prevent accidental exposure of API keys or credentials.
- Scan legacy codebases for hardcoded secrets before migrating to a secrets-management system.
- Quick baseline check in CI/CD pipelines for obvious security oversights in Python files.
- Integrate into code review workflows to flag suspicious patterns before merge.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Dodgy scans Python source code for suspicious patterns—accidental diff markers, hardcoded passwords, and secret keys—using simple regular expressions to catch potentially dangerous code before it's committed.
No—not for new projects. Dodgy is abandoned and unmaintained since 2021. For active codebases, use a modern alternative like detect-secrets, truffleHog, or a dedicated secrets scanner that receives updates. If you maintain legacy code already using dodgy and it still works on your Python version, keeping it is low-risk, but do not adopt it for new work.
Install
dodgy on PyPI
pip
pip install dodgyuv
uv add dodgypoetry
poetry add dodgyInstalling dodgy
Before you install
Installation is frictionless with no runtime dependencies. However, the project is abandoned—last release was 2019-12-31 and last commit 2021-08-29—so it will not receive bug fixes, security updates, or compatibility patches for modern Python versions.
License in practice
MIT license is permissive and poses no restrictions on use, modification, or distribution in commercial or private projects.
Quickstart
pip install dodgy==0.2.1
python -m dodgy /path/to/code
Project is abandoned; compatibility with Python versions beyond 3.8 is untested and unsupported.
Verify before relying
- Whether the regex patterns remain effective at detecting modern secret formats and obfuscation techniques.
- Compatibility status with Python 3.9 and later versions despite classifiers only listing up to 3.8.
- Whether false-positive rate is acceptable for typical codebases.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 2,418 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 672,077/month — #5,402 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: dodgy-0.2.1-py3-none-any.whl
Keywords: check, for, suspicious, code
Tags
More Quality Assurance packages
Coverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
ruffRuff is a Python linter and code formatter…
permissive · top 1,000 on PyPI
pexpectPexpect spawns and controls interactive console…
permissive · top 1,000 on PyPI
blackBlack reformats Python source code to a…
permissive · top 1,000 on PyPI
pytest-xdistpytest-xdist distributes pytest tests across…
permissive · top 1,000 on PyPI
cfn-lintValidates AWS CloudFormation templates in YAML…
permissive · top 1,000 on PyPI
detect-secretsDetects secrets (API keys, tokens, credentials)…
permissive · top 5,000 on PyPI
flawfinderFlawfinder scans C/C++ source code to identify…
copyleft · top 15,000 on PyPI
bc-detect-secretsDetects secrets (API keys, tokens, credentials)…
permissive · top 5,000 on PyPI
picklescanScans Python Pickle files and related…
permissive · top 15,000 on PyPI
verminVermin analyzes Python source code to detect…
permissive · top 15,000 on PyPI
truffleHogScans Git repositories and other sources for…
unclear · top 15,000 on PyPI
cycodeCycode is a command-line security scanner that…
permissive · top 15,000 on PyPI
zizmorzizmor is a static analysis tool that scans…
permissive · top 5,000 on PyPI
ggshieldggshield is a CLI tool that scans files,…
permissive · top 15,000 on PyPI
pyre-checkPysa is a static analysis tool that tracks data…
permissive · top 15,000 on PyPI