semgrep-rules icon indicating copy to clipboard operation
semgrep-rules copied to clipboard

A collection of my Semgrep rules to facilitate vulnerability research.

semgrep-rules

"Humans are more suited to recognize food than to keep large graphs in their head."

-- Halvar Flake

A collection of my Semgrep rules to facilitate vulnerability research.

Blog post: https://security.humanativaspa.it/semgrep-ruleset-for-c-c-vulnerability-research

See also: https://semgrep.dev/r

Setup and usage instructions

  1. Install Semgrep.
  2. Clone this github repo.
  3. To use these rules, run:
semgrep --config PATH/TO/RULES_DIR/OR/RULE_FILE PATH/TO/FILE/FOR/SCANNING

C/C++

buffer overflows

integer overflows

format strings

memory management

command injection

race conditions

privilege management

miscellaneous

Generic

miscellaneous

  • bad-words. Keywords and comments that suggest the presence of bugs.