A Python linter that wraps PyFlakes, pycodestyle and McCabe into one command, with support for third-party plugins.
dlint-py/dlint
A flake8 plugin that flags insecure and bad Python coding patterns, such as use of exec or unsafe deserialization.
- Stars
- 178
- Forks
- 18
- Open issues
- 23
- Last commit
- 18 days ago
What is it?
Dlint is a linter for Python that checks source code for insecure patterns and coding practices that tend to cause bugs or security issues. It runs as a plugin on top of flake8, so existing flake8 workflows, options and configuration carry over. Each rule has an ID with the DUO prefix, and violations are reported with file, line and a short explanation, for example flagging the use of exec.
Dlint is installed from PyPI with pip and runs from the command line with `flake8 --select=DUO`, which limits the run to Dlint's rules. Its editor integration works through existing flake8 plugins for editors such as Vim, Emacs, Sublime Text, PyCharm, Atom and VS Code. Developers can also write custom rules as separate modules whose names start with `dlint_plugin_`, following a documented naming convention.
Key features
- 01Detects insecure Python patterns such as use of exec under the DUO rule prefix.
- 02Builds on flake8, so it works with flake8 options and configuration.
- 03Can be run on single files or whole directories from the command line.
- 04Works with common editor flake8 integrations for inline results.
- 05Supports custom rule plugins loaded through a naming convention.
Use cases
- Adding security-focused lint checks to a Python project's CI pipeline.
- Reviewing legacy Python code for risky constructs like exec.
- Enforcing team-specific secure coding rules through a custom plugin.
Quick start
- 1
Install Dlint from PyPI
python -m pip install dlint - 2
Run Dlint rules through flake8 on a file or directory
python -m flake8 --select=DUO /path/to/code
Things to know
- Dlint runs as a flake8 plugin, so you need flake8 and Python installed.
In collections
Topics
FAQ
- What is dlint?
- A flake8 plugin that flags insecure and bad Python coding patterns, such as use of exec or unsafe deserialization. Dlint is a linter for Python that checks source code for insecure patterns and coding practices that tend to cause bugs or security issues. It runs as a plugin on top of flake8, so existing flake8 workflows, options and configuration carry over. Each rule has an ID with the DUO prefix, and violations are reported with file, line and a short explanation, for example flagging the use of exec.
- Is dlint free to use? What license does it have?
- dlint is open source under the BSD-3-Clause license. Check the license terms before using it in commercial products.
- Is dlint still maintained?
- Actively maintained. The last commit to dlint was on Oct 20, 2026.
- What can I use dlint for?
- Adding security-focused lint checks to a Python project's CI pipeline. Reviewing legacy Python code for risky constructs like exec. Enforcing team-specific secure coding rules through a custom plugin.
- How do I install dlint?
- Install Dlint from PyPI: python -m pip install dlint Run Dlint rules through flake8 on a file or directory: python -m flake8 --select=DUO /path/to/code
- Where can I get dlint?
- The source code and installation instructions are on GitHub: https://github.com/dlint-py/dlint
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A strict, opinionated flake8 plugin that enforces consistent, simple Python code style and flags complex code patterns.
A Flake8 plugin that flags likely bugs and questionable design patterns that pyflakes and pycodestyle don't check.
A Python tool that computes McCabe cyclomatic complexity for functions and runs as a flake8 plugin to flag overly complex code.
A Rust-based multi-language CLI that runs linters, auto-formatters, security scanners and maintainability checks through one tool and config file.
A flake8 plugin that flags unnecessary or inefficient list, set, dict, and generator comprehension and builtin call patterns.