Skip to content

[Sad Catapella B8][Data safety] CLI --log opens arbitrary files before validating experiment and output paths #99

Closed

Description

@guijacquemet

Basis

Batch 8, pinned commit d7a538e56d41ac1093ba79adcad397c21b3dfd32. Confirmed unsafe write path by source inspection; no destructive reproduction performed.

Evidence

Reproduction outline

morphobricks-preprocessing run EXP --axes YX --log EXP/notes.txt creates a new file inside the experiment before processing; --log EXP/image.tif appends logging messages to an existing microscopy input (potential file corruption); --log OUTPUT/experiment_design.csv can append text to a published scientific artifact. Even an invalid run can produce these writes.

Impact / fix

Contradicts read-only input guarantee, can change discovered inputs and corrupt source or generated records. Before constructing any FileHandler, resolve and validate --log target against the experiment root, input file identities, reserved output artifacts, and output staging paths (including symlink containment policy from #81). Prefer requiring a dedicated logs directory outside the data tree; document any explicit override. Keep log path validation before any write and report actionable CLI errors. Add negative tests for input and output collisions and a positive external path. Numba irrelevant.

Activity

  1. added 3 commits that reference this issue on Nov 2, 2026
  2. added a commit that references this issue on Nov 2, 2026
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions