git-branch-description
Advanced tools
+1
-1
| { | ||
| "name": "git-branch-description", | ||
| "version": "1.1.7", | ||
| "version": "1.1.8", | ||
| "description": "manage branch description via branch-description.properties", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
+14
-9
@@ -1,11 +0,15 @@ | ||
| var os = require('os'); | ||
| var exec = require('child_process').execSync; | ||
| var parser = require('./parser'); | ||
| function trimSingleQuote(br) { | ||
| return ` ${br} `.replace(/(\s)'/g, '$1').replace(/'(\s)/g, '$1').trim(); | ||
| } | ||
| exports.localBranches = function() { | ||
| var branches = exec(`git for-each-ref --format='%(refname)' refs/heads/`, { | ||
| var branches = exec(`git for-each-ref --format='%(refname:short)' refs/heads/`, { | ||
| cwd: parser.getRootDir() | ||
| }).toString().trim(); | ||
| }).toString(); | ||
| branches = trimSingleQuote(branches); | ||
| branches = branches.replace(/(^|\n)refs\/heads\//g, '$1').split(os.EOL); | ||
| branches = branches.split(/\s+/); | ||
@@ -16,8 +20,9 @@ return branches; | ||
| exports.remoteBranches = function(replaceRemoteName) { | ||
| var branches = exec(`git for-each-ref --format='%(refname)' refs/remotes/`).toString().trim(); | ||
| branches = branches.replace(/(^|\n)refs\/remotes\//g, '$1'); | ||
| var branches = exec(`git for-each-ref --format='%(refname:short)' refs/remotes/`).toString().trim(); | ||
| branches = trimSingleQuote(branches); | ||
| replaceRemoteName && (branches = branches.replace(/(^|\n)\w+\//g, '$1')); | ||
| branches = branches.split(os.EOL); | ||
| branches = branches.split(/\s+/).filter(function(br) { | ||
| return replaceRemoteName ? br !== 'HEAD' : !/^\w+\/HEAD$/.test(br); | ||
| }); | ||
| return branches; | ||
@@ -24,0 +29,0 @@ } |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
11021
1.58%271
1.88%