daavelino/vulnerability-catalog

View on GitHub

Showing 340 of 888 total issues

Function _dc has 6014 lines of code (exceeds 25 allowed). Consider refactoring.
Open

(function() { function _dc(d3, crossfilter) {
'use strict';

/**
 * The entire dc.js library is scoped under the **dc** name space. It does not introduce
Severity: Major
Found in base/catalog/static/js/dc.js - About 1 mo to fix

    File d3.v3.js has 9543 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    !function() {
      var d3 = {
        version: "3.5.17"
      };
      var d3_arraySlice = [].slice, d3_array = function(list) {
    Severity: Major
    Found in base/catalog/static/js/d3.v3.js - About 1 mo to fix

      File emojis.js has 9014 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      // NOTE: Source: npm package: emojilib, file:emojis.json
      window.tinymce.emoticons_plugin_database = {
        grinning: {
          keywords: [ "face", "smile", "happy", "joy", ":D", "grin" ],
          "char": "\ud83d\ude00",
      Severity: Major
      Found in base/catalog/static/tinymce/plugins/emoticons/js/emojis.js - About 3 wks to fix

        File dc.js has 6030 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /*!
         *  dc 2.1.9
         *  http://dc-js.github.io/dc.js/
         *  Copyright 2012-2016 Nick Zhu & the dc.js Developers
         *  https://github.com/dc-js/dc.js/blob/master/AUTHORS
        Severity: Major
        Found in base/catalog/static/js/dc.js - About 2 wks to fix

          Function 6 has 1087 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          },{"./identity":10}],6:[function(require,module,exports){
          'use strict';
          
          var xfilterArray = require('./array');
          var xfilterFilter = require('./filter');
          Severity: Major
          Found in base/catalog/static/js/crossfilter.js - About 5 days to fix

            Function crossfilter has 1045 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function crossfilter() {
              var crossfilter = {
                add: add,
                remove: removeData,
                dimension: dimension,
            Severity: Major
            Found in base/catalog/static/js/crossfilter.js - About 5 days to fix

              File crossfilter.js has 1906 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.crossfilter = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
              module.exports = require("./src/crossfilter").crossfilter;
              
              },{"./src/crossfilter":6}],2:[function(require,module,exports){
              (function (global){
              Severity: Major
              Found in base/catalog/static/js/crossfilter.js - About 5 days to fix

                Function dimension has 854 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  function dimension(value, iterable) {
                
                    if (typeof value === 'string') {
                      var accessorPath = value;
                      value = function(d) { return result(d, accessorPath); };
                Severity: Major
                Found in base/catalog/static/js/crossfilter.js - About 4 days to fix

                  Function coordinateGridMixin has 765 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  dc.coordinateGridMixin = function (_chart) {
                      var GRID_LINE_CLASS = 'grid-line';
                      var HORIZONTAL_CLASS = 'horizontal';
                      var VERTICAL_CLASS = 'vertical';
                      var Y_AXIS_LABEL_CLASS = 'y-axis-label';
                  Severity: Major
                  Found in base/catalog/static/js/dc.js - About 3 days to fix

                    Function baseMixin has 633 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    dc.baseMixin = function (_chart) {
                        _chart.__dcFlag__ = dc.utils.uniqueId();
                    
                        var _dimension;
                        var _group;
                    Severity: Major
                    Found in base/catalog/static/js/dc.js - About 3 days to fix

                      Function pieChart has 405 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      dc.pieChart = function (parent, chartGroup) {
                          var DEFAULT_MIN_ANGLE_FOR_LABEL = 0.5;
                      
                          var _sliceCssClass = 'pie-slice';
                          var _labelCssClass = 'pie-label';
                      Severity: Major
                      Found in base/catalog/static/js/dc.js - About 2 days to fix

                        Function group has 357 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function group(key) {
                              var group = {
                                top: top,
                                all: all,
                                reduce: reduce,
                        Severity: Major
                        Found in base/catalog/static/js/crossfilter.js - About 1 day to fix

                          Function compositeChart has 324 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          dc.compositeChart = function (parent, chartGroup) {
                          
                              var SUB_CHART_CLASS = 'sub';
                              var DEFAULT_RIGHT_Y_AXIS_LABEL_PADDING = 12;
                          
                          
                          Severity: Major
                          Found in base/catalog/static/js/dc.js - About 1 day to fix

                            Function 2 has 320 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            },{"./src/crossfilter":6}],2:[function(require,module,exports){
                            (function (global){
                            /**
                             * lodash (Custom Build) <https://lodash.com/>
                             * Build: `lodash modularize exports="npm" -o ./`
                            Severity: Major
                            Found in base/catalog/static/js/crossfilter.js - About 1 day to fix

                              Function lineChart has 319 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              dc.lineChart = function (parent, chartGroup) {
                                  var DEFAULT_DOT_RADIUS = 5;
                                  var TOOLTIP_G_CLASS = 'dc-tooltip';
                                  var DOT_CIRCLE_CLASS = 'dot';
                                  var Y_AXIS_REF_LINE_CLASS = 'yRef';
                              Severity: Major
                              Found in base/catalog/static/js/dc.js - About 1 day to fix

                                Function brush has 277 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  d3.svg.brush = function() {
                                    var event = d3_eventDispatch(brush, "brushstart", "brush", "brushend"), x = null, y = null, xExtent = [ 0, 0 ], yExtent = [ 0, 0 ], xExtentDomain, yExtentDomain, xClamp = true, yClamp = true, resizes = d3_svg_brushResizes[0];
                                    function brush(g) {
                                      g.each(function() {
                                        var g = d3.select(this).style("pointer-events", "all").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)").on("mousedown.brush", brushstart).on("touchstart.brush", brushstart);
                                Severity: Major
                                Found in base/catalog/static/js/d3.v3.js - About 1 day to fix

                                  Function zoom has 270 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    d3.behavior.zoom = function() {
                                      var view = {
                                        x: 0,
                                        y: 0,
                                        k: 1
                                  Severity: Major
                                  Found in base/catalog/static/js/d3.v3.js - About 1 day to fix

                                    Function calculateCVSSFromMetrics has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    CVSS.calculateCVSSFromMetrics = function (
                                      AttackVector, AttackComplexity, PrivilegesRequired, UserInteraction, Scope, Confidentiality, Integrity, Availability,
                                      ExploitCodeMaturity, RemediationLevel, ReportConfidence,
                                      ConfidentialityRequirement, IntegrityRequirement, AvailabilityRequirement,
                                      ModifiedAttackVector, ModifiedAttackComplexity, ModifiedPrivilegesRequired, ModifiedUserInteraction, ModifiedScope,
                                    Severity: Minor
                                    Found in base/catalog/static/js/cvsscalc30.js - About 1 day 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

                                    Function calculateCVSSFromMetrics has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    CVSS.calculateCVSSFromMetrics = function (
                                      AttackVector, AttackComplexity, PrivilegesRequired, UserInteraction, Scope, Confidentiality, Integrity, Availability,
                                      ExploitCodeMaturity, RemediationLevel, ReportConfidence,
                                      ConfidentialityRequirement, IntegrityRequirement, AvailabilityRequirement,
                                      ModifiedAttackVector, ModifiedAttackComplexity, ModifiedPrivilegesRequired, ModifiedUserInteraction, ModifiedScope,
                                    Severity: Minor
                                    Found in base/catalog/static/cvss/calculator/cvsscalc30.js - About 1 day 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

                                    Function box has 261 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        d3.box = function () {
                                            var width = 1,
                                                height = 1,
                                                duration = 0,
                                                delay = 0,
                                    Severity: Major
                                    Found in base/catalog/static/js/dc.js - About 1 day to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language