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] Security upgrade webpack-dev-server from 3.11.3 to 4.8.0 #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

naiba4
Copy link
Owner

@naiba4 naiba4 commented Feb 11, 2024

This PR was automatically created by Snyk using the credentials of a real user.


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:
    • demo/webpack/package.json

Vulnerabilities that will be fixed

With an upgrade:
Severity Priority Score (*) Issue Breaking Change Exploit Maturity
high severity 220/1000
Why? Confidentiality impact: High, Integrity impact: Low, Availability impact: Low, Scope: Unchanged, Exploit Maturity: Proof of Concept, User Interaction (UI): None, Privileges Required (PR): None, Attack Complexity: Low, Attack Vector: Network, EPSS: 0.00043, Social Trends: No, Days since published: 0, Reachable: No, Transitive dependency: Yes, Is Malicious: No, Business Criticality: High, Provider Urgency: High, Package Popularity Score: 99, Impact: 7.84, Likelihood: 2.81, Score Version: V5
Server-side Request Forgery (SSRF)
SNYK-JS-IP-6240864
Yes Proof of Concept

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

Commit messages
Package name: webpack-dev-server 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


Learn how to fix vulnerabilities with free interactive lessons:

🦉 Server-side Request Forgery (SSRF)

This PR has 2 quantified lines of changes. In general, a change size of upto 200 lines is ideal for the best PR experience!


Quantification details

Label      : Extra Small
Size       : +1 -1
Percentile : 0.8%

Total files changed: 1

Change summary by file extension:
.json : +1 -1

Change counts above are quantified counts, based on the PullRequestQuantifier customizations.

Why proper sizing of changes matters

Optimal pull request sizes drive a better predictable PR flow as they strike a
balance between between PR complexity and PR review overhead. PRs within the
optimal size (typical small, or medium sized PRs) mean:

  • Fast and predictable releases to production:
    • Optimal size changes are more likely to be reviewed faster with fewer
      iterations.
    • Similarity in low PR complexity drives similar review times.
  • Review quality is likely higher as complexity is lower:
    • Bugs are more likely to be detected.
    • Code inconsistencies are more likely to be detected.
  • Knowledge sharing is improved within the participants:
    • Small portions can be assimilated better.
  • Better engineering practices are exercised:
    • Solving big problems by dividing them in well contained, smaller problems.
    • Exercising separation of concerns within the code changes.

What can I do to optimize my changes

  • Use the PullRequestQuantifier to quantify your PR accurately
    • Create a context profile for your repo using the context generator
    • Exclude files that are not necessary to be reviewed or do not increase the review complexity. Example: Autogenerated code, docs, project IDE setting files, binaries, etc. Check out the Excluded section from your prquantifier.yaml context profile.
    • Understand your typical change complexity, drive towards the desired complexity by adjusting the label mapping in your prquantifier.yaml context profile.
    • Only use the labels that matter to you, see context specification to customize your prquantifier.yaml context profile.
  • Change your engineering behaviors
    • For PRs that fall outside of the desired spectrum, review the details and check if:
      • Your PR could be split in smaller, self-contained PRs instead
      • Your PR only solves one particular issue. (For example, don't refactor and code new features in the same PR).

How to interpret the change counts in git diff output

  • One line was added: +1 -0
  • One line was deleted: +0 -1
  • One line was modified: +1 -1 (git diff doesn't know about modified, it will
    interpret that line like one addition plus one deletion)
  • Change percentiles: Change characteristics (addition, deletion, modification)
    of this PR in relation to all other PRs within the repository.


Was this comment helpful? 👍  :ok_hand:  :thumbsdown: (Email)
Customize PullRequestQuantifier for this repository.

Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/webpack-dev-server@4.15.1 environment, eval, network Transitive: filesystem, shell, unsafe +452 27.4 MB evilebottnawi

🚮 Removed packages: npm/webpack-dev-server@3.11.3

View full report↗︎

Copy link

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSource
Filesystem access npm/is-docker@2.2.1
Environment variable access npm/open@8.4.2
Filesystem access npm/open@8.4.2
Shell access npm/open@8.4.2
Environment variable access npm/picocolors@1.0.0
Environment variable access npm/picocolors@1.0.0
Filesystem access npm/webpack-dev-middleware@5.3.3
Network access npm/http-proxy-middleware@2.0.6
Dynamic require npm/default-gateway@6.0.3
Filesystem access npm/fs-monkey@1.0.5
Debug access npm/fs-monkey@1.0.5
Environment variable access npm/schema-utils@4.2.0
Environment variable access npm/schema-utils@4.2.0
Deprecated npm/memfs@3.6.0
  • Reason: this will be v4
Filesystem access npm/memfs@3.6.0
Filesystem access npm/memfs@3.6.0
Network access npm/webpack-dev-server@4.15.1
Network access npm/webpack-dev-server@4.15.1
Dynamic require npm/webpack-dev-server@4.15.1
Dynamic require npm/webpack-dev-server@4.15.1
Dynamic require npm/webpack-dev-server@4.15.1
Environment variable access npm/webpack-dev-server@4.15.1
Environment variable access npm/webpack-dev-server@4.15.1
Environment variable access npm/webpack-dev-server@4.15.1
Network access npm/webpack-dev-server@4.15.1
Uses eval npm/webpack-dev-server@4.15.1
Shell access npm/launch-editor@2.6.1
Environment variable access npm/launch-editor@2.6.1
Filesystem access npm/launch-editor@2.6.1
Environment variable access npm/launch-editor@2.6.1
Environment variable access npm/launch-editor@2.6.1
Floating dependency npm/@types/express@4.17.21
Floating dependency npm/@types/express@4.17.21
Floating dependency npm/@types/express@4.17.21
Floating dependency npm/@types/body-parser@1.19.5
Floating dependency npm/@types/body-parser@1.19.5
Floating dependency npm/@types/connect@3.4.38
Floating dependency npm/@types/http-proxy@1.17.14
Floating dependency npm/@types/bonjour@3.5.13
Floating dependency npm/@types/serve-static@1.15.5
Floating dependency npm/@types/serve-static@1.15.5
Floating dependency npm/@types/serve-static@1.15.5
Floating dependency npm/@types/serve-index@1.9.4
Floating dependency npm/@types/sockjs@0.3.36
Floating dependency npm/@types/send@0.17.4
Floating dependency npm/@types/connect-history-api-fallback@1.5.4
Floating dependency npm/@types/connect-history-api-fallback@1.5.4
Floating dependency npm/@types/ws@8.5.10
Environment variable access npm/ws@8.16.0
Environment variable access npm/ws@8.16.0
Floating dependency npm/@types/node-forge@1.3.11
Floating dependency npm/@types/express-serve-static-core@4.17.43
Floating dependency npm/@types/express-serve-static-core@4.17.43
Floating dependency npm/@types/express-serve-static-core@4.17.43
Floating dependency npm/@types/express-serve-static-core@4.17.43

View full report↗︎

Next steps

What is filesystem access?

Accesses the file system, and could potentially read sensitive data.

If a package must read the file system, clarify what it will read and ensure it reads only what it claims to. If appropriate, packages can leave file system access to consumers and operate on data passed to it instead.

What is environment variable access?

Package accesses environment variables, which may be a sign of credential stuffing or data theft.

Packages should be clear about which environment variables they access, and care should be taken to ensure they only access environment variables they claim to.

What is shell access?

This module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.

Packages should avoid accessing the shell which can reduce portability, and make it easier for malicious shell access to be introduced.

What is network access?

This module accesses the network.

Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use.

What is dynamic require?

Dynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.

Packages should avoid dynamic imports when possible. Audit the use of dynamic require to ensure it is not executing malicious or vulnerable code.

What is debug access?

Uses debug, reflection and dynamic code execution features.

Removing the use of debug will reduce the risk of any reflection and dynamic code execution.

What is a deprecated package?

The maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.

Research the state of the package and determine if there are non-deprecated versions that can be used, or if it should be replaced with a new, supported solution.

What is eval?

Package uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.

Avoid packages that use eval, since this could potentially execute any code.

What are floating dependencies?

Package has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.

Packages should specify properly semver ranges to avoid version conflicts.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

  • @SocketSecurity ignore npm/is-docker@2.2.1
  • @SocketSecurity ignore npm/open@8.4.2
  • @SocketSecurity ignore npm/picocolors@1.0.0
  • @SocketSecurity ignore npm/webpack-dev-middleware@5.3.3
  • <

Copy link

sonarcloud bot commented Feb 11, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants