From 73bf8f0c95120882d26ee6148805d3b2efe63f1c Mon Sep 17 00:00:00 2001 From: Rohit kumar Date: Wed, 20 Nov 2024 10:21:49 +0530 Subject: [PATCH] Added rule path flag --- index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.js b/index.js index 2dc0cfa..756a06d 100644 --- a/index.js +++ b/index.js @@ -37,11 +37,17 @@ app.post('/git-scan/', async (req, res) => { let modules = req.body.modules; let slack_url = req.body.slack_url; let policy_url = req.body.policy_url; + let rule_path = req.body.rule_path; + // if rule_path not provided or blank then use default repo + if (!rule_path || rule_path === "") { + rule_path = "https://github.com/rohitcodergroww/semgrep-rules" + } let job_args = [ "--code-path=" + repository_link, "--branch=" + branch, "--pr-branch=" + pr_branch, "--job-id=" + job_id, + "--rule-path=" + rule_path, "--verbose" ] if (product_name) {