+5
-4
@@ -34,8 +34,9 @@ (function() { | ||
| "package.json": function(filePath) { | ||
| var host, match, package, repo, url, user, _ref, _ref2, _ref3; | ||
| var host, match, package, repo, repoName, url, user, _ref, _ref2; | ||
| package = require(filePath); | ||
| url = (_ref = (_ref2 = package.repository) != null ? _ref2.url : void 0) != null ? _ref : ""; | ||
| repo = package.repository; | ||
| url = typeof repo === 'string' ? repo : (_ref = repo.url) != null ? _ref : ""; | ||
| if (url.length > 0) { | ||
| _ref3 = url.match(/.*:\/\/(.*)\/(.*)\/(.*)\.git/), match = _ref3[0], host = _ref3[1], user = _ref3[2], repo = _ref3[3]; | ||
| url = this.hostURL(host, user, repo); | ||
| _ref2 = url.match(/.*:\/\/(.*)\/(.*)\/(.*)(\.git)?/), match = _ref2[0], host = _ref2[1], user = _ref2[2], repoName = _ref2[3]; | ||
| url = this.hostURL(host, user, repoName); | ||
| } else if (package.name.toString().length > 0) { | ||
@@ -42,0 +43,0 @@ url = "'https://github.com/search?utf8=✓&q=" + package.name + "&type=Everything&start_value=1'"; |
+1
-1
@@ -5,3 +5,3 @@ { | ||
| "author": "Chris McCord", | ||
| "version": "0.0.1", | ||
| "version": "0.0.2", | ||
| "licenses": [{ | ||
@@ -8,0 +8,0 @@ "type": "MIT", |
+4
-3
@@ -35,6 +35,7 @@ fs = require 'fs' | ||
| package = require(filePath) | ||
| url = package.repository?.url ? "" | ||
| repo = package.repository | ||
| url = if typeof(repo) is 'string' then repo else repo.url ? "" | ||
| if url.length > 0 | ||
| [match, host, user, repo] = url.match(/.*:\/\/(.*)\/(.*)\/(.*)\.git/) | ||
| url = @hostURL(host, user, repo) | ||
| [match, host, user, repoName] = url.match(/.*:\/\/(.*)\/(.*)\/(.*)(\.git)?/) | ||
| url = @hostURL(host, user, repoName) | ||
| else if package.name.toString().length > 0 | ||
@@ -41,0 +42,0 @@ url = "'https://github.com/search?utf8=✓&q=#{package.name}&type=Everything&start_value=1'" |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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
7363
1.45%71
1.43%