@govtechsg/oobee 0.10.92 → 0.10.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +34 -0
- package/README.md +19 -0
- package/dist/cli.js +3 -2
- package/dist/combine.js +4 -4
- package/dist/constants/common.js +136 -49
- package/dist/crawlers/commonCrawlerFunc.js +54 -2
- package/dist/crawlers/crawlDomain.js +9 -2
- package/dist/crawlers/crawlIntelligentSitemap.js +9 -4
- package/dist/crawlers/crawlSitemap.js +14 -2
- package/dist/crawlers/custom/utils.js +22 -9
- package/dist/crawlers/guards/urlGuard.js +19 -1
- package/dist/crawlers/runCustom.js +8 -2
- package/dist/generateOobeeClientScanner.js +1 -1
- package/dist/mergeAxeResults/itemsStore.js +32 -3
- package/dist/static/ejs/partials/components/allIssues/CategoryBadges.ejs +3 -0
- package/dist/static/ejs/partials/components/allIssues/IssuesTable.ejs +3 -3
- package/dist/static/ejs/partials/components/header/aboutScanModal/AboutScanModal.ejs +1 -1
- package/dist/static/ejs/partials/components/header/aboutScanModal/ScanConfiguration.ejs +3 -3
- package/dist/static/ejs/partials/components/header/aboutScanModal/ScanDetails.ejs +34 -27
- package/dist/static/ejs/partials/components/ruleModal/ruleOffcanvas.ejs +1 -0
- package/dist/static/ejs/partials/components/scannedPagesSegmentedTabs.ejs +7 -0
- package/dist/static/ejs/partials/components/wcagCoverageDetails.ejs +5 -5
- package/dist/static/ejs/partials/scripts/header/aboutScanModal/AboutScanModal.ejs +3 -3
- package/dist/static/ejs/partials/scripts/prioritiseIssues/PrioritiseIssues.ejs +21 -19
- package/dist/static/ejs/partials/scripts/ruleModal/pageAccordionBuilder.ejs +39 -8
- package/dist/static/ejs/partials/scripts/scannedPagesSegmentedTabs.ejs +11 -5
- package/dist/static/ejs/partials/scripts/screenshotLightbox.ejs +49 -31
- package/dist/static/ejs/partials/styles/header/SiteInfo.ejs +1 -1
- package/dist/static/ejs/partials/styles/header/aboutScanModal/ScanDetails.ejs +36 -16
- package/dist/static/ejs/partials/styles/prioritiseIssues/PrioritiseIssues.ejs +22 -1
- package/dist/static/ejs/partials/styles/styles.ejs +1 -1
- package/dist/static/ejs/partials/styles/wcagCompliance/WcagGaugeBar.ejs +6 -0
- package/dist/static/ejs/partials/styles/wcagCompliance.ejs +5 -4
- package/dist/static/ejs/partials/styles/wcagCoverageDetails.ejs +6 -1
- package/oobee-client-scanner.js +4 -4
- package/package.json +2 -2
- package/src/cli.ts +3 -2
- package/src/combine.ts +4 -2
- package/src/constants/common.ts +131 -35
- package/src/crawlers/commonCrawlerFunc.ts +56 -2
- package/src/crawlers/crawlDomain.ts +11 -1
- package/src/crawlers/crawlIntelligentSitemap.ts +10 -4
- package/src/crawlers/crawlSitemap.ts +19 -2
- package/src/crawlers/custom/utils.ts +26 -13
- package/src/crawlers/guards/urlGuard.ts +18 -1
- package/src/crawlers/runCustom.ts +10 -1
- package/src/generateOobeeClientScanner.ts +1 -1
- package/src/mergeAxeResults/itemsStore.ts +37 -3
- package/src/static/ejs/partials/components/allIssues/CategoryBadges.ejs +3 -0
- package/src/static/ejs/partials/components/allIssues/IssuesTable.ejs +3 -3
- package/src/static/ejs/partials/components/header/aboutScanModal/AboutScanModal.ejs +1 -1
- package/src/static/ejs/partials/components/header/aboutScanModal/ScanConfiguration.ejs +3 -3
- package/src/static/ejs/partials/components/header/aboutScanModal/ScanDetails.ejs +34 -27
- package/src/static/ejs/partials/components/ruleModal/ruleOffcanvas.ejs +1 -0
- package/src/static/ejs/partials/components/scannedPagesSegmentedTabs.ejs +7 -0
- package/src/static/ejs/partials/components/wcagCoverageDetails.ejs +5 -5
- package/src/static/ejs/partials/scripts/header/aboutScanModal/AboutScanModal.ejs +3 -3
- package/src/static/ejs/partials/scripts/prioritiseIssues/PrioritiseIssues.ejs +21 -19
- package/src/static/ejs/partials/scripts/ruleModal/pageAccordionBuilder.ejs +39 -8
- package/src/static/ejs/partials/scripts/scannedPagesSegmentedTabs.ejs +11 -5
- package/src/static/ejs/partials/scripts/screenshotLightbox.ejs +49 -31
- package/src/static/ejs/partials/styles/header/SiteInfo.ejs +1 -1
- package/src/static/ejs/partials/styles/header/aboutScanModal/ScanDetails.ejs +36 -16
- package/src/static/ejs/partials/styles/prioritiseIssues/PrioritiseIssues.ejs +22 -1
- package/src/static/ejs/partials/styles/styles.ejs +1 -1
- package/src/static/ejs/partials/styles/wcagCompliance/WcagGaugeBar.ejs +6 -0
- package/src/static/ejs/partials/styles/wcagCompliance.ejs +5 -4
- package/src/static/ejs/partials/styles/wcagCoverageDetails.ejs +6 -1
- package/testStaticJSScanner.html +1 -1
- /package/{d5e2f6a7-0279-41a3-8763-844970cdf0ba.txt → 67e8137b-1939-4253-8f11-a82bc833cfcb.txt} +0 -0
|
@@ -451,7 +451,7 @@
|
|
|
451
451
|
<div id="${accordionId}-content" class="accordion-collapse collapse" aria-labelledby="${accordionId}-title">
|
|
452
452
|
<div class="accordion-body p-3">
|
|
453
453
|
${isCustomFlow
|
|
454
|
-
? createCustomFlowContent(page)
|
|
454
|
+
? createCustomFlowContent(page, ruleInCategory)
|
|
455
455
|
:
|
|
456
456
|
`<div class="d-flex align-items-center gap-1 accordion-link" style=" word-wrap: break-word; word-break: break-word;">
|
|
457
457
|
<a href="${page.url}" target="_blank">${page.url}
|
|
@@ -486,16 +486,46 @@
|
|
|
486
486
|
return accordion;
|
|
487
487
|
}
|
|
488
488
|
|
|
489
|
-
function
|
|
489
|
+
function getCustomFlowPageScreenshot(page, ruleInCategory) {
|
|
490
|
+
if (page && page.pageImagePath) return page.pageImagePath;
|
|
491
|
+
|
|
492
|
+
// Use same source-of-truth as scanAboutModal.
|
|
493
|
+
const scannedPages =
|
|
494
|
+
typeof scanData !== 'undefined' &&
|
|
495
|
+
scanData &&
|
|
496
|
+
Array.isArray(scanData.pagesScanned)
|
|
497
|
+
? scanData.pagesScanned
|
|
498
|
+
: [];
|
|
499
|
+
|
|
500
|
+
if (page) {
|
|
501
|
+
const matchByUrl = scannedPages.find((p) => p && p.url === page.url && p.pageImagePath);
|
|
502
|
+
if (matchByUrl) return matchByUrl.pageImagePath;
|
|
503
|
+
|
|
504
|
+
const matchByTitle = scannedPages.find(
|
|
505
|
+
(p) => p && p.pageTitle === page.pageTitle && p.pageImagePath,
|
|
506
|
+
);
|
|
507
|
+
if (matchByTitle) return matchByTitle.pageImagePath;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
return '';
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
function createCustomFlowContent(page, ruleInCategory) {
|
|
514
|
+
const pageScreenshot = getCustomFlowPageScreenshot(page, ruleInCategory);
|
|
515
|
+
|
|
490
516
|
return `
|
|
491
517
|
<div class="custom-flow-screenshot-container">
|
|
492
518
|
<div class="custom-flow-thumb">
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
519
|
+
${
|
|
520
|
+
pageScreenshot
|
|
521
|
+
? `<img
|
|
522
|
+
src="${pageScreenshot}"
|
|
523
|
+
alt="Screenshot of ${page.url}"
|
|
524
|
+
class="custom-flow-screenshot"
|
|
525
|
+
onerror="this.onerror = null; this.remove();"
|
|
526
|
+
>`
|
|
527
|
+
: ''
|
|
528
|
+
}
|
|
499
529
|
</div>
|
|
500
530
|
<div class="display-url-container">
|
|
501
531
|
<div><a href="${page.url}" target="_blank">${page.url}</a></div>
|
|
@@ -538,6 +568,7 @@
|
|
|
538
568
|
|
|
539
569
|
function setupCustomFlowScreenshot(accordion, page) {
|
|
540
570
|
const customScreenshotElem = accordion.getElementsByClassName('custom-flow-screenshot')[0];
|
|
571
|
+
if (!customScreenshotElem) return;
|
|
541
572
|
|
|
542
573
|
customScreenshotElem.onerror = function(event) {
|
|
543
574
|
this.onerror = null;
|
|
@@ -1,21 +1,27 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
document.addEventListener('click', function (e) {
|
|
3
|
-
const btn = e.target.closest('.seg-pill');
|
|
3
|
+
const btn = e.target.closest('.seg-pill[role="tab"]');
|
|
4
4
|
if (!btn) return;
|
|
5
5
|
|
|
6
|
-
const container = btn.closest('.segmented-tabs');
|
|
6
|
+
const container = btn.closest('.segmented-tabs[role="tablist"]');
|
|
7
|
+
if (!container) return;
|
|
8
|
+
|
|
7
9
|
const targetSel = btn.getAttribute('data-tab-target');
|
|
8
10
|
const panel = document.querySelector(targetSel);
|
|
9
11
|
if (!panel) return;
|
|
10
12
|
|
|
11
|
-
container.querySelectorAll('.seg-pill').forEach((p) =>
|
|
12
|
-
p.setAttribute('aria-selected', 'false')
|
|
13
|
-
|
|
13
|
+
container.querySelectorAll('.seg-pill[role="tab"]').forEach((p) => {
|
|
14
|
+
p.setAttribute('aria-selected', 'false');
|
|
15
|
+
p.setAttribute('tabindex', '-1');
|
|
16
|
+
});
|
|
17
|
+
|
|
14
18
|
btn.setAttribute('aria-selected', 'true');
|
|
19
|
+
btn.setAttribute('tabindex', '0');
|
|
15
20
|
|
|
16
21
|
document
|
|
17
22
|
.querySelectorAll('.seg-panels > [role="tabpanel"]')
|
|
18
23
|
.forEach((p) => (p.hidden = true));
|
|
24
|
+
|
|
19
25
|
panel.hidden = false;
|
|
20
26
|
});
|
|
21
27
|
|
|
@@ -6,18 +6,32 @@
|
|
|
6
6
|
const lightboxContent = document.getElementsByClassName('lightbox-content')[0];
|
|
7
7
|
const lightboxImg = document.getElementById('lightbox-image');
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
// Handle dynamically inserted custom-flow screenshots (about scan modal content is rendered later)
|
|
10
|
+
document.addEventListener(
|
|
11
|
+
'error',
|
|
12
|
+
event => {
|
|
13
|
+
const target = event.target;
|
|
14
|
+
if (target && target.classList && target.classList.contains('custom-flow-screenshot')) {
|
|
15
|
+
target.onerror = null;
|
|
16
|
+
target.remove();
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
true,
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
document.addEventListener('click', event => {
|
|
23
|
+
const screenshot = event.target.closest('.custom-flow-screenshot');
|
|
24
|
+
if (!screenshot) return;
|
|
25
|
+
|
|
26
|
+
event.preventDefault();
|
|
27
|
+
|
|
28
|
+
const container = screenshot.closest('.custom-flow-screenshot-container');
|
|
29
|
+
const link = container ? container.querySelector('.display-url-container a') : null;
|
|
30
|
+
|
|
31
|
+
const pageTitle = link?.textContent?.trim() || screenshot.getAttribute('alt') || 'Screenshot';
|
|
32
|
+
const pageUrl = link?.href || '';
|
|
33
|
+
|
|
34
|
+
openLightbox(screenshot.src, pageTitle, pageUrl);
|
|
21
35
|
});
|
|
22
36
|
|
|
23
37
|
lightbox.addEventListener('click', event => {
|
|
@@ -31,8 +45,9 @@
|
|
|
31
45
|
});
|
|
32
46
|
|
|
33
47
|
const offcanvasElem = document.getElementsByClassName('offcanvas')[0];
|
|
48
|
+
let offcanvasItem = null;
|
|
34
49
|
if (offcanvasElem) {
|
|
35
|
-
|
|
50
|
+
offcanvasItem = new bootstrap.Offcanvas(offcanvasElem);
|
|
36
51
|
offcanvasItem._config.keyboard = false; // Disable default keyboard handling
|
|
37
52
|
}
|
|
38
53
|
|
|
@@ -43,27 +58,30 @@
|
|
|
43
58
|
pagesScannedModalItem._config.keyboard = false;
|
|
44
59
|
}
|
|
45
60
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
61
|
+
// Use capture phase so lightbox handles Escape before Bootstrap modal/offcanvas handlers.
|
|
62
|
+
document.addEventListener(
|
|
63
|
+
'keydown',
|
|
64
|
+
event => {
|
|
65
|
+
if (event.key !== 'Escape') return;
|
|
66
|
+
|
|
67
|
+
if (lightbox.style.display === 'block') {
|
|
68
|
+
event.preventDefault();
|
|
69
|
+
event.stopPropagation();
|
|
70
|
+
event.stopImmediatePropagation();
|
|
71
|
+
closeLightbox();
|
|
72
|
+
return;
|
|
55
73
|
}
|
|
56
74
|
|
|
57
|
-
if (
|
|
58
|
-
|
|
59
|
-
event.preventDefault(); // Prevent default bootstrap behaviour
|
|
60
|
-
closeLightbox();
|
|
61
|
-
} else {
|
|
62
|
-
pagesScannedModalItem.hide();
|
|
63
|
-
}
|
|
75
|
+
if (offcanvasItem && offcanvasItem._isShown) {
|
|
76
|
+
offcanvasItem.hide();
|
|
64
77
|
}
|
|
65
|
-
|
|
66
|
-
|
|
78
|
+
|
|
79
|
+
if (pagesScannedModalItem && pagesScannedModalItem._isShown) {
|
|
80
|
+
pagesScannedModalItem.hide();
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
true,
|
|
84
|
+
);
|
|
67
85
|
|
|
68
86
|
function openLightbox(imgSrc, pageTitle, pageUrl) {
|
|
69
87
|
lightbox.style.display = 'block';
|
|
@@ -3,12 +3,16 @@
|
|
|
3
3
|
word-break: break-word;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
#
|
|
7
|
-
|
|
6
|
+
#aboutScanModalLabel {
|
|
7
|
+
margin-bottom: 1rem;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
#scan-about ul {
|
|
10
|
+
#scan-about > ul {
|
|
11
11
|
padding-left: 0;
|
|
12
|
+
padding-top: 0;
|
|
13
|
+
padding-bottom: 1rem;
|
|
14
|
+
margin-top: 0;
|
|
15
|
+
margin-bottom: 0;
|
|
12
16
|
}
|
|
13
17
|
|
|
14
18
|
#scan-about li {
|
|
@@ -38,21 +42,28 @@
|
|
|
38
42
|
margin-bottom: 0.3rem;
|
|
39
43
|
}
|
|
40
44
|
|
|
41
|
-
.advanced-group {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
#scan-about li.advanced-group {
|
|
46
|
+
align-items: flex-start;
|
|
47
|
+
margin-bottom: 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
#scan-about li.advanced-group > .advanced-group-content {
|
|
51
|
+
min-width: 0;
|
|
52
|
+
flex: 1;
|
|
45
53
|
}
|
|
46
54
|
|
|
47
|
-
.advanced-group
|
|
48
|
-
|
|
49
|
-
list-style:
|
|
50
|
-
margin-left:
|
|
55
|
+
#scan-about li.advanced-group > .advanced-group-content > ul.advanced-sublist {
|
|
56
|
+
list-style: disc;
|
|
57
|
+
list-style-position: outside;
|
|
58
|
+
margin-left: 8px;
|
|
59
|
+
margin-top: 0.5rem;
|
|
60
|
+
padding-left: 12px;
|
|
61
|
+
text-indent: -2px;
|
|
51
62
|
}
|
|
52
63
|
|
|
53
|
-
.advanced-group
|
|
54
|
-
.advanced-group + ul li {
|
|
64
|
+
#scan-about li.advanced-group > .advanced-group-content > ul.advanced-sublist li {
|
|
55
65
|
margin: 0;
|
|
66
|
+
list-style-position: outside !important;
|
|
56
67
|
}
|
|
57
68
|
|
|
58
69
|
.advanced-sublist-li {
|
|
@@ -85,10 +96,14 @@
|
|
|
85
96
|
|
|
86
97
|
.about-scan-toggle .about-us-type-of-scan-text {
|
|
87
98
|
color: var(--a11y-majorelle-blue) !important;
|
|
88
|
-
display: inline
|
|
89
|
-
text-decoration:
|
|
99
|
+
display: inline;
|
|
100
|
+
text-decoration: underline;
|
|
90
101
|
cursor: pointer;
|
|
91
102
|
}
|
|
103
|
+
|
|
104
|
+
#pagesScannedModalToggleTxt {
|
|
105
|
+
color: var(--a11y-majorelle-blue) !important;
|
|
106
|
+
}
|
|
92
107
|
.about-scan-toggle:hover .about-us-type-of-scan-text,
|
|
93
108
|
.about-scan-toggle .about-us-type-of-scan-text:focus-visible {
|
|
94
109
|
text-decoration: underline;
|
|
@@ -112,9 +127,14 @@
|
|
|
112
127
|
line-height: 1.2;
|
|
113
128
|
}
|
|
114
129
|
|
|
130
|
+
.about-scan-divider-item {
|
|
131
|
+
display: block !important;
|
|
132
|
+
margin-bottom: 2rem !important;
|
|
133
|
+
}
|
|
134
|
+
|
|
115
135
|
.about-scan-link-text {
|
|
116
136
|
color: var(--a11y-majorelle-blue);
|
|
117
|
-
text-decoration:
|
|
137
|
+
text-decoration: underline;
|
|
118
138
|
cursor: pointer;
|
|
119
139
|
}
|
|
120
140
|
|
|
@@ -120,15 +120,36 @@
|
|
|
120
120
|
|
|
121
121
|
.priority-issue-item {
|
|
122
122
|
padding: 0.75rem;
|
|
123
|
-
cursor: pointer;
|
|
124
123
|
position: relative;
|
|
125
124
|
padding-left: 1.5rem;
|
|
125
|
+
display: flex;
|
|
126
|
+
align-items: flex-start;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.priority-issue-action {
|
|
130
|
+
appearance: none;
|
|
131
|
+
border: 0;
|
|
132
|
+
background: transparent;
|
|
133
|
+
width: 100%;
|
|
134
|
+
padding: 0;
|
|
135
|
+
margin: 0;
|
|
136
|
+
display: flex;
|
|
137
|
+
text-align: left;
|
|
138
|
+
cursor: pointer;
|
|
139
|
+
color: inherit;
|
|
140
|
+
line-height: 1.5;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.priority-issue-action > .w-90 {
|
|
144
|
+
width: 100% !important;
|
|
126
145
|
}
|
|
127
146
|
|
|
128
147
|
.priority-issue-item::before {
|
|
129
148
|
counter-increment: issue-counter;
|
|
130
149
|
content: counter(issue-counter) '.';
|
|
131
150
|
line-height: 1.5;
|
|
151
|
+
margin-right: 0.5rem;
|
|
152
|
+
flex-shrink: 0;
|
|
132
153
|
}
|
|
133
154
|
|
|
134
155
|
.priority-issue-item:hover:not(.active) {
|
|
@@ -39,6 +39,11 @@
|
|
|
39
39
|
.gauge-number {
|
|
40
40
|
font-weight: 700;
|
|
41
41
|
font-size: 16px;
|
|
42
|
+
color: var(--dark-charcoal, #1f1f1f);
|
|
43
|
+
background-color: var(--true-white, #fff);
|
|
44
|
+
display: inline-block;
|
|
45
|
+
padding: 2px 8px;
|
|
46
|
+
border-radius: 999px;
|
|
42
47
|
}
|
|
43
48
|
|
|
44
49
|
.gauge-caption {
|
|
@@ -54,6 +59,7 @@
|
|
|
54
59
|
|
|
55
60
|
.gauge-value-number {
|
|
56
61
|
font-size: 24px;
|
|
62
|
+
color: var(--dark-charcoal, #1f1f1f);
|
|
57
63
|
}
|
|
58
64
|
|
|
59
65
|
.gauge-value-number.perfect-score {
|
|
@@ -12,9 +12,14 @@
|
|
|
12
12
|
gap: 10px 18px;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
#wcagCoverage .wcag-criteria-heading {
|
|
16
|
+
font-size: 1.25rem;
|
|
17
|
+
line-height: 1.2;
|
|
18
|
+
}
|
|
19
|
+
|
|
15
20
|
#wcagCoverage .wcag-grid a {
|
|
16
21
|
color: var(--a11y-majorelle-blue, #5735DF);
|
|
17
|
-
text-decoration:
|
|
22
|
+
text-decoration: underline;
|
|
18
23
|
}
|
|
19
24
|
#wcagCoverage .wcag-grid a:hover,
|
|
20
25
|
#wcagCoverage .wcag-grid a:focus-visible {
|
package/oobee-client-scanner.js
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* DO NOT EDIT MANUALLY. Re-generate with: node dist/generateOobeeClientScanner.js
|
|
4
4
|
*
|
|
5
5
|
* Embedded at generation time:
|
|
6
|
-
* App version : 0.10.
|
|
6
|
+
* App version : 0.10.94
|
|
7
7
|
* Sentry DSN : (from OOBEE_SENTRY_DSN env var or constants.ts default)
|
|
8
|
-
* Sentry SDK : @sentry/browser
|
|
8
|
+
* Sentry SDK : @sentry/browser 10.58.0 (loaded from CDN at runtime)
|
|
9
9
|
*
|
|
10
10
|
* Usage:
|
|
11
11
|
* <script src="oobee-client-scanner.js"></script>
|
|
@@ -34883,8 +34883,8 @@
|
|
|
34883
34883
|
// ── Sentry browser telemetry (Sentry JS SDK, loaded from CDN) ────────────
|
|
34884
34884
|
|
|
34885
34885
|
var _oobeeSentryDsn = "https://3b8c7ee46b06f33815a1301b6713ebc3@o4509047624761344.ingest.us.sentry.io/4509327783559168";
|
|
34886
|
-
var _oobeeAppVersion = "0.10.
|
|
34887
|
-
var _oobeeSentryVersion = "
|
|
34886
|
+
var _oobeeAppVersion = "0.10.94";
|
|
34887
|
+
var _oobeeSentryVersion = "10.58.0";
|
|
34888
34888
|
var _oobeeSentryInitialized = false;
|
|
34889
34889
|
var _oobeeSentryLoadPromise = null;
|
|
34890
34890
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@govtechsg/oobee",
|
|
3
3
|
"main": "dist/npmIndex.js",
|
|
4
|
-
"version": "0.10.
|
|
4
|
+
"version": "0.10.94",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "Government Technology Agency <info@tech.gov.sg>",
|
|
7
7
|
"bin": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@aws-sdk/client-s3": "^3.1049.0",
|
|
12
12
|
"@json2csv/node": "^7.0.3",
|
|
13
13
|
"@napi-rs/canvas": "^0.1.53",
|
|
14
|
-
"@sentry/node": "^
|
|
14
|
+
"@sentry/node": "^10.58.0",
|
|
15
15
|
"@types/aws-sdk": "^0.0.42",
|
|
16
16
|
"axe-core": "^4.11.4",
|
|
17
17
|
"axios": "^1.8.2",
|
package/src/cli.ts
CHANGED
|
@@ -264,9 +264,10 @@ const scanInit = async (argvs: Answers): Promise<string> => {
|
|
|
264
264
|
consoleLogger.info(`Connectivity Check HTTP Response Code: ${res.httpStatus}`);
|
|
265
265
|
|
|
266
266
|
if (res.status === statuses.success.code) {
|
|
267
|
-
//
|
|
268
|
-
//
|
|
267
|
+
// Keep browser-resolved URL as entryUrl for downstream scan metadata/events
|
|
268
|
+
// on non-custom scans.
|
|
269
269
|
if (data.type !== ScannerTypes.CUSTOM) {
|
|
270
|
+
data.entryUrl = res.url;
|
|
270
271
|
data.url = res.url;
|
|
271
272
|
}
|
|
272
273
|
if (process.env.OOBEE_VALIDATE_URL) {
|
package/src/combine.ts
CHANGED
|
@@ -45,6 +45,7 @@ const combineRun = async (details: Data, deviceToScan: string) => {
|
|
|
45
45
|
const {
|
|
46
46
|
type,
|
|
47
47
|
url,
|
|
48
|
+
entryUrl,
|
|
48
49
|
nameEmail,
|
|
49
50
|
randomToken,
|
|
50
51
|
deviceChosen,
|
|
@@ -104,8 +105,8 @@ const combineRun = async (details: Data, deviceToScan: string) => {
|
|
|
104
105
|
|
|
105
106
|
// remove basic-auth credentials from URL
|
|
106
107
|
const finalUrl = !(type === ScannerTypes.SITEMAP || type === ScannerTypes.LOCALFILE)
|
|
107
|
-
? new URL(
|
|
108
|
-
: new URL(pathToFileURL(
|
|
108
|
+
? new URL(entryUrl)
|
|
109
|
+
: new URL(pathToFileURL(entryUrl));
|
|
109
110
|
|
|
110
111
|
// Use the string version of finalUrl to reduce logic at submitForm
|
|
111
112
|
const finalUrlString = finalUrl.toString();
|
|
@@ -154,6 +155,7 @@ const combineRun = async (details: Data, deviceToScan: string) => {
|
|
|
154
155
|
blacklistedPatterns,
|
|
155
156
|
includeScreenshots,
|
|
156
157
|
customFlowLabel && customFlowLabel !== 'None' ? customFlowLabel : '',
|
|
158
|
+
extraHTTPHeaders,
|
|
157
159
|
);
|
|
158
160
|
|
|
159
161
|
urlsCrawledObj = res.urlsCrawled;
|