Skip to content

Run init-captured rows through the quarantine scan #302

Closed

Description

@ocsi-architect

Part of #291.

Problem

Init is the only capture path that never runs the quarantine scan. quarantineCandidate is applied to auto-capture (src/capture/runtime.ts:268) and to import (src/portable/import.ts:86), but init rows are built at src/init/run.ts:164 from repo-derived text and go straight to runWriteGate unscreened. Both parts of the row are external text: scope is the checkout directory basename (src/init/run.ts:105) and s.cmd comes from the file detectors. A row whose content or scope matches an injection pattern — e.g. a clone directory named eval (x), which matches the dynamic_execute pattern in src/store/quarantine/quarantine.ts — is promoted with no quarantine tag and injected with no marker (src/inject/format.ts:17 limits provenance markers to auto-capture/import). Verified at sha 7405dc61d919e7eee7033dea6e4324eda58ee669.

Fix direction

In src/init/run.ts, wrap the candidate object passed to runWriteGate for each detected script in quarantineCandidate — the same call shape as src/portable/import.ts:86. quarantineCandidate already scans both content and scope (see its #205 comment). Test coverage in test/init.test.ts.

Acceptance

  • RED: on main 7405dc6, a test that runs memory_init in a fixture repo whose directory basename contains eval ( and asserts the promoted script row carries the quarantine tag fails — on main the row is promoted without it.
  • GREEN: bun test test/init.test.ts passes; an init-promoted row whose content or scope matches a quarantine pattern carries quarantine plus the quarantine:<id> tag(s), and the existing clean fixture (plain repo directory, clean scripts) still promotes untagged rows.

Activity

  1. added
    severity:medium
    spec:draft
    on Nov 4, 2026
  2. added
    agent:ready
    on Nov 5, 2026
  3. abogartz-opencode-self-improvement commented on Nov 9, 2026

    @abogartz-opencode-self-improvement

    🎉 This issue has been resolved in version 0.22.1 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

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

    agent:readyreleasedseverity:mediumspec:draft

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions