Workspace Structure Assembler
Untrusted TargetInclude .git/ directory
Attacker repo cloned or extracted into workspace
Payload: .git/hooks/post-checkout triggering /bin/sh without user confirmation.
Mitigation & Defense Controls
Security LayersDisable Workspace Git Hooks
Forces
-c core.hooksPath=/dev/null on CLI Git invocationsSandbox Isolation & Seatbelt Policy
Restricts macOS subshell creation and forbids outbound parent process escalation
Git Directory Ownership Validation
Verifies current user ownership; refuses untrusted workspace repositories
Evaluation Verdict
VULNERABLE
Risk Assessment:
Critical
Identified Execution Vector
Unrestricted command execution via workspace .git hook with logged-in user authority
Defense Recommendation
Apply strict git directory ownership checks and sandbox CLI file-system isolation
Process Runtime Context
ESCAPE ACTIVE
Process Owner:
uid=501 (Staff/Dev)
User Prompted:
NO (Bypassed)
Seatbelt Jailed:
NO (Native Shell)
System Access:
Unrestricted (~/.*)
Execution Flow & Process Trace
macOS /usr/bin/git subshell
Beltdown2 Architectural Flaw Summary
AI Developer CLI tools often execute Git operations (e.g., status, diff, log, checkout) to understand workspace context. Without explicit flags like -c core.hooksPath=/dev/null or kernel-level Seatbelt sandbox profiles, opening an untrusted repository triggers executable Git hooks or custom config commands with the developer's native user credentials, bypassing model permission dialogs completely.