failmap/admin

View on GitHub

Showing 577 of 577 total issues

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

        self.children.append(
            modules.AppList(
                _("Content"),
                exclude=(
                    "auth.*",
Severity: Minor
Found in websecmap/app/dashboard.py and 1 other location - About 40 mins to fix
websecmap/app/dashboard.py on lines 80..85

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

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

        self.children.append(
            modules.AppList(
                _("Administration"),
                models=(
                    "auth.*",
Severity: Minor
Found in websecmap/app/dashboard.py and 1 other location - About 40 mins to fix
websecmap/app/dashboard.py on lines 67..72

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

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

        admin_url = "http://%s:%d" % (
            docker_ip,
            int(docker_services("port admin 8000").split(":")[-1]),
Severity: Major
Found in tests/system/conftest.py and 2 other locations - About 40 mins to fix
tests/system/conftest.py on lines 24..26
tests/system/conftest.py on lines 79..79

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

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

        frontend_url = "http://%s:%d" % (
            docker_ip,
            int(docker_services("port frontend 8000").split(":")[-1]),
Severity: Major
Found in tests/system/conftest.py and 2 other locations - About 40 mins to fix
tests/system/conftest.py on lines 20..22
tests/system/conftest.py on lines 79..79

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

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

    {
        "name": "subdomains",
        "verbose name": "Discover subdomains using open data sources",
        "description": "Uses NSEC1 and Certificate Tranparency to discover new urls. "
        "About NSEC1: Discover new domains using DNSSEC NSEC1 enumeration. This is a powerful but not frequently used "
Severity: Major
Found in websecmap/scanners/__init__.py and 2 other locations - About 40 mins to fix
websecmap/scanners/__init__.py on lines 311..325
websecmap/scanners/__init__.py on lines 361..376

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

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

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

    worker_process = subprocess.Popen(
        worker_command, stdout=sys.stdout.buffer, stderr=sys.stderr.buffer, preexec_fn=os.setsid, env=worker_env
Severity: Minor
Found in tests/integration/conftest.py and 1 other location - About 40 mins to fix
tests/integration/integration_scanners/conftest.py on lines 41..42

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

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

    {
        "name": "http",
        "verbose name": "HTTP/HTTPS Endpoint discovery",
        "description": "Discovers and verifies the existence of HTTP/HTTPS services on standard and alternative ports.",
        "can discover endpoints": True,
Severity: Major
Found in websecmap/scanners/__init__.py and 2 other locations - About 40 mins to fix
websecmap/scanners/__init__.py on lines 236..261
websecmap/scanners/__init__.py on lines 361..376

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

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

    url_scans = list(
        UrlGenericScan.objects.all()
        .filter(
            url__urlsubmission__added_by_team__participating_in_contest=contest,
            rating_determined_on__lte=contest.until_moment,
Severity: Minor
Found in websecmap/game/views.py and 1 other location - About 40 mins to fix
websecmap/game/views.py on lines 523..527

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

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

    url = "http://%s:%d" % (docker_ip, int(docker_compose("port admin 8000").split(":")[-1]))
Severity: Major
Found in tests/system/conftest.py and 2 other locations - About 40 mins to fix
tests/system/conftest.py on lines 20..22
tests/system/conftest.py on lines 24..26

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

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

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

    worker_process = subprocess.Popen(
        worker_command, stdout=sys.stdout.buffer, stderr=sys.stderr.buffer, preexec_fn=os.setsid, env=worker_env
Severity: Minor
Found in tests/integration/integration_scanners/conftest.py and 1 other location - About 40 mins to fix
tests/integration/conftest.py on lines 42..43

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

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

    endpoint_scans = list(
        EndpointGenericScan.objects.all()
        .filter(
            endpoint__url__urlsubmission__added_by_team__participating_in_contest=contest,
            rating_determined_on__lte=contest.until_moment,
Severity: Minor
Found in websecmap/game/views.py and 1 other location - About 40 mins to fix
websecmap/game/views.py on lines 514..518

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

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 can_connect has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

def can_connect(self, protocol: str, url: str, port: int, ip_version: int) -> bool:
Severity: Minor
Found in websecmap/scanners/scanner/http.py - About 35 mins to fix

    Function store_when_new_or_kill_if_gone has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def store_when_new_or_kill_if_gone(connected, url, port, protocol, ip_version):
    Severity: Minor
    Found in websecmap/scanners/scanner/ftp.py - About 35 mins to fix

      Function create has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def create(cls, task: celery.Task, name: str, request, *args, **kwargs) -> "Job":
      Severity: Minor
      Found in websecmap/app/models.py - About 35 mins to fix

        Function retrieve_endpoints_from_urls has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def retrieve_endpoints_from_urls(
        Severity: Minor
        Found in websecmap/scanners/plannedscan.py - About 35 mins to fix

          Function store_url_scan_result has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def store_url_scan_result(scan_type: str, url_id: int, rating: str, message: str, evidence: str = ""):
          Severity: Minor
          Found in websecmap/scanners/scanmanager.py - About 35 mins to fix

            Function kill_endpoint has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def kill_endpoint(protocol: str, url_id: int, port: int, ip_version: int, origin: str = ""):
            Severity: Minor
            Found in websecmap/scanners/scanner/http.py - About 35 mins to fix

              Function store_endpoint_scan_result has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              def store_endpoint_scan_result(scan_type: str, endpoint_id: int, rating: str, message: str, evidence: str = ""):
              Severity: Minor
              Found in websecmap/scanners/scanmanager.py - About 35 mins to fix

                Function add_url_to_new_organization has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def add_url_to_new_organization(country: str, organization_type: str, target_organization_name, url, when):
                Severity: Minor
                Found in websecmap/organizations/adminstrative_transformations.py - About 35 mins to fix

                  Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      def __init__(self, verbosity=1, failfast=False, keepdb=False, pdb=False, **kwargs):
                  Severity: Minor
                  Found in websecmap/testrunner.py - About 35 mins to fix
                    Severity
                    Category
                    Status
                    Source
                    Language