Skip to content

Commit 3ae842c

Browse files
committed
feat: add support for js-endpoints and katana-crawler modules, cleanup font loading, and update scan analysis logic
1 parent 2af18eb commit 3ae842c

5 files changed

Lines changed: 31 additions & 13 deletions

File tree

internal/api/ui/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>AutoAR Dashboard</title>
77
<meta name="description" content="AutoAR — Automated Attack Surface Recon dashboard. Monitor domains, scans, R2 files and change events in real time." />
8-
<link rel="preconnect" href="https://fonts.googleapis.com" />
9-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
8+
109
<link rel="stylesheet" href="/ui/styles.css" />
1110
<link rel="icon" type="image/png" href="/ui/logo.png" />
1211
</head>

internal/api/ui/pages/scan-common.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@
9191
const n = String(fileName || '').toLowerCase();
9292
if (!n) return 'unknown';
9393
// JS secret artifacts (check this before generic github/secret checks)
94+
if (n.includes('js-endpoint')) return 'js-endpoints';
95+
if (n.includes('katana')) return 'katana-crawler';
9496
if (n.includes('js-secret') || n.includes('js-exposure') || n.includes('js-analysis') || n.startsWith('js-sec')) return 'js-analysis';
9597
if (n.includes('/apkx/') || n.includes('\\apkx\\')) return 'apkx';
9698
// GitHub must be BEFORE generic "secret" match
@@ -151,7 +153,9 @@
151153
'subdomain-enum': { icon: '🔗', name: 'Subdomains', color: '#6366f1' },
152154
httpx: { icon: '🌐', name: 'Live Hosts', color: '#22c55e' },
153155
apkx: { icon: '📱', name: 'APK Analysis', color: '#22d3ee' },
154-
'js-analysis': { icon: '📜', name: 'JS Analysis', color: '#eab308' },
156+
'js-analysis': { icon: '📜', name: 'JS Secrets', color: '#eab308' },
157+
'js-endpoints': { icon: '🛣️', name: 'JS Endpoints', color: '#10b981' },
158+
'katana-crawler': { icon: '🕷️', name: 'Katana Crawler', color: '#8b5cf6' },
155159
'xss-detection': { icon: '💥', name: 'XSS Detection', color: '#f97316' },
156160
'sql-detection': { icon: '🗻', name: 'SQLi', color: '#dc2626' },
157161
'gf-patterns': { icon: '🎯', name: 'GF Patterns', color: '#8b5cf6' },

internal/api/ui/pages/scan-detail.js

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -395,21 +395,28 @@
395395

396396
const looksLikeJSMatcher = (/^\s*\[[^\]]+\].*->/i.test(finding) || (file.includes('js-') && !file.includes('trufflehog') && !file.includes('github'))) && !file.includes('trufflehog') && !file.includes('github-secrets');
397397
const looksLikeJSURL = file.includes('js-url') || /\.m?jsx?(\?|$)/i.test(target);
398-
// Exclude JS analysis files from GitHub bucket
398+
const looksLikeJSEndpoints = file.includes('js-endpoint') || moduleNorm === 'js-endpoints';
399+
const looksLikeKatana = file.includes('katana') || moduleNorm === 'katana-crawler' || moduleNorm === 'katana';
399400
const looksLikeGitHub = (file.includes('github') || file.includes('trufflehog') || file.includes('secrets_table') || file.includes('github-secrets') || (file.includes('secrets') && file.endsWith('.json'))) && !file.startsWith('js-');
400401

401402
if (looksLikeGitHub) kind = 'github-scan';
403+
else if (looksLikeJSEndpoints) kind = 'js-endpoints';
404+
else if (looksLikeKatana) kind = 'katana-crawler';
402405
else if (looksLikeJSMatcher) kind = 'js-analysis';
403406
else if (looksLikeJSURL && kind === 'other') kind = 'js_urls';
404407
if (isAPKScan) kind = 'apkx';
405408

406409
// Do not treat GitHub/TruffleHog rows as JS just because the blob URL ends in .js
407-
const isJS = kind !== 'github-scan' && (kind === 'js_urls' || looksLikeJSURL);
410+
const isJS = kind !== 'github-scan' && kind !== 'js-endpoints' && kind !== 'katana-crawler' && (kind === 'js_urls' || looksLikeJSURL);
408411
if (kind === 'js_urls') kind = 'urls';
409412

410413
let normalizedModule = isAPKScan ? 'apkx' : moduleNorm;
411414
if (kind === 'github-scan') {
412415
normalizedModule = 'github-scan';
416+
} else if (kind === 'js-endpoints') {
417+
normalizedModule = 'js-endpoints';
418+
} else if (kind === 'katana-crawler') {
419+
normalizedModule = 'katana-crawler';
413420
} else if (moduleNorm === 'unknown' && (kind === 'js-analysis' || isJS)) {
414421
normalizedModule = 'js-analysis';
415422
}
@@ -457,13 +464,16 @@
457464
assets: '🏠 Assets',
458465
urls: '🔗 Links',
459466
apkx: '📱 APK Analysis',
460-
'js-analysis': '📜 JS Analysis',
467+
'js-analysis': '📜 JS Secrets',
468+
'js-endpoints': '🛣️ JS Endpoints',
469+
'katana-crawler': '🕷️ Katana',
461470
'gf-patterns': '🎯 GF Patterns',
462471
nuclei: '☢️ Nuclei',
463472
ffuf: '🎲 FFUF',
464473
buckets: '🪣 S3 Buckets',
465474
ports: '📡 Ports',
466475
reflection: '🔎 Reflection',
476+
'xss-detection': '🐛 XSS (Dalfox)',
467477
'github-scan': '🐦 GitHub Secrets',
468478
other: '📁 Other',
469479
github: '🐙 GitHub Secrets',
@@ -478,7 +488,7 @@
478488

479489
dynamicKinds.forEach(k => {
480490
if (k === 'subdomains' || k === 'assets' || k === 'vuln' || VULN_KINDS.has(k) || k === 'github-scan') {
481-
if (['js-analysis', 'gf-patterns', 'nuclei', 'ffuf', 'reflection', 'github-scan', 'github'].includes(k)) {
491+
if (['js-analysis', 'js-endpoints', 'katana-crawler', 'gf-patterns', 'nuclei', 'ffuf', 'reflection', 'xss-detection', 'github-scan', 'github'].includes(k)) {
482492
DATASET_TABS.push([k, TAB_LABELS[k] || k]);
483493
}
484494
return;
@@ -501,7 +511,7 @@
501511

502512
const preferredModuleOrder = [
503513
'nuclei', 'gf-patterns', 'misconfig', 'ffuf-fuzzing', 'dns-takeover',
504-
'backup-detection', 'js-analysis', 'xss-detection', 'sql-detection',
514+
'backup-detection', 'js-analysis', 'js-endpoints', 'katana-crawler', 'xss-detection', 'sql-detection',
505515
's3-scan', 'port-scan', 'zerodays', 'aem', 'github-scan'
506516
];
507517
const usedModulesRaw = [...new Set(allRows.map(r => window.normalizeModuleKey(r.module)).filter(Boolean))];
@@ -513,7 +523,7 @@
513523
if (bi !== -1) return 1;
514524
return a.localeCompare(b);
515525
});
516-
const excludedModuleTabs = new Set(['autoar', 'unknown', 'tech-detect', 'ffuf-fuzzing', 'js-analysis', 'github-scan', 'nuclei', 'ffuf', 'reflection', 'js-analysis']);
526+
const excludedModuleTabs = new Set(['autoar', 'unknown', 'tech-detect', 'ffuf-fuzzing', 'js-analysis', 'js-endpoints', 'katana-crawler', 'xss-detection', 'github-scan', 'nuclei', 'ffuf', 'reflection']);
517527
const hasUrlsDatasetTab = UNIQUE_TABS.some((t) => t[0] === 'urls');
518528
if (hasUrlsDatasetTab) excludedModuleTabs.add('url-collection');
519529
const hasApkxDatasetTab = UNIQUE_TABS.some((t) => t[0] === 'apkx');

internal/api/ui/pages/scan-results-core.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,17 @@
5050
if (module === 'zerodays' || fileName.includes('zeroday')) {
5151
if (first.cve || first.vulnerability || first.exploit) return 'zerodays-findings';
5252
}
53-
if (module === 'js-analysis' || fileName.includes('js-')) {
53+
if (module === 'js-endpoints' || fileName.includes('js-endpoint')) {
54+
if (first.endpoint || first.url) return 'js-endpoints';
55+
}
56+
if (module === 'katana-crawler' || fileName.includes('katana')) {
57+
if (first.url || first.domain) return 'katana-crawler';
58+
}
59+
if (module === 'js-analysis' || (fileName.includes('js-') && !fileName.includes('js-endpoint'))) {
5460
if (first.url || first.endpoint || first.secret || first.key) return 'js-findings';
5561
}
5662
if (module === 'xss-detection' || fileName.includes('dalfox') || fileName.includes('kxss')) {
57-
if (first.url && (first.payload || first.parameter)) return 'xss-findings';
63+
if (first.url && (first.payload || first.parameter || first.finding)) return 'xss-findings';
5864
}
5965
if (module === 'sql-detection' || fileName.includes('sqlmap')) {
6066
if (first.url && (first.parameter || first.type)) return 'sqli-findings';

internal/api/ui/styles.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
/* AutoAR Dashboard — Premium Dark Theme */
33
/* ──────────────────────────────────────────────────────────────────────────── */
44

5-
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');
6-
5+
/* Fonts are loaded locally or fallback to system-ui */
76
:root {
87
/* Backgrounds */
98
--bg-base: #030712;

0 commit comments

Comments
 (0)