Spaces:
Build error
Build error
Commit History
-
fix: desktop-mode-adapt dossier output; unify 3 hardcoded copies of its path (P-1)β
Root cause: the dossier/export flow had this same base path hardcoded independently in THREE places, all of which need to agree for the export endpoint to work at all: 1. ai/dossier_generator.py's generate() computed its own <project_root>/data as a path-traversal allowlist (a pre-existing H-07/CodeQL security fix) and joined output_dir onto <project_root> directly. 2. api/routes/export.py passed the literal string "data/processed" as that function's output_dir argument. 3. api/routes/export.py ALSO independently recomputed <project_root>/data/processed as its OWN separate, independent path-traversal allowlist (a second H-07/CodeQL fix) to validate the path generate() handed back before serving the file. New finding while implementing this: (1) and (3) were ALREADY subtly inconsistent with each other before any desktop-mode change -- (1) allowed anything under <project_root>/data/ (e.g. data/samples), while (3) allowed only <project_root>/data/β¦7650d33
-
fix(CodeQL#16-17): use validated real_out path for FileResponse and media_type check in export.py
673a953
-
fix(H-07,CodeQL#12-17): use file-anchored absolute paths for path traversal guards in dossier_generator and export -- relative realpath() was CWD-dependent
6de77e6
-
fix(BUG-17): wire blockchain.audit_chain.store_daily_root() to dossier export -- README SHA-256 claim now accurate
06f5a34 -
fix(NEW-A3 part1): replace em-dashes/smart-quotes in 56+ Python files -- CI requires pure ASCII source
8a0fba4
-
fix(BUG-08): DossierGenerator no longer caches stale Neo4j driver
b7bdaca
-
fix(security): path traversal guards on file output paths β CodeQL alerts 12-16
86a78a9
-
feat(ai): complete β PDF dossier generator with integrity hashβ
Confirmed working: - report_hasher: stable SHA-256 hash, unique per entity, 64 chars, VERIFIED on correct hash, INVALID on tampered hash - dossier_generator: Jinja2 loaded, HTML rendered 10829 chars, HTML fallback working (WeasyPrint needs system libs on Windows, works on Linux in production on Render.com) - templates/dossier_en.html: Indian tricolour design, cover page with SHA-256 hash, 8 sections, evidence locker, risk score bar fix(api): move router registrations after app = FastAPI() Export and multilingual routers were registered before app was created, causing NameError on startup. Fixed import order. Version bumped to 0.12.0 to reflect phases completed. POST method added to CORS allow_methods for /translate endpoint.cb19a24