feat(bridge): add anthropic streaming sse adapter#182
Conversation
050a494 to
772fbab
Compare
| safe_kind = asset_kind.strip() | ||
| if safe_kind not in {"brand", "fonts"}: | ||
| return JSONResponse({"error": {"message": "Asset kind not found"}}, status_code=404) | ||
| asset_path = (_DASHBOARD_ASSETS_DIR / safe_kind / asset_name).resolve() |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
Copilot Autofix
AI about 2 months ago
Copilot could not generate an autofix suggestion
Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.
| asset_path.relative_to((_DASHBOARD_ASSETS_DIR / safe_kind).resolve()) | ||
| except ValueError: | ||
| return JSONResponse({"error": {"message": "Asset path is invalid"}}, status_code=404) | ||
| if not asset_path.is_file(): |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
Copilot Autofix
AI about 2 months ago
Copilot could not generate an autofix suggestion
Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.
| if not asset_path.is_file(): | ||
| return JSONResponse({"error": {"message": "Asset not found"}}, status_code=404) | ||
| media_type, _ = mimetypes.guess_type(str(asset_path)) | ||
| return FileResponse(asset_path, media_type=media_type) |
Check failure
Code scanning / CodeQL
Uncontrolled data used in path expression High
Copilot Autofix
AI about 2 months ago
Copilot could not generate an autofix suggestion
Copilot could not generate an autofix suggestion for this alert. Try pushing a new commit or if the problem persists contact support.
Summary
Testing