+12
-0
@@ -28,2 +28,10 @@ const cacache = require('cacache') | ||
| const checkoutError = (expected, found) => { | ||
| const err = new Error(`Commit mismatch: expected SHA ${expected} and cloned HEAD ${found}`) | ||
| err.code = 'EGITCHECKOUT' | ||
| err.sha = expected | ||
| err.head = found | ||
| return err | ||
| } | ||
| class GitFetcher extends Fetcher { | ||
@@ -263,2 +271,6 @@ constructor (spec, opts) { | ||
| ) | ||
| // if we already have a resolved sha ensure it doesn't change | ||
| if (this.resolvedSha && this.resolvedSha !== sha) { | ||
| throw checkoutError(this.resolvedSha, sha) | ||
| } | ||
| this.resolvedSha = sha | ||
@@ -265,0 +277,0 @@ if (!this.resolved) { |
+1
-1
| { | ||
| "name": "pacote", | ||
| "version": "21.3.0", | ||
| "version": "21.3.1", | ||
| "description": "JavaScript package downloader", | ||
@@ -5,0 +5,0 @@ "author": "GitHub Inc.", |
Network access
Supply chain riskThis module accesses the network.
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 4 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
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 4 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
76132
0.54%1598
0.69%