Skip to content

Bound aggregate ZIP ignore-rule matching work #1899

Closed

Description

@phernandez

Problem

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

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.

Activity

  1. added
    security
    on Oct 28, 2026
  2. claude commented on Oct 28, 2026

    @claude
    Contributor

    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 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.

  3. added
    enhancement
    on Oct 28, 2026
  4. added
    low-priority
    on Oct 28, 2026
  5. added this to the v1.0 milestone on Oct 29, 2026
  6. added 3 commits that reference this issue on Oct 29, 2026
    3ae4b05
    599f61f
    7b19263
  7. phernandez commented on Oct 29, 2026

    @phernandez
    MemberAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementlow-prioritysecurity

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions