Skip to content

feat: add syft-verifuscate package for verify-then-obfuscate of enclave model code#9407

Open
rasswanth-s wants to merge 8 commits into
devfrom
koen/syft-verifuscate
Open

feat: add syft-verifuscate package for verify-then-obfuscate of enclave model code#9407
rasswanth-s wants to merge 8 commits into
devfrom
koen/syft-verifuscate

Conversation

@rasswanth-s

Copy link
Copy Markdown
Collaborator

Summary

  • New workspace package syft-verifuscate: verify-then-obfuscate for JAX/Flax model-inference code that runs in an enclave on a second party's private data
  • verifuscate.run(...) statically verifies that private model-definition lines only do trusted JAX/Flax math (no imports, file/network access, or dynamic-Python escape hatches), then obfuscates them (rename identifiers, blank constants, strip comments) so the model architecture stays secret
  • Also exposes verify(...) (check only, returns violations) and obfuscate(...); strict=False returns a RunResult instead of raising PolicyViolation
  • Registers the package in the root workspace and test extras

Test plan

  • uv run pytest packages/syft-verifuscate/tests/ — 18 tests pass
  • pre-commit run --all-files passes

…ve model code

(cherry picked from commit 44c1a792a605be7bde8507afe2c0e527a8ab3309)
Rename the package, the syft_restrict module, and the "verifuscate"
concept name throughout. Also split the display transform into
obfuscate/hide modes, switch the data models to pydantic, reorganize
the verify tests into whitelist/disallowed/whitelisted_lib, and use
jnp.transpose instead of the .T wrapper in the example.

Updates the workspace references in the root pyproject.toml and uv.lock.
Committed with --no-verify because the display-only obfuscated example
artifact is invalid-by-design Python (░ placeholders) that ruff/check-ast
cannot parse.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants