Skip to main content

Static analysis security tool command line

Project description

Precaution CLI
Build and Test

Precli is the core of the Precaution GitHub App and 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/examples/hmac_timing_attack.py

Run precli on a single test example, showing results in SARIF format:

precli tests/unit/rules/python/stdlib/examples/hmac_timing_attack.py --json

Run precli on a single test example, showing results in plain format:

precli tests/unit/rules/python/stdlib/examples/hmac_timing_attack.py --plain

Run precli on a single test example, showing results in markdown format:

precli tests/unit/rules/python/stdlib/examples/hmac_timing_attack.py --markdown

Run precli against all the python test examples:

precli -r tests/unit/rules/python/stdlib/examples/

Run precli against an entire GitHub repository:

precli -r https://github.com/securesauce/precli

Run precli against an entire GitHub repository and output the results in markdown format to Gist. Note: this requires a GITHUB_TOKEN environment variable set to a valid GitHub token value:

precli -r https://github.com/securesauce/precli --markdown --gist

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

precli-0.4.0.tar.gz (152.3 kB view hashes)

Uploaded Source

Built Distribution

precli-0.4.0-py3-none-any.whl (99.6 kB view hashes)

Uploaded Python 3

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