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:
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.8.tar.gz
.
File metadata
- Download URL: precli-0.7.8.tar.gz
- Upload date:
- Size: 384.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0dce53d408bdd65fee1fec159931a79f530588aa811a8f19455ce2db681344f7 |
|
MD5 | 451d573491926f5fbd218ee7e84b70e3 |
|
BLAKE2b-256 | af3f54c9252593c059a2fb9115336767f6e22a9a3bc3fcd380195128828a99fc |
Provenance
The following attestation bundles were made for precli-0.7.8.tar.gz
:
Publisher:
publish-to-pypi.yml
on securesauce/precli
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
precli-0.7.8.tar.gz
- Subject digest:
0dce53d408bdd65fee1fec159931a79f530588aa811a8f19455ce2db681344f7
- Sigstore transparency entry: 146313202
- Sigstore integration time:
- Predicate type:
File details
Details for the file precli-0.7.8-py3-none-any.whl
.
File metadata
- Download URL: precli-0.7.8-py3-none-any.whl
- Upload date:
- Size: 169.4 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 | c361bda3e205a0103dc449ef09ed4afe51e1533c3d0bce8b818c17ef05318a8c |
|
MD5 | e60051fc2012993acacebd71aba547d6 |
|
BLAKE2b-256 | 77c9227f59053e33129fbfacbc5a74cbd4bc7d6049f243b2710a03c54c9f703c |
Provenance
The following attestation bundles were made for precli-0.7.8-py3-none-any.whl
:
Publisher:
publish-to-pypi.yml
on securesauce/precli
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
precli-0.7.8-py3-none-any.whl
- Subject digest:
c361bda3e205a0103dc449ef09ed4afe51e1533c3d0bce8b818c17ef05318a8c
- Sigstore transparency entry: 146313205
- Sigstore integration time:
- Predicate type: