Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,13 @@ I owe Marco Ivaldi [@0xdea](https://github.com/0xdea) a huge thanks for his publ
**Program Output Example:**\
![](callisto.png)

**Tuning**

When using OpenAI analysis you may wish to tune Semgrep to focus on higher priority issues on the initial run. By default semgrep will flag low severity issues which can result in heavy usage of your OpenAI key for similar issues and lead to rate limiting (depending on free vs paid accounts etc). You can tune semgrep behaviour by modifying sgrep/controller.py to implement severity flags which set a floor level on the analysis. For example, the below will only include High and Medium confidence level rules excluding Low (INFO).

`sGrepResults = subprocess.run(["semgrep", "--config=sgrep/semgrep-rules-c/c","--severity","ERROR","--severity","WARNING", "--json", "sgrep/semgrep.c"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)`

You can confirm the severity to confidence level rule mappings using the following command:

`grep -R severity sgrep/semgrep-rules-c`