Pylint plugin adding some checks to make Python code adhere to more secure coding standard
Project description
Pylint Secure Coding Standard Plugin
pylint plugin that enforces some secure coding standards.
Installation
pip install pylint-secure-coding-standard
Pylint codes
Code | Description |
---|---|
R8000 | Use os.path.realpath() instead of os.path.abspath() and os.path.relpath() |
E8001 | Avoid using exec() and eval() |
E8002 | Avoid using os.sytem() |
E8003 | Avoid using shell=True when calling subprocess functions |
R8004 | Avoid using tempfile.mktemp() , prefer tempfile.mkstemp() instead |
E8005 | Avoid using unsafe PyYAML loading functions |
E8006 | Avoid using jsonpickle.decode() |
C8007 | Avoid debug statement in production code |
C8008 | Avoid assert statements in production code |
R8009 | Use of builtin open for writing is discouraged in favor of os.open to allow for setting file permissions |
Pre-commit hook
See pre-commit for instructions
Sample .pre-commit-config.yaml
:
- repo: https://github.com/PyCQA/pylint/
rev: pylint-2.6.0
hooks:
- id: pylint
args: [--load-plugins=pylint_secure_coding_standard]
additional_dependencies: ['pylint-secure-coding-standard']
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pylint-secure-coding-standard-1.1.0.tar.gz
.
File metadata
- Download URL: pylint-secure-coding-standard-1.1.0.tar.gz
- Upload date:
- Size: 17.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3110a0320d887f0bae212d294fa03dae1d35c220b4e6cd20ab9d885de8728d63 |
|
MD5 | 7f0938726ae3a2588c8b3473f7d7f45b |
|
BLAKE2b-256 | c02ebf0c0bead2c90512a56e06ac823b127947473109d71a038c1b87a3936374 |
File details
Details for the file pylint_secure_coding_standard-1.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: pylint_secure_coding_standard-1.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12213438c11a66733d36cc9f474881bbfa12aa84a77174962c38eb510d3c7e80 |
|
MD5 | 904000cb10028f0ca968d060026185ed |
|
BLAKE2b-256 | 212fe5fccde6a8903884972df2e997fe76bb3d85a5bc5e94366f16e94db6abb8 |