Skip to main content

security

Security toolkit for the Python community

This library includes a number of code security controls for various application security vulnerability categories. It can be used directly by programmers, but you may have been introduced to it by having it directly added to your code by automation.

Many of the APIs provided are meant to be drop-in replacements that either offer more secure defaults, harden against common attacks, or at least surface the security questions developers should answer when using risky APIs.

Installation

To install this package from PyPI, use the following command:

pip install security

Running tests

DO NOT RUN TESTS LOCALLY WITHOUT A VM/CONTAINER.

Tests will try to run "dangerous" commands (i.e. curl, netcat, etc.) and try to access sensitive files (i.e. sudoers, passwd, etc.). We do so to test the our abilities to detect and filter these types of attacks.

While all these commands are devised as innocuous, it is still not a good idea to risk exposure. They also require a specific environment to pass. We recommend using something like act to run the github workflow locally within a container for local development.

Release files for security 1.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for security 1.3.1
File Size Uploaded
security-1.3.1.tar.gz 27.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for security 1.3.1
File Interpreter ABI Platform
security-1.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 41.3 kB

Release files / security-1.3.1.tar.gz

Download URL security-1.3.1.tar.gz
Size 27.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7ec0853c74c7dd22a9967bda087db5d4a7df58253574e60ec475c660f839da6d
BLAKE2b-256 checksum
How to use checksums
faac5ee0cd528ee9e5f166b44bc98a3c219fb93418ed48a88eb36a868c596239
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release files / security-1.3.1-py3-none-any.whl

Download URL security-1.3.1-py3-none-any.whl
Size 13.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9df6e75393f494ca3fd06dac3ed02f3c4fed60842b13fd00757b026cedff426b
BLAKE2b-256 checksum
How to use checksums
d721b65c9f876fce298d6bd5411f1cde7fc889ea90d7bb7d9eaa1fcbb0920b18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release history Release notifications | RSS feed

This release

1.3.1 This release

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page