Showing 76 of 145 total issues
File vulnerabilitiesdetails.blade.php
has 312 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<div>
<x-headers.vulnerabilities />
<main class="py-10" wire:poll.keep-alive>
<div class="max-w-full mx-auto pr-4 sm:px-6 md:flex md:items-center md:justify-between md:space-x-5 lg:max-w-full lg:px-6">
Method up
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function up()
{
$tableNames = config('permission.table_names');
$columnNames = config('permission.column_names');
$teams = config('permission.teams');
Method saveCreateScan
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function saveCreateScan()
{
$this->authorize('create_scans');
/**
Method details
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function details()
{
return $this->details = Results::where('results.id', '=', $this->vuln)
->select(
'results.host',
Socket
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Socket
{
private $au_response_clean = '';
private $xml_response;
private $json_encode_xml;
Method resetFields
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function resetFields()
{
$this->currentPage = 1;
$this->reset(
Method details
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function details()
{
return $this->details = Results::where('results.nvt', '=', $this->nvt)
->select(
'nvts.name',
Method secondStepSubmit
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function secondStepSubmit(): int
{
if($this->toggleExcludeTargets === 'Yes')
{
$this->validate([
Method getRowsQueryProperty
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getRowsQueryProperty()
{
$this->creationTime = KnowledgeBase::query()
->select('creation_time')
->orderBy('nvts.creation_time', 'DESC')
Method getRowsCSVProperty
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getRowsCSVProperty()
{
$this->getReport = Reports::where('task', '=', $this->task)
->select('id')
->orderBy('id', 'DESC')
Method details
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function details()
{
return $this->details = KnowledgeBase::where('nvts.uuid', '=', $this->uuid)
->select(
'nvts.name',
Function secondStepSubmit
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
Open
public function secondStepSubmit(): int
{
if($this->toggleExcludeTargets === 'Yes')
{
$this->validate([
- Read upRead up
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 resumeScan
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function resumeScan($data, $id)
{
/**
* Set Permissions
*/
Method startScan
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function startScan($data, $id)
{
/**
* Set Permissions
*/
Method modifyAsset
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function modifyAsset($data, $id = null)
{
/**
* Set Permissions
*/
Method createPorts
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function createPorts($data)
{
/**
* Set Permissions
*/
Method stopScan
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function stopScan($data, $id)
{
/**
* Set Permissions
*/
Method lockScan
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function lockScan($data, $id)
{
/**
* Set Permissions
*/
Method cloneScan
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function cloneScan($data, $id)
{
/**
* Set Permissions
*/
Method createSMB
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function createSMB($data)
{
/**
* Set Permissions
*/