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

Threat detected: Coinminer.JS.MALb (flatmap-stream) #2861

Closed
jpmnteiro opened this issue Nov 30, 2018 · 9 comments
Closed

Threat detected: Coinminer.JS.MALb (flatmap-stream) #2861

jpmnteiro opened this issue Nov 30, 2018 · 9 comments
Assignees
Labels
good first issue Good for newcomers pkg/server This is due to an issue in the packages/server directory type: security 🔐 Security related
Milestone

Comments

@jpmnteiro
Copy link

jpmnteiro commented Nov 30, 2018

Current behavior:

Unable to extract cypress because a dependency (flatmap-stream) is compromised.

Desired behavior:

To be able to extract cypress without errors from an AV software.

Steps to reproduce:

Pre-requisites: have an anti-virus software (TrendMicro in my case)

  1. Download the archive from the endpoint supplied below
  2. Extract the contents
  3. Extraction process is halted because a threat is detected.

Problematic file:

.\Cypress\resources\app\packages\server\node_modules\flatmap-stream\test\data.js

flatmap-stream has been removed from npm

Versions

Latest version, downloaded from https://cdn.cypress.io/desktop/3.1.2/win64/cypress.zip

Further information

Looking at the package-lock.json in .\Cypress\resources\app\packages\server\, it seems like flatmap-stream is being pulled, indirectly, by nodemon

@paul-sachs
Copy link

paul-sachs commented Nov 30, 2018

There also seems to be an issue in the dev dependencies for cypress:

npm ls event-stream flatmap-stream

  • @cypress/npm-run-all@4.0.4
    • ps-tree@1.1.0
      • event-stream@3.3.6
        • flatmap-stream@0.1.2

It's less of a concern due to it being a dev dep, but still alarming. I tried looking into npm-run-all but the cypress fork has not been updated in a while. The original package no longer depends on ps-tree.

@jpmnteiro
Copy link
Author

jpmnteiro commented Nov 30, 2018

Interesting, nodemon is also a dev dependency on the server.

Why would the production package on the CDN contain the development dependencies?

@jpmnteiro
Copy link
Author

Still no word official word about this? (cc @chrisbreiding)

@jennifer-shehane jennifer-shehane added the type: security 🔐 Security related label Dec 4, 2018
@jennifer-shehane
Copy link
Member

Thanks for opening this issue. I do indeed see that pstree.remy is being installed at version 1.1.0 which has the vulnerability. I've notified our server team.

@jennifer-shehane jennifer-shehane added pkg/server This is due to an issue in the packages/server directory good first issue Good for newcomers stage: ready for work The issue is reproducible and in scope priority: high❗️ labels Dec 4, 2018
@chrisbreiding chrisbreiding self-assigned this Dec 4, 2018
@chrisbreiding chrisbreiding added this to the Sprint 14 milestone Dec 4, 2018
@chrisbreiding
Copy link
Contributor

We've updgraded the necessary dependencies to either remove event-stream or lock it at 3.3.4, removing flatmap-stream from the dependency chain. This will be released in the next version of Cypress.

@jpmnteiro
Copy link
Author

@chrisbreiding Do you have a release date?

@chrisbreiding
Copy link
Contributor

chrisbreiding commented Dec 4, 2018

Can't promise a date, but if not today, then certainly sometime this week.

We're still looking into why a dev dependency made it into the production binary, as that should not happen. Seems that it only happens with the windows binary and it's only nodemon, no other dev dependencies. On second look, it appears to have all the dev dependencies, at least from packages/server.

@bahmutov
Copy link
Contributor

bahmutov commented Dec 4, 2018

Let me open a new issue about devDependencies present in the built Windows binary

@brian-mann
Copy link
Member

Released in 3.1.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers pkg/server This is due to an issue in the packages/server directory type: security 🔐 Security related
Projects
None yet
Development

No branches or pull requests

6 participants