hackedteam/test-av

View on GitHub
analyzer/windows/analyzer.py

Summary

Maintainability
C
1 day
Test Coverage

Function run has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
Open

    def run(self):
        """Run analysis.
        @return: operation status.
        """
        self.prepare()
Severity: Minor
Found in analyzer/windows/analyzer.py - About 2 hrs 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

File analyzer.py has 268 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Copyright (C) 2010-2012 Cuckoo Sandbox Developers.
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.

import os
Severity: Minor
Found in analyzer/windows/analyzer.py - About 2 hrs to fix

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

        def run(self):
            """Run handler.
            @return: operation status.
            """
            data = ""
    Severity: Minor
    Found in analyzer/windows/analyzer.py - 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

    Function dump_files has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    def dump_files():
        """Dump dropped file."""
        for file_path in FILES_LIST:
            file_name = os.path.basename(file_path)
    
    
    Severity: Minor
    Found in analyzer/windows/analyzer.py - 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

    Function get_options has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

        def get_options(self):
            """Get analysis options.
            @return: options dict.
            """
            options = {}
    Severity: Minor
    Found in analyzer/windows/analyzer.py - About 45 mins 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 run has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

        def run(self):
            """Create and run PIPE server.
            @return: operation status.
            """
            while self.do_run:
    Severity: Minor
    Found in analyzer/windows/analyzer.py - About 25 mins 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

    There are no issues that match your filters.

    Category
    Status