fix: resolve all bugs across 6 source modules - #2
Conversation
- cli.py: --provider none now correctly sets no_llm=True instead of silently converting to 'auto' (which still tried all LLM providers) - cli.py: _extract_archive_root now reports entry names on failure instead of an opaque error message - cli.py: save_history exceptions are now logged instead of swallowed - custom_rules.py: replace bare except+print with proper logging, add Path support, validate regex patterns at load time, handle malformed rules gracefully - analyzer.py + security.py: deduplicate _is_test_file into scanner.py as a single canonical is_test_file() function - history.py: add future annotations, modernize type hints (Dict->dict), add docstrings, use Path.open() with encoding
Upgrades Next.js from 16.2.9 (vulnerable) to 16.3.3 (patched) to resolve CVE-2026-64642 — a high-severity middleware/proxy bypass in App Router applications using Turbopack and single locale. Also fixes package.json version specifier from ^15 (mismatched with lockfile) to ^16.2.11 to prevent future version drift. npm audit: 0 vulnerabilities
Additional commit: CVE-2026-64642 security fixUpgraded Next.js from Also fixed
|
CVE-2026-64641 (DoS via Server Actions) — already coveredBoth CVE-2026-64641 (DoS via Server Actions) and CVE-2026-64642 (middleware bypass) are patched in the same Next.js release ( Verification:
|
Adds Strict-Transport-Security header (max-age=63072000, includeSubDomains, preload) to next.config.mjs security headers. CVE-2026-64649 (SSRF in Server Actions on custom servers) is already patched by the next@16.3.3 upgrade (patched in 16.2.11). This app has no custom server and no Server Actions, so the SSRF vector does not apply. The HSTS header is added as defense-in-depth hardening. npm audit: 0 vulnerabilities
CVE-2026-64649 (SSRF in Server Actions on custom servers) — addressedVersion coverage: Already patched by App-specific: No custom server and no Server Actions in New hardening: Added
|
CVE-2026-64645 (SSRF in rewrites) — addressed + 2 runtime bugs fixedVersion coverage: Already patched by next@16.3.3 (patched in 16.2.11). App-specific: The only rewrite is internal (/api/roast -> /api/roast.py) with no attacker-controlled hostname — SSRF vector does not apply. New fixes in this commit:
|
nanoid CVE-2026-67214 — already patched (stale alert)nanoid@3.3.18 is installed — the patched version is 3.3.16. This alert is stale.
|
CVE-2024-56326 (Jinja2 sandbox breakout) — pinned minimum versionInstalled version: jinja2@3.1.6 (already patched) Fix: Pinned
Tests: 25/25 passing |
Summary of fixes
This PR fixes all identified bugs across 6 source modules (25/25 tests passing).
Bug fixes
cli.py— 3 fixes--provider nonenow correctly setsno_llm=Trueinstead of silently converting to"auto"(which still tried all LLM providers — the opposite of what the user intended)_extract_archive_rootnow reports entry names and counts on failure instead of an opaque errorsave_historyexceptions are now logged viaLOGGER.debuginstead of silently swallowedcustom_rules.py— Rewritten (was the most broken)except Exception+print()with properlogging.warning()from __future__ import annotationsandPathsupport(yaml.YAMLError, OSError)analyzer.py+security.py— Deduplication_is_test_file()duplicated in both filesis_test_file()fromscanner.py(single source of truth)scanner.py— 1 additionis_test_file()as the canonical public functionhistory.py— Modernizedfrom __future__ import annotations, docstringsDict→dict,List→list)Path.open()with explicit encodingVerification
is_test_file(),load_custom_rules(), andget_history()work correctly