mike-goodwin/owasp-threat-dragon

View on GitHub

Showing 88 of 88 total issues

Similar blocks of code found in 3 locations. Consider refactoring.
Open

        it('/threatmodel/org/repo/branch/model/update', function (done) {

            spyOn(mockThreatModel, 'update').and.callThrough();
            spyOn(mockHomeController, 'ensureLoggedIn').and.callThrough();
            require('../../td/config/routes.config')(app);
Severity: Major
Found in td.tests/serverspec/routes.config_spec.js and 2 other locations - About 6 hrs to fix
td.tests/serverspec/routes.config_spec.js on lines 373..390
td.tests/serverspec/routes.config_spec.js on lines 392..409

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 174.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

        it('DELETE /threatmodel/org/repo/branch/model', function (done) {

            spyOn(mockThreatModel, 'deleteModel').and.callThrough();
            spyOn(mockHomeController, 'ensureLoggedIn').and.callThrough();
            require('../../td/config/routes.config')(app);
Severity: Major
Found in td.tests/serverspec/routes.config_spec.js and 2 other locations - About 6 hrs to fix
td.tests/serverspec/routes.config_spec.js on lines 392..409
td.tests/serverspec/routes.config_spec.js on lines 411..428

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 174.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

        it('/threatmodel/org/repo/branch/model/create', function (done) {

            spyOn(mockThreatModel, 'create').and.callThrough();
            spyOn(mockHomeController, 'ensureLoggedIn').and.callThrough();
            require('../../td/config/routes.config')(app);
Severity: Major
Found in td.tests/serverspec/routes.config_spec.js and 2 other locations - About 6 hrs to fix
td.tests/serverspec/routes.config_spec.js on lines 373..390
td.tests/serverspec/routes.config_spec.js on lines 411..428

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 174.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    it('should error 500 when fetching the branches for the specified repo', function () {

        var error = new Error('branches error');

        mockRepository.branches = function (repoInfo, accessToken, cb) {
Severity: Major
Found in td.tests/serverspec/threatmodelcontroller_spec.js and 2 other locations - About 6 hrs to fix
td.tests/serverspec/threatmodelcontroller_spec.js on lines 214..230
td.tests/serverspec/threatmodelcontroller_spec.js on lines 270..286

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 168.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    it('should error 500 when fetching the models for the specified repo and branch', function () {

        var error = new Error('models error');

        mockRepository.models = function (branchInfo, accessToken, cb) {
Severity: Major
Found in td.tests/serverspec/threatmodelcontroller_spec.js and 2 other locations - About 6 hrs to fix
td.tests/serverspec/threatmodelcontroller_spec.js on lines 153..169
td.tests/serverspec/threatmodelcontroller_spec.js on lines 270..286

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 168.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    it('should error 500 when fetching the specified model', function () {

        var error = new Error('model error');

        mockRepository.model = function (modelInfo, accessToken, cb) {
Severity: Major
Found in td.tests/serverspec/threatmodelcontroller_spec.js and 2 other locations - About 6 hrs to fix
td.tests/serverspec/threatmodelcontroller_spec.js on lines 153..169
td.tests/serverspec/threatmodelcontroller_spec.js on lines 214..230

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 168.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

threatmodelcontroller.update = function(req, res) {
    var modelInfo = {
        organisation: req.params.organisation,
        repo: req.params.repo,
        branch: req.params.branch,
Severity: Major
Found in td/controllers/threatmodelcontroller.js and 1 other location - About 6 hrs to fix
td/controllers/threatmodelcontroller.js on lines 81..97

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 166.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

threatmodelcontroller.create = function(req, res) {
    var modelInfo = {
        organisation: req.params.organisation,
        repo: req.params.repo,
        branch: req.params.branch,
Severity: Major
Found in td/controllers/threatmodelcontroller.js and 1 other location - About 6 hrs to fix
td/controllers/threatmodelcontroller.js on lines 99..115

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 166.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

File threatmodelcontroller_spec.js has 439 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use strict'

require('jasmine');

describe('threat model controller tests', function () {
Severity: Minor
Found in td.tests/serverspec/threatmodelcontroller_spec.js - About 6 hrs to fix

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            it('/threatmodel/org/repo/branches', function (done) {
    
                spyOn(mockThreatModel, 'branches').and.callThrough();
                spyOn(mockHomeController, 'ensureLoggedIn').and.callThrough();
                require('../../td/config/routes.config')(app);
    Severity: Major
    Found in td.tests/serverspec/routes.config_spec.js and 3 other locations - About 6 hrs to fix
    td.tests/serverspec/routes.config_spec.js on lines 301..317
    td.tests/serverspec/routes.config_spec.js on lines 337..353
    td.tests/serverspec/routes.config_spec.js on lines 355..371

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 156.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            it('/threatmodel/repos', function (done) {
    
                spyOn(mockThreatModel, 'repos').and.callThrough();
                spyOn(mockHomeController, 'ensureLoggedIn').and.callThrough();
                require('../../td/config/routes.config')(app);
    Severity: Major
    Found in td.tests/serverspec/routes.config_spec.js and 3 other locations - About 6 hrs to fix
    td.tests/serverspec/routes.config_spec.js on lines 319..335
    td.tests/serverspec/routes.config_spec.js on lines 337..353
    td.tests/serverspec/routes.config_spec.js on lines 355..371

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 156.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            it('/threatmodel/org/repo/branch/models', function (done) {
    
                spyOn(mockThreatModel, 'models').and.callThrough();
                spyOn(mockHomeController, 'ensureLoggedIn').and.callThrough();
                require('../../td/config/routes.config')(app);
    Severity: Major
    Found in td.tests/serverspec/routes.config_spec.js and 3 other locations - About 6 hrs to fix
    td.tests/serverspec/routes.config_spec.js on lines 301..317
    td.tests/serverspec/routes.config_spec.js on lines 319..335
    td.tests/serverspec/routes.config_spec.js on lines 355..371

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 156.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            it('/threatmodel/org/repo/branch/model/data', function (done) {
    
                spyOn(mockThreatModel, 'model').and.callThrough();
                spyOn(mockHomeController, 'ensureLoggedIn').and.callThrough();
                require('../../td/config/routes.config')(app);
    Severity: Major
    Found in td.tests/serverspec/routes.config_spec.js and 3 other locations - About 6 hrs to fix
    td.tests/serverspec/routes.config_spec.js on lines 301..317
    td.tests/serverspec/routes.config_spec.js on lines 319..335
    td.tests/serverspec/routes.config_spec.js on lines 337..353

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 156.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            it('should enable next and disable prev', function () {
    
                var link1 = 'url1; rel="next"';
                var link2 = 'url2; rel="link"';
                var testLinkHeader = link1 + ',' + link2;
    Severity: Major
    Found in td.tests/serverspec/threatmodelcontroller_spec.js and 3 other locations - About 5 hrs to fix
    td.tests/serverspec/threatmodelcontroller_spec.js on lines 520..537
    td.tests/serverspec/threatmodelcontroller_spec.js on lines 539..556
    td.tests/serverspec/threatmodelcontroller_spec.js on lines 558..575

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 152.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            it('should disable next and enable prev', function () {
    
                var link1 = 'url1; rel="link"';
                var link2 = 'url2; rel="prev"';
                var testLinkHeader = link1 + ',' + link2;
    Severity: Major
    Found in td.tests/serverspec/threatmodelcontroller_spec.js and 3 other locations - About 5 hrs to fix
    td.tests/serverspec/threatmodelcontroller_spec.js on lines 501..518
    td.tests/serverspec/threatmodelcontroller_spec.js on lines 520..537
    td.tests/serverspec/threatmodelcontroller_spec.js on lines 558..575

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 152.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            it('should enable next and enable prev', function () {
    
                var link1 = 'url1; rel="next"';
                var link2 = 'url2; rel="prev"';
                var testLinkHeader = link1 + ',' + link2;
    Severity: Major
    Found in td.tests/serverspec/threatmodelcontroller_spec.js and 3 other locations - About 5 hrs to fix
    td.tests/serverspec/threatmodelcontroller_spec.js on lines 501..518
    td.tests/serverspec/threatmodelcontroller_spec.js on lines 539..556
    td.tests/serverspec/threatmodelcontroller_spec.js on lines 558..575

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 152.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            it('should disable next and disable prev', function () {
    
                var link1 = 'url1; rel="link"';
                var link2 = 'url2; rel="link"';
                var testLinkHeader = link1 + ',' + link2;
    Severity: Major
    Found in td.tests/serverspec/threatmodelcontroller_spec.js and 3 other locations - About 5 hrs to fix
    td.tests/serverspec/threatmodelcontroller_spec.js on lines 501..518
    td.tests/serverspec/threatmodelcontroller_spec.js on lines 520..537
    td.tests/serverspec/threatmodelcontroller_spec.js on lines 539..556

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 152.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Function datacontext has 131 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function datacontext($q, $http, common, threatmodellocator) {
    
        var threatModel = null;
        var threatModelLocation = null;
    
    
    Severity: Major
    Found in td/public/app/services/datacontext.js - About 5 hrs to fix

      Function getRoutes has 100 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function getRoutes() {
          return [
              {
                  url: '/',
                  config: {
      Severity: Major
      Found in td/public/app/config.route.js - About 4 hrs to fix

        Function github has 96 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function github($q, $routeParams, $location, common, datacontext) {
            // Using 'Controller As' syntax, so we assign this to the vm variable (for viewmodel).
            /*jshint validthis: true */
            var vm = this;
            var controllerId = 'github';
        Severity: Major
        Found in td/public/app/threatmodels/github.js - About 3 hrs to fix
          Severity
          Category
          Status
          Source
          Language