Repository navigation
fix(native): distinguish unknown SIP debugging status - #34
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
| const result = spawnSync( | ||
| "/bin/bash", | ||
| [ | ||
| "-c", | ||
| ` | ||
| function /usr/bin/csrutil() { | ||
| printf '%s\\n' "$SIP_OUTPUT" | ||
| return "$SIP_EXIT" | ||
| } | ||
| function DevToolsSecurity() { printf 'disabled\\n'; } | ||
| script=$1 | ||
| shift | ||
| source "$script" "$@" | ||
| `, | ||
| "sip-test", | ||
| injectHelperScript, | ||
| ], | ||
| { | ||
| encoding: "utf8", | ||
| env: { | ||
| PATH: "/usr/bin:/bin:/usr/sbin:/sbin", | ||
| HOME: "/nonexistent", | ||
| SIP_OUTPUT: output, | ||
| SIP_EXIT: String(code), | ||
| }, | ||
| timeout: 5000, | ||
| }, | ||
| ); |
|
Codex review: needs maintainer review before merge. Reviewed September 19, 2026, 9:15 PM ET / September 20, 2026, 01:15 UTC. ClawSweeper reviewWhat this changesThe helper-injection script distinguishes unknown SIP checks from confirmed restrictions, adds eight safe diagnostic fixtures, and records the behavior in the changelog. Merge readiness✅ Ready for maintainer review This PR remains useful: current main and v0.1.1 retain the diagnostic defect. The focused repair introduces no actionable correctness finding, and collaborator-authored work is protected from automatic closure. Priority: P2 Review scores
Verification
How this fits togetherThe native development script checks macOS security prerequisites before loading the FaceTime helper through LLDB. Its SIP result determines whether operators receive guidance or proceed to the separate Developer Tools check. flowchart TD
A[Operator starts helper injection] --> B[Read SIP command result]
B --> C{Debugging restrictions}
C -->|Unknown or failed| D[Stop with verification guidance]
C -->|Enabled| E[Stop with existing security guidance]
C -->|Disabled| F[Check Developer Tools authorization]
F --> G[Existing helper loading checks]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep prerequisite diagnostics accurate while preserving independent Developer Tools authorization and helper-connectivity verification. Do we have a high-confidence way to reproduce the issue? Yes, from source: failed or unrecognized csrutil results on current main necessarily reach the confirmed-restrictions message. No macOS execution or injection was performed during review. Is this the best way to solve the issue? Yes. Explicit command-success and three-state parsing repair the diagnostic contract without adding configuration, changing host policy, or duplicating plugin behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0a70ab255613. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Change
Fixes #33. Helper injection currently reports failed or unknown
csrutil statusoutput as enabled SIP restrictions and tells operators to reduce SIP protections.Distinguish confirmed enabled, confirmed disabled, and unknown debugging restrictions. Unknown or failed verification stops before injection and asks the operator to run
/usr/bin/csrutil status, without recommending a security-policy change. Match complete status lines so misleading substrings do not authorize attachment.Compatibility and security
Confirmed enabled restrictions retain the existing Recovery instructions. Full SIP disablement and custom configurations with debugging restrictions disabled still proceed to the separate Developer Tools check. No SIP/TCC/Developer Tools changes, injection, native protocol change, new configuration, or release publication.
The corresponding plugin setup report and packaged script are being updated in openclaw/openclaw#119291. A permissive SIP check is not proof of a responding helper.
Validation
pnpm test: 52 tests passed, including eight SIP status scenarios executed through the real Bash script with fixture commands. Developer Tools is disabled in every fixture so tests stop before native effects.scripts/*.shsyntax checks passed.bash scripts/test-native.shpassed.git diff --checkpassed.No live call, real helper injection, permission change, or release was performed. A live call is not needed to verify these prerequisite messages.