Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Snyk] Upgrade jest from 26.6.0 to 26.6.3 #6

Closed

Conversation

snyk-bot
Copy link

Snyk has created this PR to upgrade jest from 26.6.0 to 26.6.3.

merge advice
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


  • The recommended version is 3 versions ahead of your current version.
  • The recommended version was released 5 months ago, on 2020-11-04.
Release notes
Package name: jest
  • 26.6.3 - 2020-11-04

    Fixes

    • [jest-resolve-dependencies] Continue dependency resolution if mock dependency can't be found (#10779)
  • 26.6.2 - 2020-11-02

    Features

    • [jest-core] Add findRelatedTests and nonFlagArgs in allowed config options for updateConfigAndRun in watch plugins (#10659)

    Fixes

    • [babel-plugin-jest-hoist] Preserve order of hoisted mock nodes within containing block (#10536)
    • [babel-plugin-jest-hoist] Hoist pure constants to support experimental JSX transform in hoisted mocks (#10723)
    • [babel-preset-jest] Update babel-preset-current-node-syntax to support top level await (#10747)
    • [expect] Revert "Fix objectContaining to work recursively into sub-objects (#10508)" (#10766)
    • [jest-circus, jest-jasmine2] fix: don't assume stack is always a string (#10697)
    • [jest-config] Fix bug introduced in watch mode by PR #10678 (#10692)
    • [jest-config] Throw correct error for missing preset modules (#10737)
    • [jest-resolve-dependencies] Resolve mocks as dependencies (#10713)
    • [jest-runtime] Handle file URLs in dynamic imports (#10744)
    • [jest-runtime, babel-jest] Pass more ESM options to @ jest/transform (#10752)
    • [jest-runtime] Properly inject extraGlobals into the runtime (#10758)
    • [jest-transform] Link to ESM docs on syntax errors (#10748)

    Chore & Maintenance

    • [docs] Add docs for using mocks in TypeScript (#10415)
    • [eslint-config-fb-strict] Move package from this repo to fbjs repo (#10739)
    • [examples] Update TypeScript example to show use of newer Jest types (#10399)
    • [jest-cli] chore: standardize files and folder names (#10698)
  • 26.6.1 - 2020-10-23

    Features

    • [jest-runtime] Support named exports from CommonJS as named ES Module imports (#10673)
    • [jest-validate] Add support for recursiveDenylist option as an alternative to recursiveBlacklist (#10236)

    Fixes

    • [expect] Fix objectContaining to work recursively into sub-objects (#10508)
    • [jest-cli, jest-core, jest-config, jest-types] Fix --onlyFailures flag to work in non-watch mode (#10678)
    • [jest-config] Fix for the jest.config.ts compiler to not interfere with tsconfig.json files (#10675)
    • [jest-message-util] Update to work properly with Node 15 (#10660)
    • [jest-mock] Allow to mock methods in getters (TypeScript 3.9 export) (#10156)
  • 26.6.0 - 2020-10-19

    Features

    • [jest-cli, jest-config] Add support for the jest.config.ts configuration file (#10564)

    Fixes

    • [jest-config] Simplify transform RegExp (#10207)
    • [jest-fake-timers] Lazily instantiate mock timers (#10551)
    • [jest-runtime] require.main is no longer undefined when using jest.resetModules (#10626)
    • [@ jest/types] Add missing values for timers (#10632)

    Chore & Maintenance

    • [docs] Add step for fetching backers.json file in website setup docs (#10631)
    • [docs] Add page detailing environment variables set by Jest (#10630)
    • [jest-circus] Refactor callAsyncCircusFn parameters (#10629)
from jest GitHub release notes
Commit messages
Package name: jest

Compare


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

For more information:

🧐 View latest project report

🛠 Adjust upgrade PR settings

🔕 Ignore this dependency or unsubscribe from future upgrade PRs

@mistaken-pull-closer
Copy link

Thanks for your submission.

It appears that you've created a pull request using one of our repository's branches. Since this is
almost always a mistake, we're going to go ahead and close this. If it was intentional, please
let us know what you were intending and we can see about reopening it.

Thanks again!

@mistaken-pull-closer mistaken-pull-closer bot added the invalid This doesn't seem right label Mar 27, 2021
@pull-dog
Copy link

pull-dog bot commented Mar 27, 2021

*Ruff* 🐶 I wasn't able to find any Docker Compose files in your repository at any of the given paths in the pull-dog.json configuration file, or the default docker-compose.yml file 😩 Make sure the given paths are correct.

Files checked:

  • docker-compose.yml
What is this?

Pull Dog is a GitHub app that makes test environments for your pull requests using Docker, from a docker-compose.yml file you specify. It takes 19 seconds to set up (we counted!) and there's a free plan available.

Visit our website to learn more.

Commands
  • @pull-dog up to reprovision or provision the server.
  • @pull-dog down to delete the provisioned server.
Troubleshooting

Need help? Don't hesitate to file an issue in our repository

Configuration

{
  "isLazy": false,
  "dockerComposeYmlFilePaths": [
    "docker-compose.yml"
  ],
  "expiry": "00:00:00",
  "conversationMode": "singleComment"
}

Trace ID
2f63df60-8f42-11eb-893a-63f45da77b95

@guardrails
Copy link

guardrails bot commented Mar 27, 2021

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

Hard-Coded Secrets (12)

2. `git remote set-url origin https://<user>:<token>@github.com/<user>/<repo>` .

apiKey: '3be60f4f8ffc24c75da84857d6323791',

https://github.com/turkdevops/create-react-app/blob/bdb4f74f6991f9c3709923eb64dbf5047e030218/packages/react-error-overlay/fixtures/bundle.mjs#L62
https://github.com/turkdevops/create-react-app/blob/bdb4f74f6991f9c3709923eb64dbf5047e030218/packages/react-error-overlay/fixtures/bundle.mjs#L8103
https://github.com/turkdevops/create-react-app/blob/bdb4f74f6991f9c3709923eb64dbf5047e030218/packages/react-error-overlay/fixtures/bundle.mjs#L15667
https://github.com/turkdevops/create-react-app/blob/bdb4f74f6991f9c3709923eb64dbf5047e030218/packages/react-error-overlay/fixtures/bundle.mjs#L39583
https://github.com/turkdevops/create-react-app/blob/bdb4f74f6991f9c3709923eb64dbf5047e030218/packages/react-error-overlay/fixtures/bundle.mjs.map#L1
https://github.com/turkdevops/create-react-app/blob/bdb4f74f6991f9c3709923eb64dbf5047e030218/packages/react-error-overlay/fixtures/bundle_u.mjs#L62
https://github.com/turkdevops/create-react-app/blob/bdb4f74f6991f9c3709923eb64dbf5047e030218/packages/react-error-overlay/fixtures/bundle_u.mjs#L8239
https://github.com/turkdevops/create-react-app/blob/bdb4f74f6991f9c3709923eb64dbf5047e030218/packages/react-error-overlay/fixtures/bundle_u.mjs#L15827
https://github.com/turkdevops/create-react-app/blob/bdb4f74f6991f9c3709923eb64dbf5047e030218/packages/react-error-overlay/fixtures/bundle_u.mjs#L39709
https://github.com/turkdevops/create-react-app/blob/bdb4f74f6991f9c3709923eb64dbf5047e030218/packages/react-error-overlay/fixtures/bundle_u.mjs.map#L1

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


Insecure Use of Dangerous Function (31)

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

const { name, version } = require(path.join(

const { name, version } = require(path.join(

const packageJson = require(packageJsonPath);

const packageJson = require(packagePath);

cacheIdentifier += require(`${packageName}/package.json`).version;

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

return require(packagePath).name;

const child_process = require('child_process');

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

const ts = require(resolve.sync('typescript', {

config = require(paths.appJsConfig);

require(resolveApp('package.json')).homepage,

const appPackageJson = require(paths.appPackageJson);


const appPackage = require(paths.appPackageJson);

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

const ownPackage = require(path.join(ownPath, 'package.json'));

const appPackage = require(path.join(appPath, 'package.json'));

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

const appPackage = require(path.join(appPath, 'package.json'));

templateJson = require(templateJsonPath);

const react = require(require.resolve('react', { paths: [paths.appPath] }));

const appName = require(paths.appPackageJson).name;

const proxySetting = require(paths.appPackageJson).proxy;

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

const overrides = Object.assign({}, require(paths.appPackageJson).jest);


const cprocess = require('child_process');

const cp = require('child_process');

const data = require(cast);

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


Insecure File Management (111)


const nodeArgs = fs.existsSync(pnpPath) ? ['--require', pnpPath] : [];

const currentFiles = fs.readdirSync(path.join(root));

const remainingFiles = fs.readdirSync(path.join(root));

stream = fs.createReadStream(installPackage);

if (!fs.existsSync(packageJsonPath)) {

fs.writeFileSync(packagePath, JSON.stringify(packageJson, null, 2) + os.EOL);


const stats = fs.lstatSync(path.join(root, file));

fs.readdirSync(root).forEach(file => {

var fileContents = fs.readFileSync(path.join(root, asset.name));

var contents = fs.readFileSync(fileName);

const isPublicFileRequest = fs.existsSync(maybePublicPath);

const pkg = JSON.parse(fs.readFileSync(filePath));

fs.writeFileSync(filePath, JSON.stringify(pkg, null, 2) + os.EOL);

if (!fs.existsSync(fileName)) {

if (!fs.existsSync(`${globalModules}/serve`)) {

const source = file && fs.existsSync(file) && fs.readFileSync(file, 'utf-8');



















if (fs.existsSync(dotenvFile)) {

const appDirectory = fs.realpathSync(process.cwd());



const hasTsConfig = fs.existsSync(paths.appTsConfig);

const hasJsConfig = fs.existsSync(paths.appJsConfig);

config = ts.readConfigFile(paths.appTsConfig, ts.sys.readFile).config;

const appDirectory = fs.realpathSync(process.cwd());

fs.existsSync(resolveFn(`${filePath}.${extension}`))

fs.existsSync(reactScriptsPath) &&

fs.lstatSync(reactScriptsPath).isSymbolicLink();

const useTypeScript = fs.existsSync(paths.appTsConfig);


if (fs.existsSync(paths.proxySetup)) {


const useYarn = fs.existsSync(paths.yarnLockFile);

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


.filter(file => fs.lstatSync(file).isFile())

fs.mkdirSync(path.join(appPath, folder));

let content = fs.readFileSync(file, 'utf8');

fs.writeFileSync(file.replace(ownPath, appPath), content);


if (fs.existsSync(paths.appTypeDeclarations)) {

let content = fs.readFileSync(paths.appTypeDeclarations, 'utf8');

fs.readFileSync(paths.ownTypeDeclarations, 'utf8').trim() + os.EOL;


if (fs.existsSync(paths.yarnLockFile)) {

windowsCmdFileContent = fs.readFileSync(windowsCmdFilePath);

if (windowsCmdFileContent && !fs.existsSync(windowsCmdFilePath)) {

fs.writeFileSync(windowsCmdFilePath, windowsCmdFileContent);

const useYarn = fs.existsSync(path.join(appPath, 'yarn.lock'));

if (fs.existsSync(templateJsonPath)) {


const readmeExists = fs.existsSync(path.join(appPath, 'README.md'));


if (fs.existsSync(templateDir)) {

const readme = fs.readFileSync(path.join(appPath, 'README.md'), 'utf8');


const gitignoreExists = fs.existsSync(path.join(appPath, '.gitignore'));

const data = fs.readFileSync(path.join(appPath, 'gitignore'));

fs.appendFileSync(path.join(appPath, '.gitignore'), data);

fs.unlinkSync(path.join(appPath, 'gitignore'));

const useYarn = fs.existsSync(paths.yarnLockFile);

const useTypeScript = fs.existsSync(paths.appTsConfig);

const setupTestsFile = fs.existsSync(paths.testsSetup)

if (!fs.existsSync(maybeNodeModules)) {


if (!fs.existsSync(maybeDepPackageJson)) {

fs.readFileSync(maybeDepPackageJson, 'utf8')



const isYarn = fs.existsSync(paths.yarnLockFile);


if (!fs.existsSync(paths.appTypeDeclarations)) {


fse.mkdirSync(temp);

fse.writeFileSync(path.join(temp, 'package.json'), '{}');

fs.readdirSync(packagesDir).forEach(name => {

if (fs.existsSync(packageJson)) {

const json = JSON.parse(fs.readFileSync(packageJson, 'utf8'));

fs.writeFileSync(packageJson, JSON.stringify(json, null, 2), 'utf8');

fs.writeFileSync(cast, JSON.stringify(data, null, ' '));

const disablePnp = fs.existsSync(path.resolve(fixturePath, '.disable-pnp'));

fs.mkdirSync(path.join(...tsPackagePath.slice(0, 2)));

fs.mkdirSync(path.join(...tsPackagePath.slice(0, 3)));

fs.mkdirSync(path.join(...tsPackagePath.slice(0, 4)));

fs.writeFileSync(path.join(...tsPackagePath));

expect(fs.existsSync(tsConfigPath)).toBe(false);

fs.mkdirSync(path.join(...dtsSrcPath.slice(0, 3)));

fs.writeFileSync(path.join(...dtsSrcPath));

expect(fs.existsSync(tsConfigPath)).toBe(false);


expect(fs.existsSync(tsConfigPath)).toBe(true);

.exec(fs.readFileSync(cssFile, 'utf8'))

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


Insecure Use of Regular Expressions (16)

version.match(/^file:(.*)?$/)[1]

template.match(/^file:(.*)?$/)[1]

const packageMatch = template.match(/^(@[^/]+\/)?([^@]+)?(@.+)?$/);

/^.+\/(.+?)(?:-\d+.+)?\.(tgz|tar\.gz)$/

name: installPackage.match(/([^/]+)\.git(#.*)?$/)[1],

const installPackagePath = installPackage.match(/^file:(.*)?$/)[1];

new RegExp('%' + escapeStringRegexp(key) + '%', 'g'),

pathname.replace(new RegExp('^' + servedPathname), '')

const parsingError = /Line (\d+):(?:(\d+):)?\s*Parsing error: (.+)$/.exec(


const base64 = /^data:application\/json;([\w=:"-]+;)*base64,/;

const filePathRegex = /^\.(\/[^/\n ]+)+\.[^/\n ]+$/;

const regexExtractLocation = /\(?(.+?)(?::(\d+))?(?::(\d+))?\)?$/;

/ line (\d+)(?: > eval line \d+)* > (eval|Function):\d+:\d+/g,

const regex = new RegExp(binKey + ' (\\w+)', 'g');

/\bv?(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-[\da-z-]+(?:\.[\da-z-]+)*)?(?:\+[\da-z-]+(?:\.[\da-z-]+)*)?\b/gi;

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


Insecure Use of Language/Framework API (1)

<code style={codeStyle} dangerouslySetInnerHTML={codeBlock} />

More info on how to fix Insecure Use of Language/Framework API in Javascript.


Information Disclosure (1)

More info on how to fix Information Disclosure in Javascript.


👉 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
invalid This doesn't seem right
Projects
None yet
1 participant