Parses needed ruleset from semgrep rules registry using python default libraries. Preferable python version - 3.11.3
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
- Go to Semgrep Rules Registry and log into your account.
- Then open DevTools (
F12
orctrl
+shift
+I
) - Go to
Network
tab and reload page - Find any request that has been sent to
semgrep.dev/api
and findAuthorization
header - Now you have authorization token!