EasyRecon/Hunt3r

View on GitHub

Showing 134 of 138 total issues

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

  postInvoiceSettings(settings:InvoiceDataUpdate): Observable<InvoiceSettingsData> {
    return this.httpService.post<InvoiceSettingsData>('/admin/platforms/intigriti/invoice',settings)
  }
Severity: Major
Found in frontend/src/app/core/invoices/invoices.service.ts and 14 other locations - About 40 mins to fix
frontend/src/app/core/bugbountyPlatform/bugbountyPlatform.service.ts on lines 27..29
frontend/src/app/core/bugbountyPlatform/bugbountyPlatform.service.ts on lines 31..33
frontend/src/app/core/cloudProvider/cloudProvider.service.ts on lines 11..13
frontend/src/app/core/cloudProvider/cloudProvider.service.ts on lines 17..19
frontend/src/app/core/engines/engines.service.ts on lines 14..16
frontend/src/app/core/meshs/meshs.service.ts on lines 18..20
frontend/src/app/core/meshs/meshs.service.ts on lines 21..23
frontend/src/app/core/meshs/meshs.service.ts on lines 27..29
frontend/src/app/core/meshs/meshs.service.ts on lines 30..32
frontend/src/app/core/nuclei/nuclei.service.ts on lines 17..19
frontend/src/app/core/scan/scan.service.ts on lines 17..19
frontend/src/app/core/tools/tools.service.ts on lines 20..22
frontend/src/app/core/user/user.service.ts on lines 21..23
frontend/src/app/core/user/user.service.ts on lines 25..27

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

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 15 locations. Consider refactoring.
Open

  createMeshs(data:CreateMesh): Observable<MeshData> {
    return this.httpService.post<MeshData>('/admin/meshs',data)
  }
Severity: Major
Found in frontend/src/app/core/meshs/meshs.service.ts and 14 other locations - About 40 mins to fix
frontend/src/app/core/bugbountyPlatform/bugbountyPlatform.service.ts on lines 27..29
frontend/src/app/core/bugbountyPlatform/bugbountyPlatform.service.ts on lines 31..33
frontend/src/app/core/cloudProvider/cloudProvider.service.ts on lines 11..13
frontend/src/app/core/cloudProvider/cloudProvider.service.ts on lines 17..19
frontend/src/app/core/engines/engines.service.ts on lines 14..16
frontend/src/app/core/invoices/invoices.service.ts on lines 16..18
frontend/src/app/core/meshs/meshs.service.ts on lines 21..23
frontend/src/app/core/meshs/meshs.service.ts on lines 27..29
frontend/src/app/core/meshs/meshs.service.ts on lines 30..32
frontend/src/app/core/nuclei/nuclei.service.ts on lines 17..19
frontend/src/app/core/scan/scan.service.ts on lines 17..19
frontend/src/app/core/tools/tools.service.ts on lines 20..22
frontend/src/app/core/user/user.service.ts on lines 21..23
frontend/src/app/core/user/user.service.ts on lines 25..27

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

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 15 locations. Consider refactoring.
Open

  updateTools(data:ToolsConfigUpdate): Observable<ToolsData> {
    return this.httpService.post<ToolsData>('/admin/tools',data)
  }
Severity: Major
Found in frontend/src/app/core/tools/tools.service.ts and 14 other locations - About 40 mins to fix
frontend/src/app/core/bugbountyPlatform/bugbountyPlatform.service.ts on lines 27..29
frontend/src/app/core/bugbountyPlatform/bugbountyPlatform.service.ts on lines 31..33
frontend/src/app/core/cloudProvider/cloudProvider.service.ts on lines 11..13
frontend/src/app/core/cloudProvider/cloudProvider.service.ts on lines 17..19
frontend/src/app/core/engines/engines.service.ts on lines 14..16
frontend/src/app/core/invoices/invoices.service.ts on lines 16..18
frontend/src/app/core/meshs/meshs.service.ts on lines 18..20
frontend/src/app/core/meshs/meshs.service.ts on lines 21..23
frontend/src/app/core/meshs/meshs.service.ts on lines 27..29
frontend/src/app/core/meshs/meshs.service.ts on lines 30..32
frontend/src/app/core/nuclei/nuclei.service.ts on lines 17..19
frontend/src/app/core/scan/scan.service.ts on lines 17..19
frontend/src/app/core/user/user.service.ts on lines 21..23
frontend/src/app/core/user/user.service.ts on lines 25..27

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

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 15 locations. Consider refactoring.
Open

  updateMeshs(data:CreateMesh): Observable<MeshResponse> {
    return this.httpService.patch<MeshData>('/admin/meshs',data)
  }
Severity: Major
Found in frontend/src/app/core/meshs/meshs.service.ts and 14 other locations - About 40 mins to fix
frontend/src/app/core/bugbountyPlatform/bugbountyPlatform.service.ts on lines 27..29
frontend/src/app/core/bugbountyPlatform/bugbountyPlatform.service.ts on lines 31..33
frontend/src/app/core/cloudProvider/cloudProvider.service.ts on lines 11..13
frontend/src/app/core/cloudProvider/cloudProvider.service.ts on lines 17..19
frontend/src/app/core/engines/engines.service.ts on lines 14..16
frontend/src/app/core/invoices/invoices.service.ts on lines 16..18
frontend/src/app/core/meshs/meshs.service.ts on lines 18..20
frontend/src/app/core/meshs/meshs.service.ts on lines 27..29
frontend/src/app/core/meshs/meshs.service.ts on lines 30..32
frontend/src/app/core/nuclei/nuclei.service.ts on lines 17..19
frontend/src/app/core/scan/scan.service.ts on lines 17..19
frontend/src/app/core/tools/tools.service.ts on lines 20..22
frontend/src/app/core/user/user.service.ts on lines 21..23
frontend/src/app/core/user/user.service.ts on lines 25..27

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

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 15 locations. Consider refactoring.
Open

  createCloud(data:UpdateCloudProvider): Observable<UpdateProviderResponse> {
    return this.httpService.post<UpdateProviderResponse>('/admin/providers',data)
  }
Severity: Major
Found in frontend/src/app/core/cloudProvider/cloudProvider.service.ts and 14 other locations - About 40 mins to fix
frontend/src/app/core/bugbountyPlatform/bugbountyPlatform.service.ts on lines 27..29
frontend/src/app/core/bugbountyPlatform/bugbountyPlatform.service.ts on lines 31..33
frontend/src/app/core/cloudProvider/cloudProvider.service.ts on lines 17..19
frontend/src/app/core/engines/engines.service.ts on lines 14..16
frontend/src/app/core/invoices/invoices.service.ts on lines 16..18
frontend/src/app/core/meshs/meshs.service.ts on lines 18..20
frontend/src/app/core/meshs/meshs.service.ts on lines 21..23
frontend/src/app/core/meshs/meshs.service.ts on lines 27..29
frontend/src/app/core/meshs/meshs.service.ts on lines 30..32
frontend/src/app/core/nuclei/nuclei.service.ts on lines 17..19
frontend/src/app/core/scan/scan.service.ts on lines 17..19
frontend/src/app/core/tools/tools.service.ts on lines 20..22
frontend/src/app/core/user/user.service.ts on lines 21..23
frontend/src/app/core/user/user.service.ts on lines 25..27

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

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 15 locations. Consider refactoring.
Open

  updatePlatform(data:BugBountyPlatformSettingsUpdate): Observable<BugBountyPlatformSettingsResponse> {
    return this.httpService.patch<BugBountyPlatformSettingsResponse>('/admin/platforms',data)
  }
frontend/src/app/core/bugbountyPlatform/bugbountyPlatform.service.ts on lines 31..33
frontend/src/app/core/cloudProvider/cloudProvider.service.ts on lines 11..13
frontend/src/app/core/cloudProvider/cloudProvider.service.ts on lines 17..19
frontend/src/app/core/engines/engines.service.ts on lines 14..16
frontend/src/app/core/invoices/invoices.service.ts on lines 16..18
frontend/src/app/core/meshs/meshs.service.ts on lines 18..20
frontend/src/app/core/meshs/meshs.service.ts on lines 21..23
frontend/src/app/core/meshs/meshs.service.ts on lines 27..29
frontend/src/app/core/meshs/meshs.service.ts on lines 30..32
frontend/src/app/core/nuclei/nuclei.service.ts on lines 17..19
frontend/src/app/core/scan/scan.service.ts on lines 17..19
frontend/src/app/core/tools/tools.service.ts on lines 20..22
frontend/src/app/core/user/user.service.ts on lines 21..23
frontend/src/app/core/user/user.service.ts on lines 25..27

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

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 15 locations. Consider refactoring.
Open

  postMeshsDomain(data:MeshSyncData): Observable<MeshResponse>{
    return this.httpService.post<MeshData>('/admin/meshs/sync',data)
  }
Severity: Major
Found in frontend/src/app/core/meshs/meshs.service.ts and 14 other locations - About 40 mins to fix
frontend/src/app/core/bugbountyPlatform/bugbountyPlatform.service.ts on lines 27..29
frontend/src/app/core/bugbountyPlatform/bugbountyPlatform.service.ts on lines 31..33
frontend/src/app/core/cloudProvider/cloudProvider.service.ts on lines 11..13
frontend/src/app/core/cloudProvider/cloudProvider.service.ts on lines 17..19
frontend/src/app/core/engines/engines.service.ts on lines 14..16
frontend/src/app/core/invoices/invoices.service.ts on lines 16..18
frontend/src/app/core/meshs/meshs.service.ts on lines 18..20
frontend/src/app/core/meshs/meshs.service.ts on lines 21..23
frontend/src/app/core/meshs/meshs.service.ts on lines 30..32
frontend/src/app/core/nuclei/nuclei.service.ts on lines 17..19
frontend/src/app/core/scan/scan.service.ts on lines 17..19
frontend/src/app/core/tools/tools.service.ts on lines 20..22
frontend/src/app/core/user/user.service.ts on lines 21..23
frontend/src/app/core/user/user.service.ts on lines 25..27

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

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 15 locations. Consider refactoring.
Open

  postMeshsSync(data:MeshSyn): Observable<MeshResponse>{
    return this.httpService.post<MeshData>('/admin/meshs/sync',data)
  }
Severity: Major
Found in frontend/src/app/core/meshs/meshs.service.ts and 14 other locations - About 40 mins to fix
frontend/src/app/core/bugbountyPlatform/bugbountyPlatform.service.ts on lines 27..29
frontend/src/app/core/bugbountyPlatform/bugbountyPlatform.service.ts on lines 31..33
frontend/src/app/core/cloudProvider/cloudProvider.service.ts on lines 11..13
frontend/src/app/core/cloudProvider/cloudProvider.service.ts on lines 17..19
frontend/src/app/core/engines/engines.service.ts on lines 14..16
frontend/src/app/core/invoices/invoices.service.ts on lines 16..18
frontend/src/app/core/meshs/meshs.service.ts on lines 18..20
frontend/src/app/core/meshs/meshs.service.ts on lines 21..23
frontend/src/app/core/meshs/meshs.service.ts on lines 27..29
frontend/src/app/core/nuclei/nuclei.service.ts on lines 17..19
frontend/src/app/core/scan/scan.service.ts on lines 17..19
frontend/src/app/core/tools/tools.service.ts on lines 20..22
frontend/src/app/core/user/user.service.ts on lines 21..23
frontend/src/app/core/user/user.service.ts on lines 25..27

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

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 15 locations. Consider refactoring.
Open

  createEngine(data:Engine): Observable<AddEngineResponse> {
    return this.httpService.post<AddEngineResponse>('/engines',data)
  }
Severity: Major
Found in frontend/src/app/core/engines/engines.service.ts and 14 other locations - About 40 mins to fix
frontend/src/app/core/bugbountyPlatform/bugbountyPlatform.service.ts on lines 27..29
frontend/src/app/core/bugbountyPlatform/bugbountyPlatform.service.ts on lines 31..33
frontend/src/app/core/cloudProvider/cloudProvider.service.ts on lines 11..13
frontend/src/app/core/cloudProvider/cloudProvider.service.ts on lines 17..19
frontend/src/app/core/invoices/invoices.service.ts on lines 16..18
frontend/src/app/core/meshs/meshs.service.ts on lines 18..20
frontend/src/app/core/meshs/meshs.service.ts on lines 21..23
frontend/src/app/core/meshs/meshs.service.ts on lines 27..29
frontend/src/app/core/meshs/meshs.service.ts on lines 30..32
frontend/src/app/core/nuclei/nuclei.service.ts on lines 17..19
frontend/src/app/core/scan/scan.service.ts on lines 17..19
frontend/src/app/core/tools/tools.service.ts on lines 20..22
frontend/src/app/core/user/user.service.ts on lines 21..23
frontend/src/app/core/user/user.service.ts on lines 25..27

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

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 15 locations. Consider refactoring.
Open

  updateCurrentUser(data:UpdateUser): Observable<DataUser> {
    return this.httpService.patch<DataUser>('/profile',data)
  }
Severity: Major
Found in frontend/src/app/core/user/user.service.ts and 14 other locations - About 40 mins to fix
frontend/src/app/core/bugbountyPlatform/bugbountyPlatform.service.ts on lines 27..29
frontend/src/app/core/bugbountyPlatform/bugbountyPlatform.service.ts on lines 31..33
frontend/src/app/core/cloudProvider/cloudProvider.service.ts on lines 11..13
frontend/src/app/core/cloudProvider/cloudProvider.service.ts on lines 17..19
frontend/src/app/core/engines/engines.service.ts on lines 14..16
frontend/src/app/core/invoices/invoices.service.ts on lines 16..18
frontend/src/app/core/meshs/meshs.service.ts on lines 18..20
frontend/src/app/core/meshs/meshs.service.ts on lines 21..23
frontend/src/app/core/meshs/meshs.service.ts on lines 27..29
frontend/src/app/core/meshs/meshs.service.ts on lines 30..32
frontend/src/app/core/nuclei/nuclei.service.ts on lines 17..19
frontend/src/app/core/scan/scan.service.ts on lines 17..19
frontend/src/app/core/tools/tools.service.ts on lines 20..22
frontend/src/app/core/user/user.service.ts on lines 25..27

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

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

export class AdminComponent {

  constructor() {
  }

Severity: Minor
Found in frontend/src/app/admin/admin.component.ts and 1 other location - About 40 mins to fix
frontend/src/app/pages/pages.component.ts on lines 14..18

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

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

export class PagesComponent {

  constructor() {
  }
}
Severity: Minor
Found in frontend/src/app/pages/pages.component.ts and 1 other location - About 40 mins to fix
frontend/src/app/admin/admin.component.ts on lines 14..21

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

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

Method create has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  def create
    scan_infos = params.require(:scan).permit(
      :domain, :meshs, :type_scan, :instance_type, :provider, :notifs, :active_recon, :intel, :leak, :nuclei,
      :all_templates, :custom_interactsh, :permutation, :gau, excludes: [], nuclei_severity: [], custom_templates: []
    )
Severity: Minor
Found in backend/app/controllers/scans_controller.rb - About 35 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

Method create has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  def create
    return error_insufficient_params unless params[:email].present? && params[:password].present?

    @user = User.find_by(email: params[:email])
    return error_invalid_credentials unless @user&.authenticate(params[:password])
Severity: Minor
Found in backend/app/controllers/auth/sessions_controller.rb - About 35 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 initBarreData has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  initBarreData(stat:any){
    let month=(new Date()).getMonth();
    let year=((new Date()).getFullYear()-2);
    let data=Array()
    let data2=Array()
Severity: Minor
Found in frontend/src/app/admin/bugbountyStat/bugbountyStat.component.ts - About 35 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

Method create has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  def create
    template_data = params.require(:template).permit(:name, :value)
    value = template_data[:value]

    unless base64?(value) && yaml?(value)
Severity: Minor
Found in backend/app/controllers/nuclei_controller.rb - About 35 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 countSeverity has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  countSeverity(severity:string,rapport_severity:any,plateform:'YWH'|'INTI'|'H1'){
    if(severity!=null) severity=severity[0].toUpperCase() + severity.substr(1).toLowerCase()
    if(severity=="Low")rapport_severity.L++
    if(severity=="Medium")rapport_severity.M++
    if(severity=="High")rapport_severity.H++
Severity: Minor
Found in frontend/src/app/admin/bugbountyStat/bugbountyStat.component.ts - About 35 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

Method update has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  def update
    return render status: 422, json: { message: I18n.t('errors.controllers.admin.providers.unknown'), data: nil } if @provider.nil?

    providers_params = get_provider_params

Severity: Minor
Found in backend/app/controllers/admin/providers_controller.rb - About 35 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

Method get_jwt has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  def self.get_jwt(platform)
    return unless platform.jwt.nil? || (Time.now - platform.updated_at) > 3500

    totp_token = get_totp_token(platform)
    return unless totp_token
Severity: Minor
Found in backend/lib/platforms/yeswehack.rb - About 35 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

Method index has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

  def index
    @leaks = if params[:domain] && !params[:domain].empty?
               Domain.find_by(name: params[:domain])&.leaks
             else
               Leak.all
Severity: Minor
Found in backend/app/controllers/leaks_controller.rb - About 35 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

Severity
Category
Status
Source
Language