Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Feb 3, 2021

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added the ⤵️ pull label Feb 3, 2021
@guardrails
Copy link

guardrails bot commented Feb 3, 2021

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

Hard-Coded Secrets (5)

apiKey: 'f6df220f7d246aff64a56300b7f19f21',

Content-Security-Policy: script-src 'self' 'sha256-4RS22DYeB7U14dra4KcQYxmwt5HkOInieXK1NUMBmQI='

在构建过程中,`process.env.VUE_APP_SECRET` 将会被相应的值所取代。在 `VUE_APP_SECRET=secret` 的情况下,它会被替换为 `"secret"`

api-key="db283631f89b5b8a10707311f911fd00"

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


Insecure Use of Regular Expressions (31)

return new RegExp(`"${['.*node_modules', 'core-js', 'modules', mod].join(`[\\${path.sep}]+`)}`)

return deps.length ? new RegExp(deps.join('|')) : null

const matchRE = new RegExp(`^--${argToRemove}$`)

const equalRE = new RegExp(`^--${argToRemove}=`)

const matchRE = new RegExp(`^--${argToRemove}`)

const equalRE = new RegExp(`^--${argToRemove}=`)

var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)

from: new RegExp(`^/${name}`),

.test(/\.(png|jpe?g|gif|webp)(\?.*)?$/)


.test(/\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/)

.test(/\.(woff2?|eot|ttf|otf)(\?.*)?$/i)

return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url)

[/^index\s[\da-zA-Z]+\.\.[\da-zA-Z]+(\s(\d+))?$/, index],

[/^@@\s+-(\d+),?(\d+)?\s+\+(\d+),?(\d+)?\s@@/, chunk],

const t = (/\t.*|\d{4}-\d\d-\d\d\s\d\d:\d\d:\d\d(.\d+)?\s(\+|-)\d\d\d\d/).exec(s)

return s.replace(new RegExp(`^${chars}+`), '')

return text && new RegExp(text.trim().replace(/\s+/g, '.{0,5}'), 'i')

match: /vue-cli-service serve(\s+--\S+(\s+\S+)?)*$/,

match: /vue-cli-service build(\s+--\S+(\s+\S+)?)*$/,

const pluginRe = /^(@?[^@]+)(?:@(.+))?$/

latestVersion: joi.string().regex(/^\d+\.\d+\.\d+(-(alpha|beta|rc)\.\d+)?$/),

const hostRegExp = new RegExp(`^https?://(${host}|${allowedHost}|localhost)(:\\d+)?$`)

const nameRegExp = /^(@?[^@]+)(@.*)?$/

const updatedRE = new RegExp(`'(${Array.from(updatedDeps).join('|')})': '\\^(\\d+\\.\\d+\\.\\d+[^']*)'`)

const commitRE = /^(v\d+\.\d+\.\d+(-(alpha|beta|rc.\d+))?)|((revert: )?(feat|fix|docs|style|refactor|perf|test|workflow|ci|chore|types)(\(.+\))?!?: .{1,50})/

} else if (name.endsWith('.json') || /^\./.test(name) || path.isAbsolute(name)) {

language = languages.find(l => l.test.test(filename))

if (!/^http(s)?:\/\//.test(proxy)) {

rawArgs.splice(i, offset + (equalRE.test(rawArgs[i]) ? 0 : 1))

rawArgs.splice(i, offset + (equalRE.test(rawArgs[i]) ? 0 : 1))

More info on how to fix Insecure Use of Regular Expressions in Javascript.


Insecure File Management (188)

const files = await fs.readdir(path.join(project.dir, 'dist/js'))

const files = await fs.readdir(path.join(project.dir, 'dist/js'))

userOptions = require(userOptionsPath)

fs.stat(source, function (err, stat) {

const isTS = fs.existsSync(path.join(api.getCwd(), 'tsconfig.json'))

if (fs.existsSync(editorConfigTemplatePath)) {

if (fs.existsSync(api.resolve('.editorconfig'))) {

const editorconfig = fs.readFileSync(editorConfigTemplatePath, 'utf-8')

if (!fs.existsSync(api.resolve('.eslintignore')) && !config.ignorePattern) {

fs.writeFileSync(outputFilePath, formatter(report.results))

const pkg = require(api.resolve('package.json'))

if (fs.existsSync(manifestPath)) {

userOptions.manifestOptions = require(manifestPath)

const resetScript = fs.readFileSync(path.resolve(__dirname, 'noopServiceWorker.js'), 'utf-8')

if (!isLegacyBundle && fs.existsSync(publicDir)) {

fs.writeFileSync(path.resolve('/', 'vue.config.js'), '') // only to ensure fs.existsSync returns true

fs.writeFileSync(path.resolve('/', 'vue.config.js'), '')

fs.renameSync(path.resolve(project.dir, 'babel.config.js'), path.resolve(project.dir, 'babel.config.cjs'))

fs.writeFileSync(configPath, 'module.exports = { lintOnSave: true }')

await fs.unlinkSync(configPath)

fs.writeFileSync(configPath, 'module.exports = function () { return { lintOnSave: true } }')

await fs.unlinkSync(configPath)

fs.writeFileSync(configPath, 'export default { lintOnSave: true }')

await fs.unlinkSync(configPath)

fs.writeFileSync(configPath, 'export default { lintOnSave: true }')

await fs.unlinkSync(configPath)

const files = await fs.readdir(path.resolve(project.dir, 'dist'))

const files = await fs.readdir(path.join(project.dir, 'dist/js'))

const files = await fs.readdir(path.join(project.dir, 'dist/js'))

const files = await fs.readdir(path.join(project.dir, 'dist/js'))

const files = await fs.readdir(path.join(project.dir, 'dist/js'))

const jsFiles = (await fs.readdir(path.join(project.dir, 'dist/js'))).filter(f => f.endsWith('.js'))

const files = await fs.readdir(path.join(project.dir, 'dist/js'))

if (!fs.existsSync(absolutePath)) {

return JSON.stringify(require(absolutePath))

return fs.readFileSync(absolutePath, 'utf-8')

return fs.readFileSync(absolutePath, 'utf-8')

apply: require(absolutePath || id)

const buffer = fs.readFileSync(filepath)


const entryContent = fs.readFileSync(fullEntryPath, 'utf-8')

if (fs.existsSync(`/proc/1/cgroup`)) {

const content = fs.readFileSync(`/proc/1/cgroup`, 'utf-8')

htmlOptions.template = fs.existsSync(htmlPath)

const hasDedicatedTemplate = fs.existsSync(api.resolve(templateWithoutLoader))

: fs.existsSync(htmlPath)

if (!isLegacyBundle && fs.existsSync(publicDir)) {

if (fs.existsSync(path.join(context, file))) {

if (resolvedPath && fs.existsSync(resolvedPath)) {

const isPublicFileRequest = fs.existsSync(maybePublicPath) && fs.statSync(maybePublicPath).isFile()

const buf = webpackFs.readFileSync(fullPath)

await fs.writeFile(tempFilename, JSON.stringify(tags))

const legacyAssets = JSON.parse(await fs.readFile(tempFilename, 'utf-8'))

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

Object.assign(exports, require(`./lib/${m}`))

const result = fs.existsSync(lockFile)

const result = fs.existsSync(lockFile)

const result = fs.existsSync(lockFile)


return require(resolvedPath)

if (fs.existsSync(path.join(context, 'package.json'))) {

pkg = require(`${id}/package.json`)

return fs.readFile(path.resolve(projectRoot, file), 'utf-8')

return fs.existsSync(path.resolve(projectRoot, file))

return fs.ensureDir(dir).then(() => fs.writeFile(targetPath, content))

if (!fs.existsSync(outsideTestFolder)) {


sharedData.watch({ id, projectId: this.project.id }, handler)


const rawContent = fs.readFileSync(file.path, { encoding: 'utf8' })

const source = fs.readFileSync(file.path, { encoding: 'utf8' })

fs.writeFileSync(file.path, rawContent, { encoding: 'utf8' })

if (!fs.existsSync(value)) return

return resolvedPath && fs.existsSync(resolvedPath)

return fs.stat(file).then((x) => x.isDirectory())

const files = await fs.readdir(dir, 'utf8')

return fs.existsSync(path.join(file, 'package.json'))


const highlightedContentTo = highlightCode(fileDiff.to, fs.readFileSync(path.resolve(cwd.get(), fileDiff.to), { encoding: 'utf8' })).split('\n')

if (process.env.VUE_APP_CLI_UI_DEV && !watchedTrees.get(root) && fs.existsSync(folder)) {

installed: fs.existsSync(dependencies.getPath({ id, file })),

if (currentView) views.open(currentView.id)

const folder = fs.existsSync(id) ? id : dependencies.getPath({ id, file: pluginApi.cwd })


let data = require(path.join(dependencies.getPath({ id, file: cwd.get() }), 'prompts'))

if (fs.existsSync(project.path)) {

if (currentProject && !fs.existsSync(currentProject.path)) {

if (!input.force && !fs.existsSync(path.join(input.path, 'node_modules'))) {

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

if (fs.existsSync(gitConfigPath)) {

if (fs.existsSync(path.resolve(rootFolder, projectId, `${id}.json`))) {


const { resolvers: r } = require(file)

folderOpen: (root, { path }, context) => folders.open(path, context),

projectOpen: (root, { id }, context) => projects.open(id, context),

projectRename: (root, args, context) => projects.rename(args, context),

taskOpen: (root, { id }, context) => tasks.open(id, context),

viewOpen: (root, { id }, context) => views.open(id, context)

const { types } = require(file)

const module = require(file)

[i18n.locale]: require(`date-fns/locale/${dateFnsLocale}/index.js`)

fs.writeFileSync(path.resolve(templateDir, 'foo.js'), 'foo(<%- options.n %>)')

fs.writeFileSync(path.resolve(templateDir, 'bar/bar.js'), 'bar(<%- m %>)')

fs.writeFileSync(path.resolve(templateDir, 'bar/_bar.js'), '.bar(<%- m %>)')

fs.writeFileSync(path.resolve(templateDir, 'entry.js'), `

fs.writeFileSync(path.resolve(templateDir, 'empty-entry.js'), `;`)

fs.writeFileSync(path.resolve(templateDir, 'main.ts'), `const a: string = 'hello';`)

fs.writeFileSync(path.resolve(templateDir, 'hello.vue'), `

fs.writeFileSync(path.resolve(templateDir, 'replace.js'), `

fs.writeFileSync(path.resolve(templateDir, 'multi-replace-source.js'), `

fs.writeFileSync(path.resolve(templateDir, 'multi-replace.js'), `

fs.writeFileSync(path.resolve(templateDir, '_vscode/config.json'), `{}`)

fs.writeFileSync(path.resolve(templateDir, '_gitignore'), 'foo')

fs.writeFileSync(rcPath, JSON.stringify({

const testFile = await fs.readFile(path.resolve(cwd, name, 'test.js'), 'utf-8')

const pkg = require(path.resolve(cwd, name, 'package.json'))

const testFile = await fs.readFile(path.resolve(cwd, name, 'test.js'), 'utf-8')

const pkg = require(path.resolve(cwd, name, 'package.json'))

const testFile = await fs.readFile(path.resolve(cwd, name, 'test.js'), 'utf-8')

const pkg = require(path.resolve(cwd, name, 'package.json'))

const readme = await fs.readFile(path.resolve(cwd, name, 'README.md'), 'utf-8')

const pkg = require(path.resolve(cwd, name, 'package.json'))

fs.existsSync(path.resolve(process.cwd(), '../@vue')) ||

fs.existsSync(path.resolve(process.cwd(), '../../@vue'))

return (this._entryFile = fs.existsSync(this.resolve('src/main.ts')) ? 'src/main.ts' : 'src/main.js')

return fs.readFileSync(name) // return buffer

const template = fs.readFileSync(name, 'utf-8')

finalTemplate = fs.readFileSync(extendPath, 'utf-8')

fs.writeFileSync(path.resolve(this.context, 'package.json'), JSON.stringify(this.pkg, null, 2))

await fs.writeFile(file, JSON.stringify(config, null, 2), 'utf-8')

await fs.writeFile(file, JSON.stringify(config, null, 2), 'utf-8')

if (fs.existsSync(targetDir) && !options.merge) {

if (fs.existsSync(binPath)) {

if (fs.existsSync(rcPath)) {

cachedOptions = JSON.parse(fs.readFileSync(rcPath, 'utf-8'))

fs.writeFileSync(rcPath, JSON.stringify(options, null, 2))


npmConfig = Object.assign({}, ini.parse(fs.readFileSync(loc, 'utf-8')), npmConfig)

await fs.symlink(src, dest, 'dir')

].map(file => require(`../promptModules/${file}`))

packageJson = fs.readFileSync(packagePath, 'utf-8')

await fs.symlink(src, dest)

await fs.chmod(dest, '755')

return require(moduleName)

const stats = fs.statSync(path)

if (!fs.existsSync(presetPath)) {

const hasGenerator = fs.existsSync(path.join(dir, 'generator.js')) || fs.existsSync(path.join(dir, 'generator/index.js'))

if (!fs.existsSync(rcDir)) {

if (fs.existsSync(rcFile)) {

if (fs.existsSync(properRcFile)) {

? fs.readFileSync(name)

: fs.readFileSync(name, 'utf-8')

return fs.unlink(path.join(directory, filename))

fs.writeFileSync(filePath, files[name])

const files = fs.readdirSync(packagesDir)

if (!fs.existsSync(pkgPath)) {

fs.writeFileSync(pkgPath, JSON.stringify(json, null, 2))

if (!fs.existsSync(readmePath)) {

fs.writeFileSync(readmePath, `# @vue/${pkg}\n\n> ${desc}`)

if (!fs.existsSync(npmIgnorePath)) {

fs.writeFileSync(npmIgnorePath, `__tests__\n__mocks__`)

const configList = fs.readdirSync(path.resolve(__dirname, '../packages/@vue/'))

if (!fs.existsSync(templateDir)) {

fs.mkdirSync(templateDir)

fs.writeFileSync(`${templateDir}/_editorconfig`, content)

const contents = fs.readFileSync(file, { encoding: 'utf8' })

const files = fs.readdirSync(folder)

} else if (fs.statSync(fullPath).isDirectory()) {

newRelease + '\n\n\n' + fs.readFileSync(changelogPath, { encoding: 'utf8' })

fs.writeFileSync(changelogPath, newChangelog)

const entryContent = fs.readFileSync(entryPath)

fs.writeFile(docPath, entryContent, () => { })

fs.readdir(pluginsDirPath, (_, files) => {

fs.writeFileSync(path.resolve(__dirname, '../package.json'), JSON.stringify(pkg, null, 2))

fs.writeFileSync(file, writeCache[file])

const pkg = require(path.resolve(__dirname, '../', filePath))

return require(`../packages/${pkg}/package.json`).version

return version || require(`../packages/${pkg}/package.json`).version

const updated = fs.readFileSync(filePath, 'utf-8')

const msg = require('fs').readFileSync(msgPath, 'utf-8').trim()

`The ${chalk.red('public/manifest.json')} file will be ignored in favor of ${chalk.cyan('pwa.manifestOptions')}`

query = path.resolve(cwd.get(), input.file)

? path.posix.join(options.assetsDir, filePath)

const targetDir = path.join(cwd.get(), input.folder)

const gitConfigPath = path.join(project.path, '.git', 'config')


: path.join(api.getCwd(), 'wdio.sauce.conf.' + (isTS ? 'ts' : 'js'))

? path.join(api.getCwd(), 'wdio.local.conf.' + (isTS ? 'ts' : 'js'))

More info on how to fix Insecure File Management in Javascript.


Information Disclosure (17)


cy.contains('h1', 'Welcome to Your Vue.js <%- hasTS ? '+ TypeScript ' : '' %>App')


.assert.containsText('h1', 'Welcome to Your Vue.js <%- hasTS ? '+ TypeScript ' : '' %>App')


<%- hasTS ? 'export default new App()' : 'module.exports = new App()' %>

<%- hasTS ? 'import App from \'../pageobjects/app.page\'' : 'const App = require(\'../pageobjects/app.page\')' %>

<%- hasTS ? 'const { config } = require(\'./wdio.shared.conf.ts\')' : 'const { config } = require(\'./wdio.shared.conf\')' %>

<%- hasTS ? 'import { config } from \'./wdio.shared.conf.ts\'' : 'const { config } = require(\'./wdio.shared.conf\')' %>






<%_ if (rootOptions.vueVersion === '3') { _%>


More info on how to fix Information Disclosure in Javascript.


Insecure Use of Dangerous Function (18)

const { execSync } = require('child_process')

const execSync = require('child_process').execSync

const result = /\sa\/(.*)\sb\/(.*)/.exec(s)

const t = (/\t.*|\d{4}-\d\d-\d\d\s\d\d:\d\d:\d\d(.\d+)?\s(\+|-)\d\d\d\d/).exec(s)

const cp = require('child_process')

const result = /\?theme=(\w+)/.exec(window.location.href)

const matched = /eslint-config-(\w+)/.exec(name)

const versionString = require('child_process').execSync('wmic datafile where name="C:\\\\Program Files (x86)\\\\Google\\\\Chrome\\\\Application\\\\chrome.exe" get Version /value').toString()

const { execSync } = require('child_process')

const version = execSync(`npm view ${pkg} version`).toString().trim()

execSync('ps cax | grep "Google Chrome"')


execSync('yarn --version', { stdio: 'ignore' })

execSync('git --version', { stdio: 'ignore' })

execSync('git status', { stdio: 'ignore', cwd })

stdio: ['pipe', 'pipe', 'ignore']


const publicHost = publicUrl ? /^[a-zA-Z]+:\/\/([^/?#]+)/.exec(publicUrl)[1] : undefined

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


Insecure Processing of Data (20)

fs.writeFileSync(path.resolve(templateDir, 'foo.js'), 'foo(<%- options.n %>)')

fs.writeFileSync(path.resolve(templateDir, 'bar/bar.js'), 'bar(<%- m %>)')

fs.writeFileSync(path.resolve(templateDir, 'bar/_bar.js'), '.bar(<%- m %>)')

files['foo2.js'] = render('foo(<%- n %>)', options)

files['bar/bar2.js'] = render('bar(<%- n %>)', options)

<title><%- htmlWebpackPlugin.options.libName %> demo</title>

<script src="./<%- htmlWebpackPlugin.options.libName %>.js"></script>

<title><%- htmlWebpackPlugin.options.libName %> demo</title>

<script src="./<%- htmlWebpackPlugin.options.assetsFileName %>.umd.js"></script>

<link rel="stylesheet" href="./<%- htmlWebpackPlugin.options.assetsFileName %>.css">

console.log(<%- htmlWebpackPlugin.options.libName %>)

<title><%- htmlWebpackPlugin.options.libName %> demo</title>

<script src="//unpkg.com/vue@<%- htmlWebpackPlugin.options.vueMajor %>"></script>

<script src="./<%- htmlWebpackPlugin.options.assetsFileName %>.umd.js"></script>

<link rel="stylesheet" href="./<%- htmlWebpackPlugin.options.assetsFileName %>.css">

demo: <%- htmlWebpackPlugin.options.libName %>

demo: <%- htmlWebpackPlugin.options.libName %>

read: ({ source }) => require('js-yaml').load(source),


res.send(`Addon ${id} not found in loaded addons. Try opening a vue-cli project first?`)

More info on how to fix Insecure Processing of Data in Javascript.


Insecure Use of SQL Queries (6)

plugin: (root, { id }, context) => plugins.findOne({ id, file: cwd.get() }, context)

plugin: (task, args, context) => plugins.findOne({ id: task.pluginId, file: task.path }, context),

plugin: (configuration, args, context) => plugins.findOne({ id: configuration.pluginId, file: cwd.get() }, context)

const plugin = plugins.findOne({ id: definition.pluginId, file: cwd.get() }, context)

const plugin = plugins.findOne({ id: view.pluginId, file: cwd.get() }, context)

const projectId = await this.$getProjectId()

More info on how to fix Insecure Use of SQL Queries in Javascript.


👉 Go to the dashboard for detailed results.

📥 Happy? Share your feedback with us.

@pull pull bot added the merge-conflict Resolve conflicts manually label Feb 22, 2021
haoqunjiang and others added 27 commits March 24, 2021 14:04
Respect the existing 'devtool' when running dev server

Fixes #6398
* docs: (ru) config/readme.md update

* docs: (ru) eslint.md update

* docs: (ru) cli-service.md update

* docs: (ru) css.md update

* docs: (ru) mode-and-env.md update

* docs: (ru) deployment.md update

Co-authored-by: Alex Sokolov <[email protected]>
It's messing with the html-webpack-plugin, telling it the wrong hash of
the legacy bundle, therefore making the modern mode fallback unusable.

(TODO: add a test later)
Default Cypress version is now v7
As Vue 3 does not, and likely will not support IE11.

vuejs/rfcs#294
haoqunjiang and others added 30 commits June 15, 2022 20:35
Closes #7024
Fixes #7118

I choose to not merge the PR because I don't want add additional ways
to configure https for dev server (`--http2` command line argument,
`process.env.HTTPS`, etc.)

In the current implementation, `spdy` can only be configured by setting
`{ devServer: server: { type: 'spdy' } }`.
This is a deliberate choice, because SPDY support in Node.js 15+ is
broken anyway. I don't want bother refactoring the old code to
accommodate this broken feature.
It is only served as a fallback version number when local Chrome version
detection failed. Updating the version to the latest may reduce
user frustrations when such rare scenarios are encountered.

Closes #7203
Fixes #7221

`subscriptions-transport-ws` is also deprecated, we need to move to
`graphql-ws` one day.
But better deprecatedthan broken.
The dev dependency `@graphql-eslint/eslint-plugin` is causing CI
failures in Node.js 12
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
vuejs/eslint-config-prettier#11

I would recommend using the ESLint CLI directly over
`@vue/cli-plugin-eslint` at this point.
But for users who are stuck with old versions and still read this
migration guide, they deserve a working link.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⤵️ pull merge-conflict Resolve conflicts manually

Projects

None yet

Development

Successfully merging this pull request may close these issues.