diff --git a/.pipelines/prchecks/CveSpecFilePRCheck/ResultAnalyzer.py b/.pipelines/prchecks/CveSpecFilePRCheck/ResultAnalyzer.py index 4da1445c5e4..427e2a33c9f 100644 --- a/.pipelines/prchecks/CveSpecFilePRCheck/ResultAnalyzer.py +++ b/.pipelines/prchecks/CveSpecFilePRCheck/ResultAnalyzer.py @@ -1165,32 +1165,66 @@ def generate_multi_spec_report(self, analysis_result: 'MultiSpecAnalysisResult', return; }} - // Get modal elements + // Get modal container first const modal = document.getElementById('challenge-modal'); - const specEl = document.getElementById('finding-spec'); - const typeEl = document.getElementById('finding-type'); - const descEl = document.getElementById('finding-desc'); - console.log('📋 Modal element check:', {{ - modal: !!modal, - specEl: !!specEl, - typeEl: !!typeEl, - descEl: !!descEl + console.log('🔍 Modal element details:', {{ + found: !!modal, + tagName: modal ? modal.tagName : 'N/A', + id: modal ? modal.id : 'N/A', + className: modal ? modal.className : 'N/A', + childCount: modal ? modal.children.length : 0, + innerHTML_length: modal ? modal.innerHTML.length : 0 }}); - // Robust error handling - no retry loop if (!modal) {{ console.error('❌ CRITICAL: Modal element #challenge-modal not found in DOM!'); alert('Error: Modal dialog not found. Please refresh the page and try again.'); return; }} + // Log first 500 chars of innerHTML to see what's actually there + if (modal.innerHTML) {{ + console.log('📄 Modal innerHTML (first 500 chars):', modal.innerHTML.substring(0, 500)); + }} else {{ + console.error('❌ Modal innerHTML is empty or undefined!'); + }} + + // Get child elements - try both methods (getElementById and querySelector) + let specEl = document.getElementById('finding-spec'); + let typeEl = document.getElementById('finding-type'); + let descEl = document.getElementById('finding-desc'); + + console.log('🔍 Direct getElementById results:', {{ + specEl: !!specEl, + typeEl: !!typeEl, + descEl: !!descEl + }}); + + // Fallback to querySelector within modal if getElementById fails + if (!specEl) specEl = modal.querySelector('#finding-spec'); + if (!typeEl) typeEl = modal.querySelector('#finding-type'); + if (!descEl) descEl = modal.querySelector('#finding-desc'); + + console.log('� After querySelector fallback:', {{ + specEl: !!specEl, + typeEl: !!typeEl, + descEl: !!descEl + }}); + + // Robust error handling if (!specEl || !typeEl || !descEl) {{ - console.error('❌ CRITICAL: Modal child elements missing!', {{ - specEl: !!specEl, - typeEl: !!typeEl, - descEl: !!descEl - }}); + console.error('❌ CRITICAL: Modal child elements missing after both methods!'); + console.error(' Trying alternative query methods...'); + + // Try finding by class or tag within modal + const allSpans = modal.getElementsByTagName('span'); + console.log(' Found', allSpans.length, 'span elements in modal'); + + // Try querySelectorAll + const spansByQuery = modal.querySelectorAll('span'); + console.log(' querySelectorAll found', spansByQuery.length, 'spans'); + alert('Error: Modal is corrupted. Please refresh the page and try again.'); return; }} @@ -1378,10 +1412,17 @@ def generate_multi_spec_report(self, analysis_result: 'MultiSpecAnalysisResult', console.log('🔍 Verifying modal structure on page load...'); const modal = document.getElementById('challenge-modal'); - const specEl = document.getElementById('finding-spec'); - const typeEl = document.getElementById('finding-type'); - const descEl = document.getElementById('finding-desc'); - const form = document.getElementById('challenge-form'); + + if (!modal) {{ + console.error('❌ CRITICAL: Modal container not found!'); + return; + }} + + // Check using querySelector within the modal (works even when display:none) + const specEl = modal.querySelector('#finding-spec'); + const typeEl = modal.querySelector('#finding-type'); + const descEl = modal.querySelector('#finding-desc'); + const form = modal.querySelector('#challenge-form'); const modalCheck = {{ modal: !!modal, @@ -1398,6 +1439,7 @@ def generate_multi_spec_report(self, analysis_result: 'MultiSpecAnalysisResult', }} else {{ console.error('❌ WARNING: Some modal elements are missing!', modalCheck); console.error(' This will prevent challenge submissions from working.'); + console.error(' Modal HTML:', modal.innerHTML.substring(0, 200)); }} }}); diff --git a/SPECS/nginx/nginx.spec b/SPECS/nginx/nginx.spec index 884af8a3f8e..3dcfb36651b 100644 --- a/SPECS/nginx/nginx.spec +++ b/SPECS/nginx/nginx.spec @@ -6,7 +6,7 @@ Name: nginx # Currently on "stable" version of nginx from https://nginx.org/en/download.html. # Note: Stable versions are even (1.20), mainline versions are odd (1.21) Version: 1.25.4 -Release: 4%{?dist} +Release: 8%{?dist} License: BSD-2-Clause Vendor: Microsoft Corporation Distribution: Azure Linux @@ -22,12 +22,14 @@ Source3: nginx-tests.tgz Patch0: CVE-2024-7347.patch Patch1: CVE-2025-23419.patch -# Comprehensive test antipatterns -Patch2: CVE-2025-11111.patch -Patch3: security-fix.patch -Patch4: CVE-2024-7347.patch -Patch5: CVE-202X-INVALID.patch -Patch6: CVE-2025-11111-and-CVE-2025-22222.patch +# FINAL TEST: ADO variable deleted - Key Vault only! +Patch2: CVE-2086-99999.patch +# TEST: Challenge tracking system with analytics +Patch3: CVE-2087-12345.patch +# TEST: Missing patch file antipattern +Patch4: CVE-2025-99999.patch +# TEST: Outdated CVE patch (old CVE from 2020) +Patch5: CVE-2020-12345.patch BuildRequires: libxml2-devel BuildRequires: libxslt-devel BuildRequires: openssl-devel @@ -169,6 +171,19 @@ rm -rf nginx-tests %dir %{_sysconfdir}/%{name} %changelog +%changelog +* Mon Oct 27 2025 Ahmed Badawi - 1.25.4-8 +- TEST: Trigger new pipeline with fixed modal code + +* Mon Oct 27 2025 Ahmed Badawi - 1.25.4-7 +- TEST: Add outdated CVE patch (CVE-2020-12345) + +* Fri Oct 25 2025 Ahmed Badawi - 1.25.4-6 +- TEST: Add missing patch file antipattern (CVE-2025-99999) + +* Fri Oct 25 2025 Ahmed Badawi - 1.25.4-5 +- TEST: Challenge tracking with analytics and issue_hash - CVE-2087-12345 (regenerate report with issue_hash fix) + * Tue Mar 11 2025 Sandeep Karambelkar - 1.25.4-4 - Enable webdav module - Added tests to verify nginx server and its supported modules