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] Fix for 1 vulnerabilities #37

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

Conversation

naiba4
Copy link
Owner

@naiba4 naiba4 commented Mar 25, 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 `yarn` dependencies of this project.

Changes included in this PR

  • Changes to the following files to upgrade the vulnerable dependencies to a fixed version:
    • contracts/package.json

Note for zero-installs users

If you are using the Yarn feature zero-installs that was introduced in Yarn V2, note that this PR does not update the .yarn/cache/ directory meaning this code cannot be pulled and immediately developed on as one would expect for a zero-install project - you will need to run yarn to update the contents of the ./yarn/cache directory.
If you are not using zero-install you can ignore this as your flow should likely be unchanged.

⚠️ Warning
Failed to update the yarn.lock, please update manually before merging.

Vulnerabilities that will be fixed

With an upgrade:
Severity Priority Score (*) Issue Breaking Change Exploit Maturity
high severity 170/1000
Why? Confidentiality impact: None, Integrity impact: None, Availability impact: High, Scope: Unchanged, Exploit Maturity: Proof of Concept, User Interaction (UI): None, Privileges Required (PR): None, Attack Complexity: Low, Attack Vector: Network, EPSS: 0.01055, Social Trends: No, Days since published: 0, Reachable: No, Transitive dependency: Yes, Is Malicious: No, Business Criticality: High, Provider Urgency: High, Package Popularity Score: 98, Impact: 5.99, Likelihood: 2.83, Score Version: V5
Prototype Pollution
SNYK-JS-WEB3UTILS-6229337
Yes Proof of Concept

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

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:

🦉 Prototype Pollution

This PR has 4 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       : +2 -2
Percentile : 1.6%

Total files changed: 1

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

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

🚨 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
Environment variable access npm/argparse@2.0.1
  • orphan: npm/argparse@2.0.1
Filesystem access npm/argparse@2.0.1
  • orphan: npm/argparse@2.0.1
Filesystem access npm/request@2.88.2
  • orphan: npm/request@2.88.2
Network access npm/request@2.88.2
  • orphan: npm/request@2.88.2
Network access npm/request@2.88.2
  • orphan: npm/request@2.88.2
Network access npm/request@2.88.2
  • orphan: npm/request@2.88.2
Environment variable access npm/request@2.88.2
  • orphan: npm/request@2.88.2
Deprecated npm/request@2.88.2
  • orphan: npm/request@2.88.2
Mild CVE npm/request@2.88.2
  • orphan: npm/request@2.88.2
Unmaintained npm/regex-not@1.0.2
  • Last Publish: 2/20/2018, 2:31:14 AM
Unmaintained npm/repeat-string@1.6.1
  • Last Publish: 10/23/2016, 4:54:00 PM
Filesystem access npm/y18n@5.0.8
  • orphan: npm/y18n@5.0.8
Unmaintained npm/resolve-url@0.2.1
  • Last Publish: 2/25/2014, 6:48:50 PM
  • orphan: npm/resolve-url@0.2.1
Deprecated npm/resolve-url@0.2.1
  • Reason: https://github.com/lydell/resolve-url#deprecated
  • orphan: npm/resolve-url@0.2.1
Uses eval npm/regenerator-runtime@0.11.1
  • orphan: npm/regenerator-runtime@0.11.1
Filesystem access npm/yargs-parser@20.2.4
  • orphan: npm/yargs-parser@20.2.4
Environment variable access npm/yargs-parser@20.2.4
  • orphan: npm/yargs-parser@20.2.4
Environment variable access npm/yargs-parser@20.2.4
  • orphan: npm/yargs-parser@20.2.4
Dynamic require npm/yargs-parser@20.2.4
  • orphan: npm/yargs-parser@20.2.4
Unmaintained npm/resumer@0.0.0
  • Last Publish: 5/17/2013, 10:20:55 PM
  • orphan: npm/resumer@0.0.0
Dynamic require npm/solidity-coverage@0.8.11

View full report↗︎

Next steps

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 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 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 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 a mild CVE?

Contains a low severity Common Vulnerability and Exposure (CVE).

Remove or replace dependencies that include known low severity CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

What are unmaintained packages?

Package has not been updated in more than 5 years and may be unmaintained. Problems with the package may go unaddressed.

Package should publish periodic maintenance releases if they are maintained, or deprecate if they have no intention in further maintenance.

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 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.

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/argparse@2.0.1
  • @SocketSecurity ignore npm/request@2.88.2
  • @SocketSecurity ignore npm/regex-not@1.0.2
  • @SocketSecurity ignore npm/repeat-string@1.6.1
  • @SocketSecurity ignore npm/y18n@5.0.8
  • @SocketSecurity ignore npm/resolve-url@0.2.1
  • @SocketSecurity ignore npm/regenerator-runtime@0.11.1
  • @SocketSecurity ignore npm/yargs-parser@20.2.4
  • @SocketSecurity ignore npm/resumer@0.0.0
  • @SocketSecurity ignore npm/solidity-coverage@0.8.11

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