You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
awaitprocessExitNotExpected(async()=>awaitpack({ cwd,allowPackageEnvFile: true,packagePath: getVisxOutputPath()}),'Should not have exited');
395
408
});
396
409
397
410
it('should not package file which has a private key',asyncfunction(){
398
411
constcwd=fixture('secrets');
399
412
constignoreFile=path.join(cwd,'secret1Ignore');
400
-
awaitprocessExitExpected(()=>pack({ cwd,packagePath: getVisxOutputPath(), ignoreFile }),'Expected package to throw: file which has a private key should not be packaged');
413
+
awaitprocessExitExpected(async()=>awaitpack({ cwd,packagePath: getVisxOutputPath(), ignoreFile }),'Expected package to throw: file which has a private key should not be packaged');
401
414
});
402
415
403
416
it('allow packaging file which has a private key with --allow-package-secrets',asyncfunction(){
awaitprocessExitNotExpected(async()=>awaitpack({ cwd,allowPackageSecrets: ['privatekey'],packagePath: getVisxOutputPath(), ignoreFile }),'Should not have exited');
407
420
});
408
421
409
422
it('allow packaging file which has a private key with --allow-package-all-secrets',asyncfunction(){
awaitprocessExitNotExpected(async()=>awaitpack({ cwd,allowPackageAllSecrets: true,packagePath: getVisxOutputPath(), ignoreFile }),'Should not have exited');
awaitprocessExitNotExpected(async()=>awaitpack({ cwd,packagePath: getVisxOutputPath(), ignoreFile }),'Should not have exited');
438
+
});
439
+
440
+
it('should not package npm token',asyncfunction(){
441
+
constcwd=fixture('secrets');
442
+
constignoreFile=path.join(cwd,'secret2Ignore');
443
+
awaitprocessExitExpected(async()=>awaitpack({ cwd,packagePath: getVisxOutputPath(), ignoreFile }),'Expected package to throw: should not package npm token');
444
+
});
445
+
446
+
it('npm token false positive 1',asyncfunction(){
447
+
constcwd=fixture('secrets');
448
+
constignoreFile=path.join(cwd,'noSecret3Ignore');
449
+
awaitprocessExitNotExpected(async()=>awaitpack({ cwd,packagePath: getVisxOutputPath(), ignoreFile }),'Should not have exited');
0 commit comments