Skip to content

Commit adc7a0f

Browse files
committed
fix: normalize module aliases both ways when deduping tabs
- FFUF appeared twice because dataset kind is 'ffuf' but module normalizes to 'ffuf-fuzzing' — the direct string check missed it. - Now coveredDatasetKinds includes both the original kind AND its normalized form (via normalizeModuleKey), plus the reverse check when filtering module names.
1 parent 79cba19 commit adc7a0f

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,11 +536,18 @@
536536
if (hasApkxDatasetTab) excludedModuleTabs.add('apkx');
537537
// Build a set of kinds already covered by dataset tabs so we don't
538538
// create duplicate mod: tabs for the same module.
539+
// Also include normalized aliases — e.g. if the dataset has 'ffuf',
540+
// 'ffuf-fuzzing' is covered too, and vice versa.
539541
const coveredDatasetKinds = new Set(UNIQUE_TABS.map(t => t[0]));
542+
for (const k of [...coveredDatasetKinds]) {
543+
const norm = window.normalizeModuleKey(k);
544+
if (norm !== k) coveredDatasetKinds.add(norm);
545+
}
540546

541547
const moduleTabs = usedModules.filter((mod) => {
542548
if (excludedModuleTabs.has(mod)) return false;
543549
if (coveredDatasetKinds.has(mod)) return false;
550+
if (coveredDatasetKinds.has(window.normalizeModuleKey(mod))) return false;
544551
return true;
545552
}).map((mod) => {
546553
const info = getModuleDisplayInfo(mod);

0 commit comments

Comments
 (0)