Spaces:
Running
Running
Commit History
-
fix(sonarcloud): batch 9 — S7764 globalThis pass 2, S7773 Number.isNaN/isFinite
ahmdelbaz28-uxS7764 (remaining 24 sites): - Catch patterns the first pass missed: * `typeof window` → `typeof globalThis` * `(window as any)` / `(window as Type)` → `(globalThis as ...)` * `window[...]` → `globalThis[...]` * `self.` → `globalThis.` - Applied across 13 files (main.tsx, useTheme, useWatchTracker, random, auth-storage, Login, Register, trpc, Logo3D, StarfieldBackground, NotificationCenter, AmbientOrbs, performance.spec). S7773 (5 swaps): - `isNaN(x)` → `Number.isNaN(x)` (3 sites: CourseDetail, AdminNotificationPanel, paymob x2) - `isFinite(x)` → `Number.isFinite(x)` (1 site: jwt.ts) Tests: 83/83 pass.1858532 -
fix(sonarcloud): comprehensive security & quality fixes — 200+ issues resolved
ahmdelbaz28-uxBLOCKERS (2): - secrets:S8215 — api/local-auth-router.ts: replace hardcoded bcrypt dummy hash with a lazily-generated hash from crypto.randomBytes (no real hash disclosed in source). - json:S6418 — infra/.../access-policies.json: replace hardcoded Cloudflare service token with ${CLOUDFLARE_ZERO_TRUST_SERVICE_TOKEN_ID} placeholder. CRITICAL BUGS (16): - css:S4670 (x5) — src/index.css: remove stray backslash escapes from attribute selectors ([data-user-menu], [data-sonner-toast], [aria-current]). - typescript:S3923 (x5) — remove ternaries that returned the same value on both branches (ElectricParticles, AdminNotificationPanel x2, NotificationCenter, ForgotPassword). - typescript:S1082 (x6) — add keyboard handlers + role/tabIndex to non- interactive divs with onClick (CookieConsent, input-group, CertificateView, CourseDetail video controls + seek bar + payment modal). VULNERABILITIES (121): - docker:S6470 — Dockerfile: document that COPY . . is safe because of .dockeri…c7df2b5