Skip to content
This repository was archived by the owner on Jun 16, 2026. It is now read-only.

feat: enclave dataset immutability via pre-write filter - #328

Closed
bitsofsteve wants to merge 1 commit into
mainfrom
stephen/enclave-dataset-immutability
Closed

feat: enclave dataset immutability via pre-write filter#328
bitsofsteve wants to merge 1 commit into
mainfrom
stephen/enclave-dataset-immutability

Conversation

@bitsofsteve

@bitsofsteve bitsofsteve commented Jun 15, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds an optional pre_write_filter hook to DataSiteWatcherCache that gates every file write/delete in apply_event_message()
  • Implements make_private_dataset_immutability_filter() in the enclave package — blocks overwrites/deletes of private dataset files that already exist on disk
  • Wires the filter in SyftEnclaveClient.from_config() so all enclave instances enforce immutability automatically

Threat addressed: Once a DO shares private dataset files with the enclave, subsequent re-sends or sync cycles cannot overwrite them — ensuring the data the enclave computes on remains the same as what was originally delivered.

Test plan

  • Unit tests for is_private_dataset_path() (positive, public path, wrong subdir, too short)
  • Unit tests for the filter (allows first write, blocks overwrite, blocks delete, allows non-dataset paths, allows remaining files in batch)
  • Integration test: full quad setup, DO shares dataset, DO re-shares tampered data, enclave retains original
  • All 67 existing enclave tests pass
  • All 113 syft_bg tests pass

Prevents overwrites/deletes of private dataset files once they exist on
the enclave filesystem, ensuring data integrity between share and job
execution.
@rasswanth-s

Copy link
Copy Markdown
Collaborator

Closing this in favor, as we are shifting to PySyft repo

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants