v1
latestOpenAPI 3.1.02026-07-261690320.7 KBGet a custom rule
Get a custom semgrep rule
get/repositories/sast/custom-rules/{rule_id}
Path parameters
rule_idinteger required
The ID of the custom rule
Response
Detailed information of a custom semgrep rule
Example response
{
"custom_rule": {
"id": 1,
"semgrep_rule": "rules:\n- id: CUSTOM-RULE-1\n pattern: console.log(...)\n message: Semgrep found a debug statement\n languages: [javascript]\n severity: WARNING",
"issue_title": "console.log",
"priority": 20,
"tldr": "console.log should be avoided in frontend applications",
"how_to_fix": "remove the console.log",
"language": "JS",
"has_error": false
}
}