lint: classify raw socket callsites#77126
Conversation
|
Codex review: passed. Summary Reproducibility: not applicable. This PR adds CI guardrails and documentation, not a runtime bug. The exact-head Real behavior proof Next step before merge Security Review detailsBest possible solution: Land the additive CodeQL guardrail after secops/CODEOWNERS review and exact-head CI disposition, keeping the proxy docs and changelog aligned. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR adds CI guardrails and documentation, not a runtime bug. The exact-head Is this the best way to solve the issue? Yes: an additive CodeQL Critical Quality shard is a maintainable place for this policy, and the docs describe the managed-proxy coverage boundary. The remaining decision is maintainer/secops approval plus CI disposition, not a code repair from this review. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 8e88c7b29768. |
afd320e to
3cbe918
Compare
3cbe918 to
57168ce
Compare
0166811 to
40d0c4c
Compare
|
/clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
/clawsweeper re-review |
40d0c4c to
2355b49
Compare
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
/clawsweeper re-review |
2355b49 to
c4ff121
Compare
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
/clawsweeper re-review |
c4ff121 to
9a880ee
Compare
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
/clawsweeper re-review |
9a880ee to
9416bda
Compare
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
There was a problem hiding this comment.
Pull request overview
This PR tightens the project’s network security posture by introducing CodeQL-based “boundary guard” checks that prevent new unclassified raw-socket egress and unmanaged proxy-runtime state mutations from landing without explicit review, and documents managed-proxy coverage/behavior for operators.
Changes:
- Add new CodeQL boundary queries to (1) require classification of raw
net/tls/http2client connect callsites and (2) restrict proxy-relatedprocess.envandGLOBAL_AGENTmutations to approved owner scopes. - Wire a new
network-runtime-boundaryshard into the “CodeQL Critical Quality” workflow and add a dedicated CodeQL config for these network boundary checks. - Update proxy security docs with a managed-proxy coverage/status table and add a changelog entry describing the new boundary checks.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| docs/security/network-proxy.md | Adds a managed proxy coverage/status table documenting which traffic surfaces are proxied vs raw/direct. |
| CHANGELOG.md | Records the managed proxy/security boundary-check additions. |
| .github/workflows/codeql-critical-quality.yml | Introduces a new network-runtime-boundary shard/job and expands PR path triggers for network boundary checks. |
| .github/codeql/openclaw-boundary/queries/raw-socket-callsite-classification.ql | New CodeQL query enforcing classification/allowlisting of raw socket connect callsites. |
| .github/codeql/openclaw-boundary/queries/managed-proxy-runtime-mutation.ql | New CodeQL query enforcing owner-scope restrictions for proxy-related runtime mutations. |
| .github/codeql/openclaw-boundary/qlpack.yml | Adds a local CodeQL pack definition for the boundary queries. |
| .github/codeql/openclaw-boundary/codeql-pack.lock.yml | Adds the dependency lockfile for the local CodeQL pack. |
| .github/codeql/codeql-network-runtime-boundary-critical-quality.yml | Adds a dedicated CodeQL config that runs the new network boundary queries over src and extensions. |
| - Managed proxy/security: classify raw socket callsites and proxy runtime mutations in boundary checks so new direct egress or unmanaged proxy-state changes cannot land without explicit review. (#77126) Thanks @jesse-merhi. | ||
|
|
||
|
|
||
|
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
f8d974b to
aabeb29
Compare
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
/clawsweeper re-review |
|
/clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
/clawsweeper re-review |
1 similar comment
|
/clawsweeper re-review |
|
/clawsweeper automerge |
|
ClawSweeper 🐠 automerge status ClawSweeper finished this automerge repair pass without changing the branch. Executor outcome: no planned fix actions. Worker actions:
Nothing moved downstream from this pass: no branch update, replacement PR, merge, or re-review. fish notes: model gpt-5.5, reasoning high. Automerge progress:
|
|
🦞✅ Source: I added |
|
/clawsweeper automerge |
Summary
lint:tmp:raw-socket-classificationboundary guard requiring rawnet.connect,tls.connect, andhttp2.connectcallsites to be classified before landing, with rationale comments for current allowlisted callsites (local IPC/probes, APNs HTTP/2 wrapper, managed CONNECT tunnel helper, debug proxy internals, QA lab diagnostics, IRC)lint:tmp:managed-proxy-runtime-mutationboundary guard requiring direct mutation ofprocess.envproxy keys andglobal/globalThis.GLOBAL_AGENT to live in the canonical proxy-lifecycle owner, with a narrow allowlist for the proxy lifecycle and the browser CDP loopback bypass helperlint:tmp:no-raw-http2-importsandlint:tmp:managed-proxy-runtime-mutationinto the additional boundary checks pipelineproxy.loopbackMode(gateway-onlydefault,proxy,block), the--apns-reachablevalidation probe, and a managed-proxy coverage/status table indocs/security/network-proxy.mdTest Plan
OPENCLAW_LOCAL_CHECK=0 pnpm test test/scripts/check-raw-socket-callsite-classification.test.ts test/scripts/check-managed-proxy-runtime-mutation.test.ts test/scripts/run-additional-boundary-checks.test.tspnpm lint:tmp:raw-socket-classificationpnpm lint:tmp:managed-proxy-runtime-mutationpnpm lint:tmp:no-raw-http2-importspnpm format:check scripts/check-raw-socket-callsite-classification.mjs scripts/check-managed-proxy-runtime-mutation.mjs test/scripts/check-raw-socket-callsite-classification.test.ts test/scripts/check-managed-proxy-runtime-mutation.test.ts test/scripts/run-additional-boundary-checks.test.ts scripts/run-additional-boundary-checks.mjs package.json docs/security/network-proxy.mdOPENCLAW_LOCAL_CHECK=0 pnpm check:changed