Precaution security static analysis command line
Project description
Precli is the core of the Precaution App and Precaution Action. It also serves as a command line interface to demonstate its functionality. It is designed to do static code analysis of source code with a number of rules covering the standard library for the corresponding programming language.
If your needs go beyond the analysis of just the standard library, consider upgrading to Precaution Professional to get access to finding and fixing security vulnerabilities in third-party libraries. See https://www.securesauce.dev/ for more details.
Quick Start
To install precli:
pip install precli
Run precli on a single test example:
precli tests/unit/rules/python/stdlib/hmac/examples/hmac_timing_attack.py
Example code:
# level: ERROR
# start_line: 18
# end_line: 18
# start_column: 13
# end_column: 15
import hmac
received_digest = (
b"\xe2\x93\x08\x19T8\xdc\x80\xef\x87\x90m\x1f\x9d\xf7\xf2"
b"\xf5\x10>\xdbf\xa2\xaf\xf7x\xcdX\xdf"
)
key = b"my-super-duper-secret-key-string"
password = b"pass"
digest = hmac.digest(key, password, digest="sha224")
print(digest == received_digest)
Example result:
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 precli-0.7.4.tar.gz
.
File metadata
- Download URL: precli-0.7.4.tar.gz
- Upload date:
- Size: 377.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c9a0624b63635f0f051b5dfbb39ea0c1dcc001e09747a8d278cb5a3a8eafa62 |
|
MD5 | e28eee774ab74ba4dc92ee6b5f278089 |
|
BLAKE2b-256 | d649e681781f9a7e62407320ab88d6fa82471c9c3ab678b08608c656b9bbfcc5 |
File details
Details for the file precli-0.7.4-py3-none-any.whl
.
File metadata
- Download URL: precli-0.7.4-py3-none-any.whl
- Upload date:
- Size: 159.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61c2b3dec2df8c91a431cca4eaab2358bf3e754a1507d9a71094fd66c18cbc26 |
|
MD5 | f12b4054c8f67c766e4ab46aa8859f93 |
|
BLAKE2b-256 | a5b289349776d3a73c035da88869358284683bb800c0289a6c0791042ecf3578 |