Skip to main content

Pylint plugin adding some checks to make Python code adhere to more secure coding standard

Project description

Pylint Secure Coding Standard Plugin

PyPI - Python Version PyPI version CI Build CodeQL pre-commit.ci status Coverage Status

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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pylint-secure-coding-standard-1.0.0.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

pylint_secure_coding_standard-1.0.0-py2.py3-none-any.whl (8.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pylint-secure-coding-standard-1.0.0.tar.gz.

File metadata

  • Download URL: pylint-secure-coding-standard-1.0.0.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for pylint-secure-coding-standard-1.0.0.tar.gz
Algorithm Hash digest
SHA256 474d1906df35ab4ab51d00db282ef1bd3d5059590deaebb0faee90c204d81bed
MD5 af4d624136ce7f72cddf2da8bd6ca46b
BLAKE2b-256 8fd101831c9ceeee2cee331cac4086a04919cfe5572550ffeb85edee6475e3e7

See more details on using hashes here.

File details

Details for the file pylint_secure_coding_standard-1.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: pylint_secure_coding_standard-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for pylint_secure_coding_standard-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a7be0a9fad3fadc46f89378ecfc4c1c1cdc5e31ee3c8d3c9c3ca3a69b6e0ffca
MD5 1f3336b02311d0af3d27eb344493f50b
BLAKE2b-256 173a0b517678b368b285c813f7894df110576273fa64e64a59ce393a634ed1f4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page