Skip to content

[Workstream L] PR 1 of 2: One capture policy for every importer, new credential shapes, quarantine #180

Description

@zaxbysauce

Part of #100 (EPIC). Workstream L. One issue = one PR.
Source: zmem deep audit 2026-09-10 (https://claude.ai/code/artifact/39012f75-25f0-441b-978f-cc90a3bd3a9d) and issue plan v3 (https://claude.ai/code/artifact/59e74242-17da-4416-9b00-0b0cf347837c); dependency DAG computed over all open PRs (edge kinds: Depends on = merged artifact, Schema after = migration lane, Gated on = #100 measurement/decision gate).

Labels: bug, severity:high. Depends on: none. Blocks: L-2 (#181).

Problem. Row b513b21c holds a plaintext SSH password in an sshpass -p … string. SECRET_PATTERNS (correction_queue.py:68-73) match password[:=], key prefixes and PEM blocks, not sshpass -p <value> or sudo -S. JSONL ingest applies capture policy (storelib/sync.py:855-890), but import-store.py, MCP add, Hermes zmem_add and ingest_harvest.py do not all route through one function, and there is no quarantine.

Design. Patterns for sshpass -p, sudo -S, --password=, -p<value> after ssh/mysql/psql, URL userinfo; storelib/write.py::apply_capture_policy() becomes the single entry for all five importers; a whole-row hit writes <data>/quarantine/<date>.jsonl with a reason instead of the store and counts it in the import report. Operator runbook step in the PR body: invalidate b513b21c, rotate.

Acceptance criteria. (a) Importer matrix test (five importers × tests/fixtures/secrets/sshpass.jsonl) → redacted content and auto-redacted tag in all five. (b) Whole-row credential fixture → one quarantine JSON line, no memory row (SHA-256 compare). (c) tests/fixtures/secrets/patterns.json: 12 positives and 12 negatives ("passwd entry" negative) → expected. (d) No test removed.

Activity

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

    bugSomething isn't workingseverity:highHigh-severity finding from codebase review

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions