diff --git a/app/Entities/ScannerApp.php b/app/Entities/ScannerApp.php index 44fcdb1..39d4704 100644 --- a/app/Entities/ScannerApp.php +++ b/app/Entities/ScannerApp.php @@ -3,6 +3,7 @@ namespace App\Entities; use Doctrine\ORM\Mapping as ORM; +use Illuminate\Support\Collection; /** * App\Entities\ScannerApp @@ -18,4 +19,21 @@ class ScannerApp extends Base\ScannerApp const SCANNER_NETSPARKER = 'netsparker'; const SCANNER_NESSUS = 'nessus'; const SCANNER_RUGGEDY = 'ruggedy'; + + /** + * Get a Collection of available scanner apps + * + * @return Collection + */ + public static function getScannerApps(): Collection + { + return collect([ + self::SCANNER_NMAP, + self::SCANNER_BURP, + self::SCANNER_NEXPOSE, + self::SCANNER_NETSPARKER, + self::SCANNER_NESSUS, + self::SCANNER_RUGGEDY, + ]); + } } \ No newline at end of file diff --git a/app/Entities/Workspace.php b/app/Entities/Workspace.php index 9024cdb..21f02e6 100644 --- a/app/Entities/Workspace.php +++ b/app/Entities/Workspace.php @@ -14,6 +14,10 @@ */ class Workspace extends Base\Workspace implements SystemComponent { + const AUTO_SCAN_WORKSPACE_NAME = 'Automatic Scans'; + const AUTO_SCAN_WORKSPACE_DESCRIPTION = 'This Workspace is created automatically to contain scan results from ' + . 'files that are picked up in the auto_scan directory and processed automagically.'; + /** * @ORM\ManyToOne(targetEntity="User", inversedBy="workspaces", cascade={"persist"}, fetch="EAGER") * @ORM\JoinColumn(name="`user_id`", referencedColumnName="`id`", nullable=false) diff --git a/app/Entities/WorkspaceApp.php b/app/Entities/WorkspaceApp.php index fbcea86..25cead3 100644 --- a/app/Entities/WorkspaceApp.php +++ b/app/Entities/WorkspaceApp.php @@ -20,6 +20,10 @@ class WorkspaceApp extends Base\WorkspaceApp implements SystemComponent const DEFAULT_NAME = 'Unnamed'; const DEFAULT_DESCRIPTION = 'No description given. Please add a relevant description.'; + const AUTO_SCAN_WORKSPACE_APP_NAME = 'Automatic Scans'; + const AUTO_SCAN_WORKSPACE_APP_DESCRIPTION = 'This Workspace App is created automatically to contain scan results ' + . 'from files that are picked up in the auto_scan directory and processed automagically.'; + /** * @ORM\OneToMany(targetEntity="File", mappedBy="workspaceApp", cascade={"persist", "remove"}) * @ORM\JoinColumn(name="`id`", referencedColumnName="`workspace_apps_id`", nullable=false)