From f9ce092be13cc32e685dfa26e7705e9c6e3108a3 Mon Sep 17 00:00:00 2001 From: Liran Tal Date: Wed, 6 Apr 2022 13:13:53 +0300 Subject: [PATCH] fix: fix command injection vector --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index c38c84d..aa40114 100644 --- a/index.js +++ b/index.js @@ -28,7 +28,7 @@ function gitPullOrClone (url, outPath, opts, cb) { function gitClone () { // --depth implies --single-branch const flag = depth < Infinity ? '--depth=' + depth : '--single-branch' - const args = ['clone', flag, url, outPath] + const args = ['clone', flag, '--', url, outPath] debug('git ' + args.join(' ')) spawn('git', args, {}, function (err) { if (err) err.message += ' (git clone) (' + url + ')'