Skip to content

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

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

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

Conversation

@snyk-bot
Copy link

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:
Severity Priority Score (*) Issue Breaking Change Exploit Maturity
high severity 544/1000
Why? Proof of Concept exploit, Recently disclosed, CVSS 7.3
Prototype Pollution
SNYK-JS-Y18N-1021887
Yes Proof 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

guardrails bot commented Nov 18, 2020

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

Hard-Coded Secrets (5)

const API_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)

const benchmark = require(paths.shift())({ test });

var spawn = require('child_process').spawn;

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

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

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

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

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

const childProcess = require('child_process');

const childProcess = require('child_process');

const execSync = require('child_process').execSync;

const childProcess = require('child_process');

const childProcess = require('child_process');

const lintConfiguration = require(path.join(

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

const childProcess = require('child_process');

const packageMetadata = require(path.join(

const childProcess = require('child_process');

const childProcess = require('child_process');

const metadata = require(metadataPath);

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

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

JSON.stringify(require(packageJsonFilePath))

const packageJSON = require(packageJsonFilePath);

const childProcess = require('child_process');

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

const appMetadata = require(packageJsonPath);

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

const childProcess = require('child_process');

const childProcess = require('child_process');

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

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

const ChildProcess = require('child_process');

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

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

const ChildProcess = require('child_process');

const testRunner = require(path.join(

const AtomApplication = require(path.join(

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

const transpiler = require(transpilerPath);

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

this.mainModule = require(mainModulePath);

require(nativeModulePath);

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

atom/src/pane.js

Line 1372 in 05318da

const errorMatch = /ENOTDIR, not a directory '([^']+)'/.exec(

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

const handler = require(taskPath);

this.languageModule = require(languageModulePath);

const childProcess = require('child_process');

: require(initScriptPath);

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


Insecure File Management (501)

const REPEATED_TEXT = fs

if (fs.existsSync(candidate)) {

const realPath = await this.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(

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

await atom.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');

const controlFileTemplate = fs.readFileSync(

fs.writeFileSync(

const desktopEntryTemplate = fs.readFileSync(

fs.writeFileSync(

if (fs.existsSync(rpmPackageDirPath)) {

const rpmPackageSpecsTemplate = fs.readFileSync(

fs.writeFileSync(rpmPackageSpecFilePath, rpmPackageSpecsContents);

const desktopEntryTemplate = fs.readFileSync(

fs.writeFileSync(

for (let generatedArch of fs.readdirSync(rpmPackageRpmsDirPath)) {

const generatedPackageFileNames = 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);

return fs.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 (let packageKeymapName of fs.readdirSync(packageKeymapsPath)) {

packageNewMetadata.keymaps[relativePath] = CSON.readFileSync(

if (fs.existsSync(packageMenusPath)) {

for (let packageMenuName of fs.readdirSync(packageMenusPath)) {

packageNewMetadata.menus[relativePath] = CSON.readFileSync(

packageNewMetadata.settings[relativePath] = CSON.readFileSync(

if (fs.existsSync(menuPath)) {

return CSON.readFileSync(menuPath);

for (let keymapName of fs.readdirSync(keymapsPath)) {

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

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

fs.writeFileSync(

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)) {

const desktopEntryTemplate = fs.readFileSync(

fs.writeFileSync(desktopEntryPath, desktopEntryContents);

if (fs.existsSync(atomBinDestinationPath)) {

fs.lstatSync(apmBinDestinationPath);

fs.symlinkSync(

fs.chmodSync(installationDirPath, '755');

fs.symlinkSync(

fs.writeFileSync(

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

fs.renameSync(

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

fs.renameSync(packageOutputDirPath, packagedAppPath);

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

fs.renameSync(packageOutputDirPath, packagedAppPath);

const atomCmdTemplate = fs.readFileSync(

fs.writeFileSync(

fs.readFileSync(lessFilePath, 'utf8')

fs.readFileSync(lessFilePath, 'utf8')

fs.readFileSync(lessFilePath, 'utf8')

let lessSource = fs.readFileSync(lessFilePath, 'utf8');

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

fs.writeFileSync(


fs.unlinkSync(coffeePath);

fs.writeFileSync(

fs.unlinkSync(csonPath);

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



const inputCode = 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');

await env1.workspace.open(filePath1);

await env1.workspace.open(filePath2);

await env1.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)

const tempDir = fs.realpathSync(temp.mkdirSync());

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

fs.writeFileSync(filePath, content);

fs.utimesSync(filePath, utime, utime);

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

await atom.workspace.open(item);

await atom.workspace.open(item);

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

await atom.workspace.open(item1);

await atom.workspace.open(item2);

await atom.workspace.open(item3);

await atom.workspace.open(item);

await atom.workspace.open(item);

await atom.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(

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

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

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

fs.writeFileSync(

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 = await atom.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(

const filePathContents = fs.readFileSync(filePath, 'utf8');

fs.writeFileSync(

fs.writeFileSync(

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

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

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

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

await scenario.open(parseCommandLine(['a']));

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

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

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

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

await scenario.open(parseCommandLine(['b']));

await scenario.open(parseCommandLine([]));

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

await scenario.open(parseCommandLine(['a']));

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

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

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

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

await scenario.open(parseCommandLine([]));

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

await scenario.open(parseCommandLine(['a']));

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

await scenario.open(parseCommandLine(['b']));

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

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

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

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

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

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

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

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

await scenario.open(parseCommandLine([]));

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

await scenario.open(parseCommandLine(['a']));

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

await scenario.open(parseCommandLine(['b']));

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

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

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

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

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

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

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

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

await scenario.open(parseCommandLine([]));

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

await scenario.open(parseCommandLine(['a']));

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

await scenario.open(parseCommandLine(['b']));

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

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

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

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

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

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

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

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

const w1 = await scenario.open(

await scenario.open(

await scenario.open(

const [w1, w2] = await scenario.open(

const w1 = await scenario.open(parseCommandLine(['--new-window']));

const w2 = await scenario.open(parseCommandLine(['--new-window']));

const w3 = await scenario.open(

const [uw] = await scenario.open(

const [uw] = await scenario.open(

const w1 = await scenario.open(

const w2 = await scenario.open(

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

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

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

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

await scenario.open(

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

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

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

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

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

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

const w1 = await scenario.open(parseCommandLine(['b']));

const app0 = await AtomApplication.open({ createApplication, version });

const app1 = await AtomApplication.open({ createApplication, version });

const app0 = await AtomApplication.open({ createApplication, version });

const app1 = await AtomApplication.open({

const app0 = await AtomApplication.open({ createApplication, version });

const app1 = await AtomApplication.open({

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

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

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

const w = await scenario.open(parseCommandLine(['b']));

const w1 = await scenario.open(parseCommandLine(['b']));

const w1 = await scenario.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');

const writeFile = promisify(fs.writeFile);

const mkdir = promisify(fs.mkdir);

const appendFile = promisify(fs.appendFile);

const realpath = promisify(fs.realpath);

const tempMkdir = 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'))

const remaining = new Set(paths.map(p => fs.realpathSync(p)));

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

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

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

fs.mkdirSync(projectSubDirPath);

const SAMPLE_TEXT = fs.readFileSync(

const editor1 = await atom.workspace.open(

const editor2 = await atom.workspace.open(

const editor1 = await atom.workspace.open(path.join(path1, 'main.js'));

const editor2 = await atom.workspace.open(path.join(path2, 'main.js'));

const editor1 = await atom.workspace.open(

const editor2 = await atom.workspace.open(

const editor2 = await atom.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}');

const text = 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 })

await atom.workspace.open(item);

await atom.workspace.open(item);

await atom.workspace.open(item);

await atom.workspace.open(item);

await atom.workspace.open(item);

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

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

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

await atom.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');

const editor = await atom.workspace.open(temp.openSync().path);

fs.mkdirSync(aDir2);

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

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

await atom.workspace.open({

await atom.workspace.open({

const stat = util.promisify(fs.stat);

return this.applicationDelegate.open(params);

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

return Promise.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, new Date().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);

return CSON.readFileSync(filePath);

var sourceCode = fs.readFileSync(filePath, 'utf8');

return fs.readFileSync(cachePath, 'utf8');

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

var sourceCode = 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);

const gitFileBuff = fs.readFileSync(gitFile, 'utf8');

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

const commonDirPathBuff = fs.readFileSync(commonDirFile.getPath());

const commonDirPathBuff = await fs.readFile(commonDirFile.getPath());

repo = GitRepository.open(gitDirPath, {

const git = 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)) {

return fs.readFileSync(socketSecretPath, 'utf8');

const writeFile = promisify(fs.writeFile);

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

const configFilePath = 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))

const readStream = fs.createReadStream(source);

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

let packageJson = 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'))) {

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

const configFileData = CSON.readFileSync(configFilePath);

const childMetadata = JSON.parse(fs.readFileSync(childMetadataPath));

const metadata = JSON.parse(fs.readFileSync(metadataPath));

modulePath = fs.realpathSync(modulePath);

const metadata = JSON.parse(fs.readFileSync(metadataPath));

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

const packageNames = 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 free to 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