Skip to content

fix: isolate Familiar Mix execution - #25

Open
Oscar-Williams wants to merge 1 commit into
deepfates:mainfrom
Oscar-Williams:fix/mix-gate-isolation
Open

Oscar-Williams wants to merge 1 commit into
deepfates:mainfrom
Oscar-Williams:fix/mix-gate-isolation

Conversation

@Oscar-Williams

Copy link
Copy Markdown

Problem

A rooted Familiar currently allowlists compile and format by default, so workspace Mix code can run before an operator opts in. Mix children also inherit the BEAM process environment, which can expose credentials to untrusted workspace code.

Fix

  • Default the Familiar Mix allowlist to empty; run_tests: true explicitly opts into test.
  • Start Mix children with a minimal environment while preserving caller-provided task variables.
  • Add regressions and document the explicit trust boundary.

Validation

  • mix test test/mix_gate_test.exs (9 passed)
  • mix test test/familiar_test.exs:52 test/familiar_test.exs:64 test/familiar_test.exs:119 (3 passed)
  • mix compile --warnings-as-errors
  • mix format --check-formatted and mix credo --ignore refactor on a clean LF checkout

Closes #24

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Security: mix gate allows arbitrary code execution from a workspace

1 participant