Skip to content

[Snyk] Security upgrade yargs from 4.8.1 to 16.0.0 - #36

Open
snyk-bot wants to merge 1 commit into
masterfrom
snyk-fix-70ca26fda1fc52c185bbc0e4456cf198
Open

[Snyk] Security upgrade yargs from 4.8.1 to 16.0.0#36
snyk-bot wants to merge 1 commit into
masterfrom
snyk-fix-70ca26fda1fc52c185bbc0e4456cf198

Conversation

@snyk-bot

Copy link
Copy Markdown

Snyk has created this PR to fix one or more vulnerable packages in the `npm` dependencies of this project.

Changes included in this PR

  • Changes to the following files to upgrade the vulnerable dependencies to a fixed version:
    • script/package.json
    • script/package-lock.json

Vulnerabilities that will be fixed

With an upgrade:
SeverityPriority Score (*)IssueBreaking ChangeExploit Maturity
high severity544/1000
Why? Proof of Concept exploit, Recently disclosed, CVSS 7.3
Prototype Pollution
SNYK-JS-Y18N-1021887
YesProof of Concept

(*) Note that the real score may have changed since the PR was raised.

Commit messages
Package name: yargs The new version differs by 250 commits.

See the full diff

Check the changes in this PR to ensure they won't cause issues with your project.


Note:You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.

For more information:
🧐 View latest project report

🛠 Adjust project settings

📚 Read more about Snyk's upgrade and patch logic

@guardrails

Copy link
Copy Markdown

⚠️ We detected security issues in this pull request:
Mode: paranoid | Total findings: 723 | Considered vulnerability: 127

Hard-Coded Secrets (5)

constAPI_KEY='7ddca14cb60cbd1cd12d1b252473b076';

"merge_commit_sha": "e5bd3914e2e596debea16f433f57875b5b90bcd6",

"sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",

'ef046e9eecaa5255ea5e9817132d4001724d6ae1'

'd2b0ad9cbc6f6c4372e8956e5cc5af771b2342e5'

More info on how to fix Hard-Coded Secrets in General.


Insecure Use of Dangerous Function (49)

constbenchmark=require(paths.shift())({ test });

varspawn=require('child_process').spawn;

constappMetadata=require(path.join(repositoryRootPath,'package.json'));

constapmMetadata=require(path.join(apmRootPath,'package.json'));

const{ spawnSync }=require('child_process');

constmoduleLine=/MODULE[^]+[^]+([0-9A-F]+)(.*)\n/.exec(

Object.assign(classes,require(apiJSONPath).classes);

constchildProcess=require('child_process');

constchildProcess=require('child_process');

constexecSync=require('child_process').execSync;

constchildProcess=require('child_process');

constchildProcess=require('child_process');

constlintConfiguration=require(path.join(

const{ spawn }=require('child_process');

constchildProcess=require('child_process');

constpackageMetadata=require(path.join(

constchildProcess=require('child_process');

constchildProcess=require('child_process');


constpackageJSON=require(path.join(repositoryRootPath,'package.json'));

constpackageJSON=require(path.join(repositoryRootPath,'package.json'));

JSON.stringify(require(packageJsonFilePath))

constpackageJSON=require(packageJsonFilePath);

constchildProcess=require('child_process');

const{ spawn }=require('child_process');

constappMetadata=require(packageJsonPath);

constappMetadata=require(path.join(repositoryRootPath,'package.json'));

constchildProcess=require('child_process');

constchildProcess=require('child_process');

const{ spawn }=require('child_process');

if(fs.isFileSync(userInitScriptPath))require(userInitScriptPath);

constChildProcess=require('child_process');

constpackageMetadata=require(path.join(packageRoot,'package.json'));

conststart=require(path.join(resourcePath,'src','main-process','start'));

constChildProcess=require('child_process');

consttestRunner=require(path.join(

constAtomApplication=require(path.join(

metadata=require(`${directoryPath}${path.sep}package.json`);

consttranspiler=require(transpilerPath);

this.mainModule=require(this.packageManager.packagesCache[this.name]

this.mainModule=require(mainModulePath);

require(nativeModulePath);

({ version }=require(`${nativeModulePath}/package.json`));

consterrorMatch=/ENOTDIR,notadirectory'([^']+)'/.exec(

const{ spawn }=require('child_process');

consthandler=require(taskPath);

this.languageModule=require(languageModulePath);

constchildProcess=require('child_process');

: require(initScriptPath);

More info on how to fix Insecure Use of Dangerous Function in Javascript.


Insecure File Management (501)


if(fs.existsSync(candidate)){

constrealPath=awaitthis.realpath(candidate);

fs.realpath(path,function(error,realpath){

atom.open({pathsToOpen: [pathToOpen]});

atom.workspace.open(ViewURI);


this.watchFile(path.join(this.stylesheetsPath,filePath));

if(!watchedPaths.includes(stylesheet))this.watchFile(stylesheet);

atom.workspace.open(path.join(projectPath,'sample.js'))


atom.workspace.open(path.join(projectPath,'sample.txt'))


atom.workspace.open(VIEW_URI);

expect(atom.workspace.open).toHaveBeenCalledWith(

awaitatom.workspace.open(path.join(projectPath,'package.json'));

awaitatom.workspace.open(CONSENT_URI);

atom.workspace.open(WELCOME_URI,{split: 'left'}),

atom.workspace.open(GUIDE_URI,{split: 'right'})

return!external&&fs.existsSync(localNpmBinPath)

if(fs.existsSync(nodeModulesBackupPath)){

if(!fs.existsSync(nodeModulesPath)){

if(fs.existsSync(nodeModulesPath)){

if(!fs.existsSync(nodeModulesBackupPath)){

if(fs.existsSync(nodeModulesPath)){

fs.renameSync(nodeModulesBackupPath,nodeModulesPath);

if(fs.existsSync(CONFIG.buildOutputPath)){

if(fs.existsSync(outputArchivePath)){

fs.lstatSync(p).isSymbolicLink()

? path.resolve(nodeModulesPath,fs.readlinkSync(p))

if(fs.existsSync(debianPackageDirPath)){

if(fs.existsSync(`${debianPackageDirPath}.deb`)){

if(fs.existsSync(debianPackageDirPath)){

fs.chmodSync(debianPackageAtomDirPath,'755');


fs.chmodSync(path.join(debianPackageAtomDirPath,'chrome-sandbox'),'4755');

constcontrolFileTemplate=fs.readFileSync(


constdesktopEntryTemplate=fs.readFileSync(


if(fs.existsSync(rpmPackageDirPath)){

constrpmPackageSpecsTemplate=fs.readFileSync(

fs.writeFileSync(rpmPackageSpecFilePath,rpmPackageSpecsContents);

constdesktopEntryTemplate=fs.readFileSync(

fs.writeFileSync(

for(letgeneratedArchoffs.readdirSync(rpmPackageRpmsDirPath)){

constgeneratedPackageFileNames=fs.readdirSync(generatedArchDirPath);

if(process.arch==='x64'&&fs.existsSync(releasesPath)){

fs.renameSync(releasesPath,`${releasesPath}-x64`);

fs.unlinkSync(nupkgPath);

fs.renameSync(nupkgPath,newNupkgPath);

if(fs.existsSync(path.join(p,'msbuild.exe'))){

fs.writeFileSync(FINGERPRINT_PATH,fingerprint);

returnfs.existsSync(FINGERPRINT_PATH)

? fs.readFileSync(FINGERPRINT_PATH,'utf8')

fs.writeFileSync(destinationPath,response.body);

fs.writeFileSync(symbolFilePath,content);

fs.writeFileSync(generatedJSONPath,JSON.stringify(api,null,2));

fs.writeFileSync(

fs.writeFileSync(

fs.readFileSync(packageMetadataPath,'utf8')

if(fs.existsSync(packageKeymapsPath)){

for(letpackageKeymapNameoffs.readdirSync(packageKeymapsPath)){

packageNewMetadata.keymaps[relativePath]=CSON.readFileSync(

if(fs.existsSync(packageMenusPath)){

for(letpackageMenuNameoffs.readdirSync(packageMenusPath)){

packageNewMetadata.menus[relativePath]=CSON.readFileSync(

packageNewMetadata.settings[relativePath]=CSON.readFileSync(

if(fs.existsSync(menuPath)){

returnCSON.readFileSync(menuPath);

for(letkeymapNameoffs.readdirSync(keymapsPath)){

keymaps[path.basename(keymapPath)]=CSON.readFileSync(keymapPath);

fs.readFileSync(path.join(CONFIG.intermediateAppPath,'package.json'))


fs.writeFileSync(snapshotScriptPath,minification.code);

fs.unlinkSync(destinationPath);


fs.readFileSync(

if(fs.existsSync(installationDirPath)){

fs.readdirSync(baseIconThemeDirPath).forEach(size=>{

if(fs.existsSync(iconPath)){

fs.readdirSync(appIconsPath).forEach(imageName=>{

if(fs.existsSync(desktopEntryPath)){

constdesktopEntryTemplate=fs.readFileSync(

fs.writeFileSync(desktopEntryPath,desktopEntryContents);

if(fs.existsSync(atomBinDestinationPath)){

fs.lstatSync(apmBinDestinationPath);


fs.chmodSync(installationDirPath,'755');


fs.writeFileSync(

if(fs.existsSync(packagedAppPath))fs.removeSync(packagedAppPath);


if(fs.existsSync(packagedAppPath))fs.removeSync(packagedAppPath);

fs.renameSync(packageOutputDirPath,packagedAppPath);

if(fs.existsSync(packagedAppPath))fs.removeSync(packagedAppPath);

fs.renameSync(packageOutputDirPath,packagedAppPath);

constatomCmdTemplate=fs.readFileSync(

fs.writeFileSync(

fs.readFileSync(lessFilePath,'utf8')

fs.readFileSync(lessFilePath,'utf8')

fs.readFileSync(lessFilePath,'utf8')

letlessSource=fs.readFileSync(lessFilePath,'utf8');

fs.readFile(path,'utf8',(error,content)=>{



fs.unlinkSync(coffeePath);


fs.unlinkSync(csonPath);

if(fs.existsSync(intermediatePackageBackup.nodeModulesPath)){



constinputCode=fs.readFileSync(pegJsPath,'utf8');

fs.writeFileSync(jsPath,outputCode);

fs.unlinkSync(pegJsPath);

packageJson=JSON.parse(fs.readFileSync(packageJsonFilePath,'utf-8'));



if(!fs.existsSync(buildPath)||!fs.existsSync(packageJsonPath)){

'package[package_file]': fs.createReadStream(packageDetails.filePath)

Body: fs.createReadStream(assetPath)

fs.writeFileSync(oldReleaseNotesPath,oldReleaseNotes,'utf8');

if(!fs.existsSync(extractedNodePath)){

fs.writeFileSync(runScriptPath,runScript);

expect(atom.workspace.open).toHaveBeenCalledWith(null,{

expect(atom.workspace.open).not.toHaveBeenCalled();

expect(atom.workspace.open).not.toHaveBeenCalled();

expect(atom.workspace.open).not.toHaveBeenCalled();

fs.writeFileSync(filePath1,'abc');

fs.writeFileSync(filePath2,'def');

fs.writeFileSync(filePath3,'ghi');

awaitenv1.workspace.open(filePath1);

awaitenv1.workspace.open(filePath2);

awaitenv1.workspace.open(filePath3);

expect(atom.workspace.open).toHaveBeenCalledWith(__filename);

expect(atom.open).toHaveBeenCalledWith({

if(!fs.existsSync(portableAtomHomePath)){

fs.mkdirSync(portableAtomHomePath);

fs.chmodSync(portableAtomHomePath,444);

fs.mkdirSync(tempAtomConfigPath);

fs.mkdirSync(electronUserDataPath);

fs.mkdirSync(electronUserDataPath);

fs.chmodSync(electronUserDataPath,444);

fs.chmodSync(electronUserDataPath,666);

fs.writeFileSync(atomBinPath,'');

fs.writeFileSync(apmBinPath,'');

fs.chmodSync(atomBinPath,'755');

fs.chmodSync(apmBinPath,'755');

expect(fs.realpathSync(installedAtomPath)).toBe(

fs.realpathSync(atomBinPath)

expect(fs.realpathSync(installedApmPath)).toBe(

fs.realpathSync(apmBinPath)

expect(fs.realpathSync(installedAtomPath)).toBe(

fs.realpathSync(atomBinPath)

expect(fs.realpathSync(installedApmPath)).toBe(

fs.realpathSync(apmBinPath)

expect(fs.realpathSync(installedAtomPath)).toBe(

fs.realpathSync(atomBinPath)

expect(fs.realpathSync(installedApmPath)).toBe(

fs.realpathSync(apmBinPath)

consttempDir=fs.realpathSync(temp.mkdirSync());

path1=path.join(fs.realpathSync(temp.mkdirSync()),'the-config.cson');

fs.writeFileSync(filePath,content);

fs.utimesSync(filePath,utime,utime);

awaitatom.workspace.open(item,{activatePane: false});

awaitatom.workspace.open(item);

awaitatom.workspace.open(item);

awaitatom.workspace.open(item,{activatePane: false});

awaitatom.workspace.open(item1);

awaitatom.workspace.open(item2);

awaitatom.workspace.open(item3);

awaitatom.workspace.open(item);

awaitatom.workspace.open(item);

awaitatom.workspace.open(item);

fs.writeFileSync(path.join(dirPath,'.git','objects'),'');

fs.writeFileSync(path.join(dirPath,'.git','HEAD'),'');

fs.writeFileSync(path.join(dirPath,'.git','refs'),'');


fs.writeFileSync(path.join(dirPath,'.git','objects'),'');

fs.writeFileSync(path.join(dirPath,'.git','HEAD'),'');

fs.writeFileSync(path.join(dirPath,'.git','refs'),'');


expect(GitRepository.open(path.join(temp.dir,'nogit.txt'))).toBeNull();

fs.writeFileSync(filePath,'change');

fs.writeFileSync(newPath,"i'm new here");

fs.writeFileSync(filePath,'ch ch changes');

fs.writeFileSync(filePath,'ch ch changes');

expect(fs.readFileSync(filePath,'utf8')).toBe('');

fs.writeFileSync(filePath,'ch ch changes');

fs.writeFileSync(filePath,'ch ch changes');

editor=awaitatom.workspace.open(filePath);

expect(fs.readFileSync(filePath,'utf8')).toBe('');

expect(fs.readFileSync(filePath,'utf8')).toBe('');

fs.writeFileSync(filePath,'');

fs.writeFileSync(filePath,'abc');

fs.writeFileSync(filePath,'abc');

fs.writeFileSync(cleanPath,'Full of text');

fs.writeFileSync(newPath,'');

fs.writeFileSync(modifiedPath,'making this path modified');

fs.mkdirSync(subDir);

fs.writeFileSync(filePath,'');

fs.writeFileSync(modifiedPath,'making this path modified');

fs.writeFileSync(modifiedPath,originalContent);

fs.writeFileSync(editor.getPath(),'changed');

fs.writeFileSync(editor.getPath(),'changed');

fs.renameSync(

constfilePathContents=fs.readFileSync(filePath,'utf8');

fs.writeFileSync(

fs.writeFileSync(

season.writeFileSync(path.join(atomHome,'config.cson'),{

fs.writeFileSync(filePath,'',{encoding: 'utf8'});

awaitclient.execute(filePath=>atom.workspace.open(filePath),filePath);

awaitscenario.open(parseCommandLine(['a/1.md']));

awaitscenario.open(parseCommandLine(['a']));

awaitscenario.open(parseCommandLine(['--add','a/1.md']));

awaitscenario.open(parseCommandLine(['--add','a']));

awaitscenario.open(parseCommandLine(['--new-window','a/1.md']));

awaitscenario.open(parseCommandLine(['--new-window','a']));

awaitscenario.open(parseCommandLine(['b']));

awaitscenario.open(parseCommandLine([]));

awaitscenario.open(parseCommandLine(['a/1.md']));

awaitscenario.open(parseCommandLine(['a']));

awaitscenario.open(parseCommandLine(['--add','a/1.md']));

awaitscenario.open(parseCommandLine(['--add','a']));

awaitscenario.open(parseCommandLine(['--new-window','a/1.md']));

awaitscenario.open(parseCommandLine(['--new-window','a']));

awaitscenario.open(parseCommandLine([]));

awaitscenario.open(parseCommandLine(['a/1.md']));

awaitscenario.open(parseCommandLine(['a']));

awaitscenario.open(parseCommandLine(['b/2.md']));

awaitscenario.open(parseCommandLine(['b']));

awaitscenario.open(parseCommandLine(['--add','a/1.md']));

awaitscenario.open(parseCommandLine(['--add','a']));

awaitscenario.open(parseCommandLine(['--add','b/2.md']));

awaitscenario.open(parseCommandLine(['--add','b']));

awaitscenario.open(parseCommandLine(['--new-window','a/1.md']));

awaitscenario.open(parseCommandLine(['--new-window','a']));

awaitscenario.open(parseCommandLine(['--new-window','b/2.md']));

awaitscenario.open(parseCommandLine(['--new-window','b']));

awaitscenario.open(parseCommandLine([]));

awaitscenario.open(parseCommandLine(['a/1.md']));

awaitscenario.open(parseCommandLine(['a']));

awaitscenario.open(parseCommandLine(['b/2.md']));

awaitscenario.open(parseCommandLine(['b']));

awaitscenario.open(parseCommandLine(['--add','a/1.md']));

awaitscenario.open(parseCommandLine(['--add','a']));

awaitscenario.open(parseCommandLine(['--add','b/2.md']));

awaitscenario.open(parseCommandLine(['--add','b']));

awaitscenario.open(parseCommandLine(['--new-window','a/1.md']));

awaitscenario.open(parseCommandLine(['--new-window','a']));

awaitscenario.open(parseCommandLine(['--new-window','b/2.md']));

awaitscenario.open(parseCommandLine(['--new-window','b']));

awaitscenario.open(parseCommandLine([]));

awaitscenario.open(parseCommandLine(['a/1.md']));

awaitscenario.open(parseCommandLine(['a']));

awaitscenario.open(parseCommandLine(['b/2.md']));

awaitscenario.open(parseCommandLine(['b']));

awaitscenario.open(parseCommandLine(['--add','a/1.md']));

awaitscenario.open(parseCommandLine(['--add','a']));

awaitscenario.open(parseCommandLine(['--add','b/2.md']));

awaitscenario.open(parseCommandLine(['--add','b']));

awaitscenario.open(parseCommandLine(['--new-window','a/1.md']));

awaitscenario.open(parseCommandLine(['--new-window','a']));

awaitscenario.open(parseCommandLine(['--new-window','b/2.md']));

awaitscenario.open(parseCommandLine(['--new-window','b']));

constw1=awaitscenario.open(



const[w1,w2]=awaitscenario.open(

constw1=awaitscenario.open(parseCommandLine(['--new-window']));

constw2=awaitscenario.open(parseCommandLine(['--new-window']));

constw3=awaitscenario.open(

const[uw]=awaitscenario.open(

const[uw]=awaitscenario.open(

constw1=awaitscenario.open(

constw2=awaitscenario.open(

const[uw]=awaitscenario.open(parseCommandLine([uri]));

const[uw]=awaitscenario.open(parseCommandLine([uri]));

awaitscenario.open(parseCommandLine(['a/1.md:10']));

awaitscenario.open(parseCommandLine('b/2.md:12:5'));


assert.isFalse(w._locations[0].exists);

awaitscenario.open(parseCommandLine('b/2.md:: '));

awaitscenario.open(parseCommandLine(['--new-window']));

awaitscenario.open(parseCommandLine(['--test','c']));

awaitscenario.open(parseCommandLine(['--benchmark','b']));

awaitscenario.open(parseCommandLine(['a/1.md']));

constw1=awaitscenario.open(parseCommandLine(['b']));

constapp0=awaitAtomApplication.open({ createApplication, version });

constapp1=awaitAtomApplication.open({ createApplication, version });

constapp0=awaitAtomApplication.open({ createApplication, version });

constapp1=awaitAtomApplication.open({

constapp0=awaitAtomApplication.open({ createApplication, version });

constapp1=awaitAtomApplication.open({

w1=awaitscenario.open(parseCommandLine(['--new-window']));

w2=awaitscenario.open(parseCommandLine(['--new-window','b']));

awaitscenario.open(parseCommandLine(['c','b']));

constw=awaitscenario.open(parseCommandLine(['b']));

constw1=awaitscenario.open(parseCommandLine(['b']));

constw1=awaitscenario.open(parseCommandLine(['b']));



fs.writeFileSync(filePath,'some content');

fs.writeFileSync(filePath,'changed');

assert.equal(fs.readFileSync(filePath,'utf8'),'changed');

fs.writeFileSync(filePath,'some content');

fs.writeFileSync(filePath,'changed');

assert.equal(fs.readFileSync(filePath,'utf8'),'changed');

assert.equal(fs.readFileSync(filePath,'utf8'),'changed');

fs.writeFileSync(filePath,'some content');

fs.writeFileSync(filePath,'changed');

assert.equal(fs.readFileSync(filePath,'utf8'),'some content');

fs.writeFileSync(filePath,'A');

fs.writeFileSync(filePath,'B');

fs.writeFileSync(filePath,'C');

assert.equal(fs.readFileSync(filePath,'utf8'),'A');

fs.writeFileSync(filePath,'D');

fs.writeFileSync(filePath,'E');

fs.writeFileSync(filePath,'F');

assert.equal(fs.readFileSync(filePath,'utf8'),'D');

fs.writeFileSync(filePath,'content');

fs.writeFileSync(

fs.symlinkSync(packageSymLinkedSource,destination,'junction');

constwriteFile=promisify(fs.writeFile);

constmkdir=promisify(fs.mkdir);

constappendFile=promisify(fs.appendFile);

constrealpath=promisify(fs.realpath);

consttempMkdir=promisify(temp.mkdir);

fs.mkdirSync(childPath);

fs.rmdirSync(childPath);

fs.writeFileSync(childPath,'surprise!\n');

waitsForPromise(()=>atom.workspace.open(pathToOpen));

fs.mkdirSync(pathToOpen);

fs.writeFileSync(pathToOpen,'');

waitsForPromise(()=>atom.workspace.open(pathToOpen));

fs.chmodSync(pathToOpen,'000');

fs.writeFileSync(pathToOpen,'');

waitsForPromise(()=>atom.workspace.open(pathToOpen));

fs.unlinkSync(pathToOpen);

waitsForPromise(()=>atom.workspace.open(pathToOpen));

atom.workspace.open(require.resolve('./fixtures/dir/a')).then(o=>{

atom.workspace.open(absolutePath).then(o=>{

atom.workspace.open(absolutePath).then(o=>{

atom.workspace.open(absolutePath).then(o=>{

atom.workspace

fs.realpathSync(path.join(directory2,'.git'))

fs.realpathSync(path.join(directory3,'.git'))

constremaining=newSet(paths.map(p=>fs.realpathSync(p)));

fs.writeFileSync(fileThree,'three\n');

fs.writeFileSync(fileTwo,'two\n');

fs.writeFileSync(fileOne,'one\n');

fs.mkdirSync(projectSubDirPath);

constSAMPLE_TEXT=fs.readFileSync(

consteditor1=awaitatom.workspace.open(

consteditor2=awaitatom.workspace.open(

consteditor1=awaitatom.workspace.open(path.join(path1,'main.js'));

consteditor2=awaitatom.workspace.open(path.join(path2,'main.js'));

consteditor1=awaitatom.workspace.open(

consteditor2=awaitatom.workspace.open(

consteditor2=awaitatom.workspace.open(editor.getPath());

fs.writeFileSync(editor.getPath(),'new stuff');

expect(element.textContent).toBe(fs.readFileSync(cssPath,'utf8'));

fs.writeFileSync(

fs.writeFileSync(userStylesheetPath,'body {border-style: dashed}');

consttext=fs.readFileSync(

atom.workspace.open({

atom.workspace.open({

atom.workspace.open({

atom.workspace.open(ITEM_URI,{searchAllPanes: true})

waitsForPromise(()=>atom.workspace.open(ITEM_URI));

atom.workspace.open(ITEM_URI,{searchAllPanes: true})

awaitatom.workspace.open(item);

awaitatom.workspace.open(item);

awaitatom.workspace.open(item);

awaitatom.workspace.open(item);

awaitatom.workspace.open(item);

returnworkspace.open(pathToOpen,{hey: 'there'}).then(item=>

waitsForPromise(()=>workspace.open(__filename));

workspace.open(absolutePath).then(e=>{

awaitatom.workspace.open(editor);

fs.renameSync(

fs.writeFileSync(ignoredPath,'this match should not be included');

if(fs.existsSync(projectPath)){

fs.mkdirSync(path.join(projectPath,'poop'));

fs.writeFileSync(ignoredPath,'this match should be included');

fs.symlinkSync(

if(fs.existsSync(projectPath)){

fs.writeFileSync(path.join(projectPath,'.hidden'),'ccc');

if(fs.existsSync(projectPath)){

fs.writeFileSync(filePath,'match this');

consteditor=awaitatom.workspace.open(temp.openSync().path);

fs.mkdirSync(aDir2);

fs.writeFileSync(file2,'ccc aaaa');

expect(fs.existsSync(missingPath)).toBeFalsy();

awaitatom.workspace.open({

awaitatom.workspace.open({

conststat=util.promisify(fs.stat);

returnthis.applicationDelegate.open(params);

open: paths=>this.open({pathsToOpen: paths})

returnPromise.all(filesToOpen.map(file=>this.workspace.open(file)));

this.open({

Promise.all(filesToOpen.map(file=>this.workspace.open(file)))

this.workspace.open(pathToOpen,{ initialLine, initialColumn })

fs.writeFileSync(testFilePath,newDate().toISOString(),{flag: 'w+'});

fs.unlinkSync(testFilePath);

if(fs.existsSync(portableHomePath)){

if(fs.existsSync(electronUserDataPath)){

fs.readlink(destinationPath,(error,realpath)=>{

fs.unlink(destinationPath,error=>{

fs.symlink(sourcePath,destinationPath,callback);

packagePath=fs.realpathSync(packagePath);

packagePath=fs.realpathSync(packagePath);

returnCSON.readFileSync(filePath);

varsourceCode=fs.readFileSync(filePath,'utf8');

returnfs.readFileSync(cachePath,'utf8');

fs.writeFileSync(cachePath,code,'utf8');

varsourceCode=fs.readFileSync(filePath,'utf8');

CSON.writeFile(this.path,data,error=>{

if(!fs.existsSync(this.path)){

CSON.writeFileSync(this.path,{},{flag: 'wx'});

CSON.readFile(this.path,(error,data)=>{

atom.workspace.open(filename,{

if(!fs.existsSync(this.blobMapFilename)){

if(!fs.existsSync(this.blobFilename)){

this.storedBlob=fs.readFileSync(this.blobFilename);

this.storedBlobMap=JSON.parse(fs.readFileSync(this.blobMapFilename));

fs.writeFileSync(this.lockFilename,'LOCK',{flag: 'wx'});

fs.writeFileSync(this.blobFilename,blobToStore);

fs.writeFileSync(this.blobMapFilename,mapToStore);

fs.unlinkSync(this.lockFilename);

constgitFileBuff=fs.readFileSync(gitFile,'utf8');

fs.readFile(gitFile,'utf8',(err,gitFileBuff)=>{

constcommonDirPathBuff=fs.readFileSync(commonDirFile.getPath());

constcommonDirPathBuff=awaitfs.readFile(commonDirFile.getPath());

repo=GitRepository.open(gitDirPath,{

constgit=this.open(path);

this.repo=GitUtils.open(path);

contents=fs.readFileSync(filePath,'utf8');

CSON.readFile(grammarPath,(error,params={})=>{

CSON.readFileSync(grammarPath)||{}

if(!fs.existsSync(socketSecretPath)){

returnfs.readFileSync(socketSecretPath,'utf8');

constwriteFile=promisify(fs.writeFile);

(process.platform!=='win32'&&!fs.existsSync(socketPath))

constconfigFilePath=fs.existsSync(

if(fs.existsSync(this.socketPath)){

fs.unlinkSync(this.socketPath);

if(fs.existsSync(socketSecretPath)){

fs.unlinkSync(socketSecretPath);

if(!fs.existsSync(configDirPath)){

if(resourcePath!==this.resourcePath&&!fs.existsSync(resourcePath)){

if(resourcePath!==this.resourcePath&&!fs.existsSync(resourcePath)){

fs.stat(result.pathToOpen,(err,st)=>{

fs.unlink(this.recoveryPath,error=>

fs.stat(path,(error,result)=>resolve(error==null&&result))

constreadStream=fs.createReadStream(source);

constwriteStream=fs.createWriteStream(destination,{ mode });

letpackageJson=CSON.readFileSync(packageJsonPath);

fs.writeFile(atomCommandPath,atomCommand,()=>

fs.writeFile(atomShCommandPath,atomShCommand,()=>

fs.writeFile(apmCommandPath,apmCommand,()=>

fs.writeFile(apmShCommandPath,apmShCommand,()=>callback())

fs.exists(desktopShortcutPath,desktopShortcutExists=>{

exports.existsSync=()=>fs.existsSync(updateDotExe);

AtomApplication.open(args);

if(fs.existsSync(path.join(process.env.ATOM_HOME,'config.json'))){

}elseif(fs.existsSync(path.join(process.env.ATOM_HOME,'config.cson'))){

constconfigFileData=CSON.readFileSync(configFilePath);

constchildMetadata=JSON.parse(fs.readFileSync(childMetadataPath));

constmetadata=JSON.parse(fs.readFileSync(metadataPath));

modulePath=fs.realpathSync(modulePath);

constmetadata=JSON.parse(fs.readFileSync(metadataPath));

fs.writeFileSync(metadataPath,JSON.stringify(metadata,null,2));

constpackageNames=fs

metadata=CSON.readFileSync(metadataPath);

spec._transpilerSource||fs.readFileSync(transpilerPath,'utf8');

CSON.readFileSync(keymapPath,{allowDuplicateKeys: false})||{}

CSON.readFileSync(menuPath)||{}

fs.exists(grammarsDirPath,grammarsDirExists=>{

fs.exists(settingsDirPath,settingsDirExists=>{

CSON.readFile(path,(error,properties={})=>{

this.applicationDelegate.open({ pathsToOpen,here: true});

fs.realpath(givenPath,(err,resolvedPath)=>{

fs.realpath(watchedPath,(err,real)=>{

this.open(this.projects[e.detail.index].paths);


Insecure Use of Regular Expressions (29)
Insecure Processing of Data (92)
Vulnerable Libraries (35)
Insecure Use of Crypto (12)

👉 Go to the dashboard for detailed results.

📥 Happy? Share your feedback with us.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@snyk-bot