Skip to content

Commit 73bf8f0

Browse files
committed
Added rule path flag
1 parent 662f0c7 commit 73bf8f0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,17 @@ app.post('/git-scan/', async (req, res) => {
3737
let modules = req.body.modules;
3838
let slack_url = req.body.slack_url;
3939
let policy_url = req.body.policy_url;
40+
let rule_path = req.body.rule_path;
41+
// if rule_path not provided or blank then use default repo
42+
if (!rule_path || rule_path === "") {
43+
rule_path = "https://github.com/rohitcodergroww/semgrep-rules"
44+
}
4045
let job_args = [
4146
"--code-path=" + repository_link,
4247
"--branch=" + branch,
4348
"--pr-branch=" + pr_branch,
4449
"--job-id=" + job_id,
50+
"--rule-path=" + rule_path,
4551
"--verbose"
4652
]
4753
if (product_name) {

0 commit comments

Comments
 (0)