-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more detail to the README (#253)
Add a quick start section showing how to install and an example section showing an example running precli against one of the test samples. --------- Signed-off-by: Eric Brown <ericwb@users.noreply.github.com>
- Loading branch information
Showing
1 changed file
with
33 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,36 @@ | ||
# precli | ||
# Precli - precaution command line interface | ||
|
||
[![Build and Test](https://github.com/securesauce/precli/actions/workflows/unit-test.yml/badge.svg?branch=main)](https://github.com/securesauce/precli/actions/workflows/unit-test.yml) | ||
|
||
Precaution command line interface | ||
Precli is the core of the GitHub App [Precaution](https://github.com/marketplace/precaution) and also a command line interface to demonstate its functionality. | ||
|
||
**Quick Start** | ||
```bash | ||
pip install precli | ||
``` | ||
|
||
**Example** | ||
|
||
``` | ||
$ precli tests/unit/rules/python/stdlib/examples/hmac_timing_attack.py | ||
⛔️ Error on line 18 in tests/unit/rules/python/stdlib/examples/hmac_timing_attack.py | ||
PY005: Observable Timing Discrepancy | ||
Comparing digests with the '==' operator is vulnerable to timing attacks. | ||
17 | ||
❱ 18 return digest == received_digest | ||
19 | ||
Suggested fix: Use the 'hmac.compare_digest' function instead of the '=='' operator to reduce the | ||
vulnerability to timing attacks. | ||
17 | ||
❱ 18 return hmac.compare_digest(digest, received_digest) | ||
19 | ||
┏━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┳━━━━━┓ | ||
┃ Files analyzed ┃ 1 ┃ Lines analyzed ┃ 18 ┃ | ||
┃ Files skipped ┃ 0 ┃ ┃ ┃ | ||
┣━━━━━━━━━━━━━━━━━━━━━━━╋━━━━━╋━━━━━━━━━━━━━━━━━━━━━━╋━━━━━┫ | ||
┃ Errors ┃ 1 ┃ ┃ ┃ | ||
┃ Warnings ┃ 0 ┃ ┃ ┃ | ||
┃ Notes ┃ 0 ┃ ┃ ┃ | ||
┗━━━━━━━━━━━━━━━━━━━━━━━┻━━━━━┻━━━━━━━━━━━━━━━━━━━━━━┻━━━━━┛ | ||
``` |