You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bound aggregate ZIP ignore-rule matching work #1899
Follow-up from the reviewed CodeRabbit deep scan (K19 C37). This ticket tracks one distinct fix; duplicate scan rows are consolidated here.
Reviewed evidence and scope
K19 (scan ID eab210a5-bb19-4071-b032-d2a5e918964d, review A, Medium): Archive member count multiplied by archive-authored ignore patterns. Budget aggregate matching work, not arbitrary extra retries.
Source at current baseline: src/basic_memory/importers/project_zip_import.py:73.
C37 (scan ID 13c9e15c-6441-41b6-8c30-c75377aeec0a, review D, Medium): Cloud adapter for Core K19 ZIP ignore-rule product work; one planner fix, test the worker boundary too.
Source at current baseline: apps/cloud/src/basic_memory_cloud/services/import_runtime.py:120.
Fix and validation
Bound aggregate ZIP ignore-rule matching work.
Recheck current callers and supported behavior before choosing the smallest complete fix.
Add a bounded regression at the affected public or service boundary; demonstrate it fails without the fix.
Preserve legitimate inputs and tenant/project boundaries. Run focused tests plus repository static/type checks.
The scan/review establishes the code-level concern described above; it does not establish production exploitation. Conditional branches and local/tooling-only exposure must retain that scope.
Type: enhancement (security hardening of existing behavior; no exploitation claimed) Priority: Medium. This matches the scan's Medium rating. The issue says the code-level concern is established but production exploitation is not. Components: Importers / ZIP import planner (src/basic_memory/importers/project_zip_import.py). The cloud adapter named in C37 lives in the separate cloud repo. In this repo the issue is about core, so I'm not labeling it cloud. Complexity: Medium. A fix needs a budget on aggregate matching work, roughly member count times archive-authored ignore patterns. The planner (build_project_zip_import_plan) calls should_ignore_path once per file against patterns loaded from the archive root. The fix also needs a regression test at the planner boundary that fails without it. The cloud worker boundary would need its own test in the other repo.
Duplicates: I searched open issues for related ZIP ignore work and found none. #1899 is the only match.
Notes for whoever picks this up:
The cap should limit total work (files × patterns, or total pattern count), not add retries.
Legitimate archives with ordinary .gitignore-sized rule sets and large file counts must still import.
The failure should raise ProjectZipImportError, like the existing expanded-size limit.
Per the issue, the fix should be coordinated with the cloud repo (C37) so the worker uses the same planner limit.
Per the triage-only scope, I haven't made any code changes.
Fixed in #1939 (7b19263): ZIP imports are capped at 20,000 files and 500 archive-authored ignore patterns. The PR merged through a stacked base, so it did not auto-close this issue.
Activity
claude commentedon Oct 28, 2026
Claude finished @phernandez's task in 17s —— View job
Triage
Type: enhancement (security hardening of existing behavior; no exploitation claimed)
Priority: Medium. This matches the scan's Medium rating. The issue says the code-level concern is established but production exploitation is not.
Components: Importers / ZIP import planner (
src/basic_memory/importers/project_zip_import.py). The cloud adapter named in C37 lives in the separate cloud repo. In this repo the issue is about core, so I'm not labeling itcloud.Complexity: Medium. A fix needs a budget on aggregate matching work, roughly member count times archive-authored ignore patterns. The planner (
build_project_zip_import_plan) callsshould_ignore_pathonce per file against patterns loaded from the archive root. The fix also needs a regression test at the planner boundary that fails without it. The cloud worker boundary would need its own test in the other repo.Duplicates: I searched open issues for related ZIP ignore work and found none. #1899 is the only match.
Notes for whoever picks this up:
.gitignore-sized rule sets and large file counts must still import.ProjectZipImportError, like the existing expanded-size limit.Per the triage-only scope, I haven't made any code changes.
fix(core): cap ZIP import and search query input sizes
fix(core): cap ZIP import and search query input sizes
fix(core): cap ZIP import and search query input sizes (#1939)
phernandez commentedon Oct 29, 2026
Fixed in #1939 (7b19263): ZIP imports are capped at 20,000 files and 500 archive-authored ignore patterns. The PR merged through a stacked base, so it did not auto-close this issue.