Skip to content

fix(native): distinguish unknown SIP debugging status - #34

Merged
omarshahine merged 1 commit into
mainfrom
fix/sip-status-33
Sep 20, 2026
Merged

omarshahine merged 1 commit into
mainfrom
fix/sip-status-33

Conversation

@omarshahine

Copy link
Copy Markdown
Collaborator

Change

Fixes #33. Helper injection currently reports failed or unknown csrutil status output 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

  • Four regressions failed on the previous script: unknown output, empty output, failed command, and an unrecognized suffix.
  • 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.
  • All scripts/*.sh syntax checks passed.
  • bash scripts/test-native.sh passed.
  • git diff --check passed.
  • Independent P0-P2 review passed with no actionable findings. Exact-head hosted CI owns build/archive proof.
  • Changelog updated. No credentials, private call data, or generated artifacts included.

No live call, real helper injection, permission change, or release was performed. A live call is not needed to verify these prerequisite messages.

@omarshahine
omarshahine requested review from a team as code owners September 20, 2026 01:13
@clawsweeper

clawsweeper Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

Comment on lines +58 to +85
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,
},
);
@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 20, 2026
@clawsweeper

clawsweeper Bot commented Sep 20, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed September 19, 2026, 9:15 PM ET / September 20, 2026, 01:15 UTC.

ClawSweeper review

What this changes

The 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
Reviewed head: e53138ee61ad7462898581203a9b9a0d8a311056

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with appropriate safe regression coverage and no blocking findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The collaborator exemption applies to this diagnostic-only repair. Eight command fixtures exercise the script's branches, but are supplemental tests rather than live macOS proof; no material authority-transfer uncertainty requires an exception to that exemption.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The collaborator exemption applies to this diagnostic-only repair. Eight command fixtures exercise the script's branches, but are supplemental tests rather than live macOS proof; no material authority-transfer uncertainty requires an exception to that exemption.
Evidence reviewed 7 items Current main still contains the defect: Failed csrutil execution or unmatched output enters the branch declaring restrictions enabled and recommending a security-policy change.
Latest release source also retains the defect: The v0.1.1 script has the same binary classification. GitHub release metadata confirms publication on September 16, 2026.
Introduced repair preserves downstream safeguards: The verified base-to-head diff checks command success, matches complete status lines, and exits on unknown results before Developer Tools checks, filesystem writes, credentials, or LLDB attachment. Confirmed enabled and supported disabled outcomes retain their existing paths.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Before merge

None.

Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test delta Production +26/-2; tests +97/-0; changelog +3 The modest script growth implements three-state diagnostics with eight focused prerequisite scenarios.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #33
Summary: This PR implements the native-script portion of the explicitly linked diagnostic issue.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Technical review

Best 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.

Labels

Label changes:

  • add P2: This repairs misleading security guidance in an experimental development workflow without evidence of an urgent runtime outage.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The collaborator exemption applies to this diagnostic-only repair. Eight command fixtures exercise the script's branches, but are supplemental tests rather than live macOS proof; no material authority-transfer uncertainty requires an exception to that exemption.

Label justifications:

  • P2: This repairs misleading security guidance in an experimental development workflow without evidence of an urgent runtime outage.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The collaborator exemption applies to this diagnostic-only repair. Eight command fixtures exercise the script's branches, but are supplemental tests rather than live macOS proof; no material authority-transfer uncertainty requires an exception to that exemption.

Evidence

What I checked:

  • Current main still contains the defect: Failed csrutil execution or unmatched output enters the branch declaring restrictions enabled and recommending a security-policy change. (scripts/inject-helper.sh:33, 0a70ab255613)
  • Latest release source also retains the defect: The v0.1.1 script has the same binary classification. GitHub release metadata confirms publication on September 16, 2026. (scripts/inject-helper.sh:33, 3afde42c83db)
  • Introduced repair preserves downstream safeguards: The verified base-to-head diff checks command success, matches complete status lines, and exits on unknown results before Developer Tools checks, filesystem writes, credentials, or LLDB attachment. Confirmed enabled and supported disabled outcomes retain their existing paths. (scripts/inject-helper.sh:33, e53138ee61ad)
  • Focused validation and its limits: Eight fixtures source the actual Bash entrypoint with substituted prerequisite commands and disabled Developer Tools, preventing native side effects. The captured PR body reports 52 passing tests, shell syntax checks, and native checks; these were not rerun during this read-only review. Local diff whitespace validation passed. (tests/inject-helper.test.ts:9, e53138ee61ad)
  • Repository policy and ownership boundary: The full root AGENTS.md, README.md, and CONTRIBUTING.md were read. No nested AGENTS.md or maintainer-notes directory was found. Native diagnostics belong here; plugin setup belongs in OpenClaw. This diff changes no shared protocol contract or end-to-end call behavior. (AGENTS.md:3, e53138ee61ad)
  • Related issue and discussion: Distinguish unknown SIP status from blocked helper attachment #33 explicitly requests this native diagnostic repair and separate plugin coordination. Its discussion supports inert fixtures and preserving independent authorization/connectivity checks. This PR is its open implementation candidate.

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@omarshahine
omarshahine merged commit 4b406fb into main Sep 20, 2026
15 checks passed
@omarshahine
omarshahine deleted the fix/sip-status-33 branch September 20, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Distinguish unknown SIP status from blocked helper attachment

2 participants