Spaces:
Running
Running
Commit History
4 days ago
-
fix(sonar): wave 6 - operator tooling + infra, 477 findings (scripts/, infra/, tests/, cache/, public/, .agents/, .github/, Dockerfile)
Z UserSECURITY (real fixes at root): - S2083 BLOCKER: lh_static_server path traversal -> canonical resolve + root-prefix check + 403 - S5144 SSRF: prod_reverse_proxy -> fixed upstream + allowlist + origin-form - S5443 x22: probe artifacts moved from /tmp to project-local .cache dirs - S2245 x5: credential material -> node:crypto randomBytes - S8689: log redaction helper for token/secret material - S5145 x4: log injection sanitized; S8476: CSRF URL allowlist - S4036 x3: absolute executable paths instead of PATH lookup - S9383 BUG: cache-nuke promise handled; S3923 x3 + S1244 x2 + S5797 real bugs collapsed / math.isclose SMELLS: python S1192 literals hoisted (53), S3776 refactored (32) with differential fuzz equivalence on parsers, S1481/S1186/S1172/S1854/S8513... ; js/ts scripts S9382/S6582/S3358/S7780/S7785/S4624...; infra worker S3776 28->extracted; page objects; cache/ TS files; GitHub Actions snake_case; Dockerfile RUN arg order; shell [[ conditionals. Verified: node --check all edi…23a1787
-
fix(scripts): define S1192 constants 5d6872d left as self-assignments
Z UserT_RPC = T_RPC (x4) raised NameError at runtime AND produced 4 MAJOR python:S1656 findings that dropped the SonarCloud quality gate (new_reliability_rating = C, required >= A) — the only red check on CI. Real values restored from pre-5d6872d literals: T_RPC='/api/trpc/', AUTH_ME='auth.me', CT_JSON='application/json', LOGIN_PATH='/login'. Verified by re-running the full E2E: A/B/C/D scenarios ALL PASSED (fresh visitor gate, stale-cookie single-401 recovery, logged-in open, post-login chat open).9c19d05
-
fix(sonar): close actionable findings — safe int coercion, awaits, constants, tempfile hotspot
Z User- FloatingIconsBg: Math.trunc instead of bitwise |0 int-coercion - paymob: Number.NaN instead of bare NaN - r2/admin-tickets/course-enrollment: explicit return await (PromiseLike) - chatbot-stream: sync TransformStream.transform (no await inside) - chatbot: validateGroqKey/validateNvidiaKey now sync — all call sites already await - main: registerServiceWorker sync — awaited call site still valid - Logo3D/BackgroundLogoWatermark: .dataset over getAttribute - chatbot_gate_e2e.py: pid-suffixed tempfile boot log (security hotspot) + shared literal constants (S1192) ReDoS findings (S6443 x9) reviewed line-by-line: every flagged pattern is linear/anchored (/\/+$ on env config, [^>]* bounded, bounded markdown line anchors) — false positives, no remediation needed. Cognitive-complexity refactors (23 fns) intentionally deferred to a dedicated task.5d6872d
-
fix(chatbot): dead FAB click when logged out — kill the infinite 401 refetch loop
Z UserUSER REPORT: clicking the chatbot while logged out did nothing (used to redirect to /login). ROOT CAUSE (measured ~60 req/s in a sandbox E2E): the non-HttpOnly elbaz_auth_flag cookie (30-day maxAge) outlives the real session. On load, auth.me fires for its 3 subscribed observers and 401s. The global auth-failure handler (trpc.tsx) then called queryClient.removeQueries() SYNCHRONOUSLY inside the QueryCache onError — before React ever saw the error. removeQueries recreates the query for the still-subscribed observers (enabled hasn't flipped yet — useAuth's error effect never runs because the error state is wiped before commit), every recreation auto-refetches → 401 → removeQueries → … an infinite UNAUTHORIZED loop with authLoading stuck true, so every FAB click hit the 'still checking' branch and was swallowed. FIX: - trpc.tsx: park auth.me in a terminal error state via query.setState() (no removal → no recreation → no refetch) instead of removeQueries() - useAuth: on UNAUTHORIZED → …0546ff7