+>(({ className, ...props }, ref) => (
+ [role=checkbox]]:translate-y-[2px]",
+ className
+ )}
+ {...props}
+ />
+))
+TableCell.displayName = "TableCell"
+
+const TableCaption = React.forwardRef<
+ HTMLTableCaptionElement,
+ React.HTMLAttributes
+>(({ className, ...props }, ref) => (
+
+))
+TableCaption.displayName = "TableCaption"
+
+export {
+ Table,
+ TableHeader,
+ TableBody,
+ TableFooter,
+ TableHead,
+ TableRow,
+ TableCell,
+ TableCaption,
+}
diff --git a/resources/js/Pages/Dashboard.tsx b/resources/js/Pages/Dashboard.tsx
index c3bcf7c..936accd 100644
--- a/resources/js/Pages/Dashboard.tsx
+++ b/resources/js/Pages/Dashboard.tsx
@@ -4,36 +4,43 @@ import {
Card,
CardContent,
CardHeader,
- CardTitle,
- CardDescription
+ CardTitle
} from '@/Components/ui/card';
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/Components/ui/tabs';
import { Button } from "@/Components/ui/button";
-import { Progress } from '@/Components/ui/progress';
-import { Alert, AlertDescription, AlertTitle } from '@/Components/ui/alert';
-import { ShieldAlert, Globe, Database, ChevronLeft, ChevronRight, Check, Copy } from 'lucide-react';
+import { Alert, AlertDescription } from '@/Components/ui/alert';
+import { ShieldAlert, ChevronLeft, ChevronRight } from 'lucide-react';
import Markdown from 'react-markdown';
import {
SecuritySummaryReportResultType, SecuritySummaryResponseType,
} from '@/types/security-summary';
-import NumberOfVulnerabilitiesPieChart from "@/Components/NumberOfVulnerabilitiesPieChart";
+import VulnerabilitiesActiveCard from "@/Components/Dashboard/Vulnerabilities/VulnerabilitiesActiveCard";
+import VulnerabilitiesPassiveCard from "@/Components/Dashboard/Vulnerabilities/VulnerabilitiesPassiveCard";
import SecurityScoresOverviewBarChart from "@/Components/SecurityScoresOverviewBarChart";
-import PortExposureAnalysis from "@/Components/PortExposureAnalysis";
-import { useClipboard } from "use-clipboard-copy"
-import DashboardHeader from "@/Components/DashboardHeader";
+import ServicesPortExposureCard from "@/Components/Dashboard/Services/ServicesPortExposureCard";
+import DashboardHeader from "@/Components/Dashboard/DashboardHeader";
+import OverviewNetworkAssetsCard from "@/Components/Dashboard/Overview/OverviewNetworkAssetsCard";
+import OverviewSimilarDomainsCard from "@/Components/Dashboard/Overview/OverviewSimilarDomainsCard";
+import OverviewEmailSecurityCard from "@/Components/Dashboard/Overview/OverviewEmailSecurityCard";
+import OverviewCertificatesCard from "@/Components/Dashboard/Overview/OverviewCertificatesCard";
+import OverviewDataLeaksCard from "@/Components/Dashboard/Overview/OverviewDataLeaksCard";
+import ServicesWafCard from "@/Components/Dashboard/Services/ServicesWafCard";
+import ServicesCdnCard from "@/Components/Dashboard/Services/ServicesCdnCard";
+import LeaksEnumerationCard from "@/Components/Dashboard/Leaks/LeaksEnumerationCard";
+import LeaksResolvedCard from "@/Components/Dashboard/Leaks/LeaksResolvedCard";
+import LeaksUnresolvedCard from "@/Components/Dashboard/Leaks/LeaksUnresolvedCard";
+import OverviewVulnerabilityScoreCard from "@/Components/Dashboard/Overview/OverviewVulnerabilityScoreCard";
-
-export default function Dashboard() {
+export default function Dashboard({ page }: { page:number }) {
const [securitySummaryResponse, setSecuritySummaryResponse] = useState(null);
const [reportData, setReportData] = useState(null);
- const [currentPage, setCurrentPage] = useState(0);
+ const [currentPage, setCurrentPage] = useState(page);
useEffect(() => {
axios.get('/api/v1/security/summary')
.then(response => {
setSecuritySummaryResponse(response.data);
- // Set initial report data
setReportData(response.data.results[0] ?? null);
})
.catch(error => {
@@ -41,7 +48,6 @@ export default function Dashboard() {
});
}, []);
- // Handle page changes
useEffect(() => {
if (securitySummaryResponse) {
setReportData(securitySummaryResponse.results[currentPage] ?? null);
@@ -62,9 +68,9 @@ export default function Dashboard() {
return (
-
+
-
+
Overview
Vulnerabilities
@@ -72,74 +78,17 @@ export default function Dashboard() {
Data Leaks
-
-
-
-
-
-
- Vulnerability Score
-
- Active and passive vulnerability scores
-
-
-
-
-
Active Score
-
-
{reportData.vulnerability_score_active}%
-
-
-
-
Passive Score
-
-
{reportData.vulnerability_score_passive}%
-
-
-
-
-
-
-
-
-
-
- Network Assets
-
- Total assets and IP addresses
-
-
- {reportData.n_asset}
-
- IPv4: {reportData.unique_ipv4}
- IPv6: {reportData.unique_ipv6}
-
-
-
-
-
-
-
-
- Data Leaks
-
- Unresolved data leak incidents
-
-
- {reportData.n_dataleak.unresolved.potential_stealer}
-
- Including {reportData.n_dataleak.unresolved.domain_stealer} domain stealer
- and {reportData.n_dataleak.unresolved.other_stealer} other leaks
-
-
-
+
+
+
Overview
-
-
-
-
-
+
+
+
+
+
+
+
@@ -172,33 +121,66 @@ export default function Dashboard() {
-
-
-
- Previous
-
+
-
- Page {currentPage + 1} of {securitySummaryResponse?.results.length}
-
+
+
+
Data Leaks Details
+
+
+
+
+
+
+
-
- Next
-
-
+
+
+
+
Data Leaks Details
+
+
+
+
+
+
+
+
+
+
Data Leaks Details
+
+
+
+
+
+
+
+
+ Previous
+
+
+
+ Page {currentPage + 1} of {securitySummaryResponse?.results.length}
+
+
+
+ Next
+
+
+
);
};
diff --git a/resources/js/Pages/Home.tsx b/resources/js/Pages/Home.tsx
new file mode 100644
index 0000000..188d592
--- /dev/null
+++ b/resources/js/Pages/Home.tsx
@@ -0,0 +1,85 @@
+import React, { useEffect, useState } from 'react';
+import axios from 'axios';
+import {
+ SecuritySummaryResponseType,
+} from '@/types/security-summary';
+import { TextSearchIcon } from 'lucide-react';
+import {
+ Table,
+ TableBody,
+ TableCaption,
+ TableCell,
+ TableFooter,
+ TableHead,
+ TableHeader,
+ TableRow,
+} from "@/Components/ui/table"
+import {Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle} from "@/Components/ui/card";
+
+export default function Home() {
+ const [securitySummaryResponse, setSecuritySummaryResponse] = useState
(null);
+
+ useEffect(() => {
+ axios.get('/api/v1/security/summary')
+ .then(response => {
+ setSecuritySummaryResponse(response.data);
+ })
+ .catch(error => {
+ console.error("Error fetching the report data", error);
+ });
+ }, []);
+
+
+ return (
+
+
+
+ Scan Reports
+ Pick a scan to see the dashboard, you can also navigate trough dashboard using prev and next arrow at the end of each report overview
+
+
+
+
+
+ Domain
+ UUID
+ Method
+ Score
+
+
+
+
+ {securitySummaryResponse?.results.map((data, index) => (
+
+
+ {data.domain_name}
+
+ {data.idsummary}
+ {data.creation_date}
+ {data.risk_score}
+
+
+
+
+
+
+
+ ))}
+
+
+
+
+
+
+
+ Upload Password Leak
+
+
+
+ --todo
+
+
+
+
+ );
+};
diff --git a/routes/web.php b/routes/web.php
index 3d4491d..f9cdf28 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -6,9 +6,11 @@ use Illuminate\Support\Facades\Route;
use Inertia\Inertia;
Route::get('/', function () {
- return redirect('/dashboard');
+ return Inertia::render('Home');
});
-Route::get('/dashboard', function () {
- return Inertia::render('Dashboard');
+Route::get('/report/{page}/dashboard', function (int $page = 0) {
+ return Inertia::render('Dashboard', [
+ 'page' => $page
+ ]);
})->name('dashboard');