Showing 7 of 11 total issues

Function clone has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

function clone(x) {
  let i;

  if(!x || typeof x !== 'object') {
    return x;
Severity: Minor
Found in source/util/clone/index.js - About 1 hr to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Avoid too many return statements within this function.
Open

  return x;
Severity: Major
Found in source/util/clone/index.js - About 30 mins to fix

    tough-cookie Regular Expression Denial of Service
    Open

            "tough-cookie": {
              "version": "2.3.2",
              "bundled": true,
              "dev": true,
              "optional": true,
    Severity: Minor
    Found in package-lock.json by nodesecurity

    Regular Expression Denial of Service

    Overview:

    The tough-cookie module is vulnerable to regular expression denial of service. Input of around 50k characters is required for a slow down of around 2 seconds.

    Unless node was compiled using the -DHTTPMAXHEADER_SIZE= option the default header max length is 80kb so the impact of the ReDoS is limited to around 7.3 seconds of blocking.

    At the time of writing all version <=2.3.2 are vulnerable

    Recommendation:

    Please update to version 2.3.3 or greater

    marked Regular Expression Denial of Service
    Open

        "marked": {
          "version": "0.3.17",
          "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.17.tgz",
          "integrity": "sha512-+AKbNsjZl6jFfLPwHhWmGTqE009wTKn3RTmn9K8oUKHrX/abPJjtcRtXpYB/FFrwPJRUA86LX/de3T0knkPCmQ==",
          "dev": true
    Severity: Minor
    Found in package-lock.json by nodesecurity

    Regular Expression Denial of Service

    Overview:

    The marked module is vulnerable to a regular expression denial of service. Based on the information published in the public issue, 1k characters can block for around 6 seconds.

    Recommendation:

    Consider another markdown parser until the issue can be addressed.

    debug Regular Expression Denial of Service
    Open

            "debug": {
              "version": "2.6.8",
              "bundled": true,
              "dev": true,
              "optional": true,
    Severity: Minor
    Found in package-lock.json by nodesecurity

    Regular Expression Denial of Service

    Overview:

    The debug module is vulnerable to regular expression denial of service when untrusted user input is passed into the o formatter. It takes around 50k characters to block for 2 seconds making this a low severity issue.

    Recommendation:

    Upgrade to version 2.6.9 or greater if you are on the 2.6.x series or 3.1.0 or greater.

    TODO found
    Open

    // TODO: also call subset
    Severity: Minor
    Found in source/slice/index.js by fixme

    TODO found
    Open

    // TODO: Bench against
    Severity: Minor
    Found in source/some/index.js by fixme
    Severity
    Category
    Status
    Source
    Language