Skip to content

Latest commit

 

History

History
29 lines (26 loc) · 826 Bytes

README.md

File metadata and controls

29 lines (26 loc) · 826 Bytes

Semgrep Rules Parser

Parses needed ruleset from semgrep rules registry using python default libraries. Preferable python version - 3.11.3

Usage

You can either change corresponding variables in code

...
def main() -> None:
    token   = "AUTH_TOKEN"
    ruleset = "RULESET"
    output  = "OUTPUT_FILE"
...

or pass these parameters in terminal

python3 main.py AUTH_TOKEN RULESET OUPUT_FILE

Example:

python3 main.py eyJ...OnE golang rules.yml

How to get authorization token?

  1. Go to Semgrep Rules Registry and log into your account.
  2. Then open DevTools (F12 or ctrl+shift+I)
  3. Go to Network tab and reload page
  4. Find any request that has been sent to semgrep.dev/api and find Authorization header
  5. Now you have authorization token!