Skip to content

fix(plugins): sanitize empty marketplace reports - #185374

Closed
Leon-SK668 wants to merge 1 commit into
openclaw:mainfrom
Leon-SK668:leon/fix-empty-marketplace-terminal-report-20261027
Closed

Leon-SK668 wants to merge 1 commit into
openclaw:mainfrom
Leon-SK668:leon/fix-empty-marketplace-terminal-report-20261027

Conversation

@Leon-SK668

Copy link
Copy Markdown
Contributor

What Problem This Solves

openclaw plugins marketplace list <source> already sanitizes populated marketplaces, but its empty-result branch prints the original source path directly. A valid local marketplace in a directory containing terminal controls can therefore ring the bell or forge report lines simply when listed.

Why This Change Was Made

Use the existing sanitizeTerminalText on the empty report's source label, at the same human-output boundary as the populated report. The --json branch still returns the original source and manifest values. This closes the missing sibling of merged #178325 without changing marketplace loading or validation.

Existing-solutions preflight: the maintained terminal-core/SDK sanitizer already owns this contract, so this reuses it. No new library, wrapper sanitizer, plugin or service is required. The selected complete owner is src/cli/plugins-marketplace-list-command.ts; its registration, callers, sibling reports, tests, source handling and sanitizer were read. All-state title/symptom/symbol/path searches and complete Leon/Alix public open-footprint/changed-file checks found no viable same-invariant competitor. Latest checked main d94b2dc9c7a6fb81bdda2977ece7322d20d8755b leaves the three report owners, exercised source owners/sanitizer and six publication contracts unchanged from the recorded base.

User Impact

Empty marketplace reports remain one safe line; ordinary Unicode and the existing wording remain readable. Machine consumers retain the exact source path, including legitimate characters in local filenames.

No new or changed config/default, protocol/schema, dependency, migration, permission or storage contract. Existing trusted report layout and severity styling are retained. Release-note context: safely render human plugin CLI reports without rewriting machine/raw values.

Evidence

  • Actual native RED source/build: 173c8537d5ae4ea1da4200ba59da584b76bb5600. Exact GREEN source/build: 8ef2b5111fad3cdbd8a8e5458e10bffd8434d802, tree 3b757b18f9d5513f133966036196521254056fcb; clean independent worktree, Node v24.22.1, Linux, task-owned isolated HOME/state/config/files. No production instance, external service, model call or real channel was used.
  • Six public CLI calls per revision: ordinary and control-containing empty marketplaces in human/JSON mode, plus populated human/JSON controls. Every CLI exits0 with empty stderr. The RED empty report contains BEL/C1 and a forged line; GREEN removes BEL/C1 and displays the data newline literally. All three original marketplace manifests and decoded JSON source values are independently reopened and compared.
  • Same proof command before/after: node openclaw.mjs plugins marketplace list <local-marketplace-directory>; full setup, companion calls, original lengths/hashes and complete stdout/stderr are below.
  • Frozen recorder SHA256 5059d75346efe1b42885420e04cd5608999b08d95833eacbb152947679ad7e92; separate disk/SQLite reader SHA256 3cde35321991104e90ea6cee5d04f9b16fe3f39e00c902a86014755e67d13e8f. Both RED/GREEN readbacks PASS and launch zero additional product calls. These are saved real subprocess/PTY streams and actual file/SQLite readbacks, not merely test outcomes or script assertions.
  • Author simplification and test audit completed. The user explicitly waived independent autoreview; no independent review pass is claimed. Production/test LOC below are separate; no generated/lock/proof asset files are committed.
Gate Actual result
Tests-only baseline 14 PASS / 1 intended FAIL; 144.23 s
Focused GREEN 15/15 PASS; 132.98 s
Strict source/test types PASS; 96.93 s
Canonical typed lint 293 rules, 2 files, zero diagnostics; 379.59 s
Format / whitespace PASS
Exact source build PASS; 295.49 s
Native RED / GREEN 6/6 actual calls; child wall totals 22.851 s / 27.187 s

Commands (one worker; wrapper/preparation time included above):

OPENCLAW_VITEST_RUNTIME=node OPENCLAW_VITEST_MAX_WORKERS=1 node scripts/run-vitest.mjs src/cli/plugins-cli.marketplace-entries.test.ts --maxWorkers=1
OPENCLAW_LINT_TOOL=oxlint OPENCLAW_TYPECHECKER=tsgo node scripts/run-oxlint.mjs --tsconfig config/tsconfig/oxlint.source.json --format json src/cli/plugins-marketplace-list-command.ts src/cli/plugins-cli.marketplace-entries.test.ts
OPENCLAW_TYPECHECKER=tsgo node scripts/run-tsgo.mjs -p .artifacts/tsconfig.marketplace-report.json --incremental
OPENCLAW_FORMAT_TOOL=oxfmt node scripts/run-format.mts --check src/cli/plugins-marketplace-list-command.ts src/cli/plugins-cli.marketplace-entries.test.ts
git diff --check
node --import ./scripts/tsx.mjs scripts/build-all.mts sourcePerformance

The local ignored typecheck project only scopes the repository's existing strict test config to the two touched files plus ambient declarations; no compiler/lint setting is weakened. Full Vitest test timing includes startup/compilation; no hosted CI duration is claimed. Diff numstat is additions/deletions:

50	36	src/cli/plugins-cli.marketplace-entries.test.ts
3	1	src/cli/plugins-marketplace-list-command.ts

The two net production lines are the existing sanitizer call and formatter wrapping; no new helper, branch, state or abstraction. Required CI and the first durable bot/human review can only occur after publication; neither is preclaimed here.

The following captures are complete. Within each JSON string, decode [U+hhhh] to that control code point, and [JSON-ESCAPE-U+hhhh] to a literal backslash, lowercase u and the shown four hex digits. The collision-checked codec round-trips every original string and survives the publication transport. Only task-root/checkout/executable paths are normalized. Hashes/lengths refer to original captured bytes; synthetic fixture values are preserved.

Exact native identities and independently reopened disk/SQLite evidence
{
  "red": {
    "head": "173c8537d5ae4ea1da4200ba59da584b76bb5600",
    "receiptSha256": "dc51c423e0bd942de743b0a43970b6a6110c2ecd832a33ab32777bf080c99c5c",
    "at": "2026-10-27T02:25:55.794Z",
    "node": "v24.22.1",
    "build": {
      "version": "2026.10.7",
      "commit": "173c8537d5ae4ea1da4200ba59da584b76bb5600",
      "builtAt": "2026-10-27T02:13:59.897Z",
      "buildId": "2026.10.7-173c8537d5ae-2026-10-27T02-13-59.897Z"
    },
    "driverSha256": "5059d75346efe1b42885420e04cd5608999b08d95833eacbb152947679ad7e92",
    "childElapsedMs": 22851
  },
  "green": {
    "head": "8ef2b5111fad3cdbd8a8e5458e10bffd8434d802",
    "receiptSha256": "01beed5a85f897db98f1c6fca425b6f81a49dd11e771dc6e1bb1854da7e02b07",
    "at": "2026-10-27T02:55:19.183Z",
    "node": "v24.22.1",
    "build": {
      "version": "2026.10.7",
      "commit": "8ef2b5111fad3cdbd8a8e5458e10bffd8434d802",
      "builtAt": "2026-10-27T02:47:43.390Z",
      "buildId": "2026.10.7-8ef2b5111fad-2026-10-27T02-47-43.390Z"
    },
    "driverSha256": "5059d75346efe1b42885420e04cd5608999b08d95833eacbb152947679ad7e92",
    "childElapsedMs": 27187
  },
  "redReadback": {
    "status": "PASS",
    "lane": "marketplace",
    "head": "173c8537d5ae4ea1da4200ba59da584b76bb5600",
    "phase": "RED",
    "receiptSha256": "dc51c423e0bd942de743b0a43970b6a6110c2ecd832a33ab32777bf080c99c5c",
    "readerSha256": "3cde35321991104e90ea6cee5d04f9b16fe3f39e00c902a86014755e67d13e8f",
    "savedStreams": 12,
    "files": [
      {
        "path": "<PROOF_ROOT>/ordinary/plain-café-🦀/marketplace.json",
        "sha256": "cf7d967e902a5bb69e8afb747527ce56f5883f1e8da87c6c78b813c110a53661",
        "raw": "{\"name\":\"Owned plain-café-🦀\",\"plugins\":[]}\n",
        "exactSourceReadback": true
      },
      {
        "path": "<PROOF_ROOT>/ordinary/plain-café-🦀/populated.json",
        "sha256": "22cf0edc4325e37d5c75b406eeb1e138e0f99e9cf81372a50f933938116df79f",
        "raw": "{\"name\":\"Owned café\\nFORGED[JSON-ESCAPE-U+0007][U+0085]🦀\",\"plugins\":[{\"name\":\"example\",\"version\":\"1.0.0\",\"source\":\"./demo\"}]}",
        "exactSourceReadback": true
      },
      {
        "path": "<PROOF_ROOT>/controls/café\nFORGED[U+0007][U+0085]🦀/marketplace.json",
        "sha256": "4e33efd13b8cc26388dd54c04fb7b4a034f8c1bf365bc4d0d0ce0896e8e2a609",
        "raw": "{\"name\":\"Owned café\\nFORGED[JSON-ESCAPE-U+0007][U+0085]🦀\",\"plugins\":[]}\n",
        "exactSourceReadback": true
      }
    ],
    "sqliteRows": [],
    "productInvocations": 0
  },
  "greenReadback": {
    "status": "PASS",
    "lane": "marketplace",
    "head": "8ef2b5111fad3cdbd8a8e5458e10bffd8434d802",
    "phase": "GREEN",
    "receiptSha256": "01beed5a85f897db98f1c6fca425b6f81a49dd11e771dc6e1bb1854da7e02b07",
    "readerSha256": "3cde35321991104e90ea6cee5d04f9b16fe3f39e00c902a86014755e67d13e8f",
    "savedStreams": 12,
    "files": [
      {
        "path": "<PROOF_ROOT>/ordinary/plain-café-🦀/marketplace.json",
        "sha256": "cf7d967e902a5bb69e8afb747527ce56f5883f1e8da87c6c78b813c110a53661",
        "raw": "{\"name\":\"Owned plain-café-🦀\",\"plugins\":[]}\n",
        "exactSourceReadback": true
      },
      {
        "path": "<PROOF_ROOT>/ordinary/plain-café-🦀/populated.json",
        "sha256": "22cf0edc4325e37d5c75b406eeb1e138e0f99e9cf81372a50f933938116df79f",
        "raw": "{\"name\":\"Owned café\\nFORGED[JSON-ESCAPE-U+0007][U+0085]🦀\",\"plugins\":[{\"name\":\"example\",\"version\":\"1.0.0\",\"source\":\"./demo\"}]}",
        "exactSourceReadback": true
      },
      {
        "path": "<PROOF_ROOT>/controls/café\nFORGED[U+0007][U+0085]🦀/marketplace.json",
        "sha256": "4e33efd13b8cc26388dd54c04fb7b4a034f8c1bf365bc4d0d0ce0896e8e2a609",
        "raw": "{\"name\":\"Owned café\\nFORGED[JSON-ESCAPE-U+0007][U+0085]🦀\",\"plugins\":[]}\n",
        "exactSourceReadback": true
      }
    ],
    "sqliteRows": [],
    "productInvocations": 0
  }
}
Complete native RED commands and stdout/stderr (6 calls)
[
  {
    "case": "ordinary",
    "step": "empty-human",
    "terminal": false,
    "executable": "node",
    "args": [
      "<CHECKOUT>/openclaw.mjs",
      "plugins",
      "marketplace",
      "list",
      "<PROOF_ROOT>/ordinary/plain-café-🦀"
    ],
    "exit": 0,
    "elapsedMs": 4223,
    "stdoutBytes": 144,
    "stderrBytes": 0,
    "stdoutSha256": "927bec8c4b10489b4721bd9aa1553e3b17cf81a7e410787ca349487888a0863c",
    "stderrSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "stdout": "No plugins found in marketplace <PROOF_ROOT>/ordinary/plain-café-🦀/marketplace.json.\n",
    "stderr": ""
  },
  {
    "case": "ordinary",
    "step": "empty-json",
    "terminal": false,
    "executable": "node",
    "args": [
      "<CHECKOUT>/openclaw.mjs",
      "plugins",
      "marketplace",
      "list",
      "<PROOF_ROOT>/ordinary/plain-café-🦀",
      "--json"
    ],
    "exit": 0,
    "elapsedMs": 3671,
    "stdoutBytes": 182,
    "stderrBytes": 0,
    "stdoutSha256": "acf8d8c3f16b8d744600f706412f759438ee419799523804463123d93ce255d6",
    "stderrSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "stdout": "{\n  \"source\": \"<PROOF_ROOT>/ordinary/plain-café-🦀/marketplace.json\",\n  \"name\": \"Owned plain-café-🦀\",\n  \"plugins\": []\n}\n",
    "stderr": ""
  },
  {
    "case": "ordinary",
    "step": "populated-human",
    "terminal": false,
    "executable": "node",
    "args": [
      "<CHECKOUT>/openclaw.mjs",
      "plugins",
      "marketplace",
      "list",
      "<PROOF_ROOT>/ordinary/plain-café-🦀/populated.json"
    ],
    "exit": 0,
    "elapsedMs": 3581,
    "stdoutBytes": 51,
    "stderrBytes": 0,
    "stdoutSha256": "59aace17813e1ddc2f5f53b4a827ba22c18a9aa814c44f003f26a040abde66ba",
    "stderrSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "stdout": "Marketplace Owned café\\nFORGED🦀\nexample v1.0.0\n",
    "stderr": ""
  },
  {
    "case": "ordinary",
    "step": "populated-json",
    "terminal": false,
    "executable": "node",
    "args": [
      "<CHECKOUT>/openclaw.mjs",
      "plugins",
      "marketplace",
      "list",
      "<PROOF_ROOT>/ordinary/plain-café-🦀/populated.json",
      "--json"
    ],
    "exit": 0,
    "elapsedMs": 3491,
    "stdoutBytes": 330,
    "stderrBytes": 0,
    "stdoutSha256": "eb73f55ccd43dc58b860f0ac2f64f827bba7bf09578983bf2dc3cb819b950b37",
    "stderrSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "stdout": "{\n  \"source\": \"<PROOF_ROOT>/ordinary/plain-café-🦀/populated.json\",\n  \"name\": \"Owned café\\nFORGED[JSON-ESCAPE-U+0007][U+0085]🦀\",\n  \"plugins\": [\n    {\n      \"name\": \"example\",\n      \"version\": \"1.0.0\",\n      \"source\": {\n        \"kind\": \"path\",\n        \"path\": \"./demo\"\n      }\n    }\n  ]\n}\n",
    "stderr": ""
  },
  {
    "case": "controls",
    "step": "empty-human",
    "terminal": false,
    "executable": "node",
    "args": [
      "<CHECKOUT>/openclaw.mjs",
      "plugins",
      "marketplace",
      "list",
      "<PROOF_ROOT>/controls/café\nFORGED[U+0007][U+0085]🦀"
    ],
    "exit": 0,
    "elapsedMs": 4333,
    "stdoutBytes": 147,
    "stderrBytes": 0,
    "stdoutSha256": "016c7de8382c804b125ebbc448a31387f07ba1da7935f176c38c66e0b8e87cc6",
    "stderrSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "stdout": "No plugins found in marketplace <PROOF_ROOT>/controls/café\nFORGED[U+0007][U+0085]🦀/marketplace.json.\n",
    "stderr": ""
  },
  {
    "case": "controls",
    "step": "empty-json",
    "terminal": false,
    "executable": "node",
    "args": [
      "<CHECKOUT>/openclaw.mjs",
      "plugins",
      "marketplace",
      "list",
      "<PROOF_ROOT>/controls/café\nFORGED[U+0007][U+0085]🦀",
      "--json"
    ],
    "exit": 0,
    "elapsedMs": 3552,
    "stdoutBytes": 200,
    "stderrBytes": 0,
    "stdoutSha256": "0e3d02d8181739a2604f7d0040385a118122a2d9ac895f07f55ed7250ced72d2",
    "stderrSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "stdout": "{\n  \"source\": \"<PROOF_ROOT>/controls/café\\nFORGED[JSON-ESCAPE-U+0007][U+0085]🦀/marketplace.json\",\n  \"name\": \"Owned café\\nFORGED[JSON-ESCAPE-U+0007][U+0085]🦀\",\n  \"plugins\": []\n}\n",
    "stderr": ""
  }
]
Complete exact-head GREEN commands and stdout/stderr (6 calls)
[
  {
    "case": "ordinary",
    "step": "empty-human",
    "terminal": false,
    "executable": "node",
    "args": [
      "<CHECKOUT>/openclaw.mjs",
      "plugins",
      "marketplace",
      "list",
      "<PROOF_ROOT>/ordinary/plain-café-🦀"
    ],
    "exit": 0,
    "elapsedMs": 5687,
    "stdoutBytes": 144,
    "stderrBytes": 0,
    "stdoutSha256": "9c5f53988fe08310805ca7be146102dacff8c1ea56ab25c3167e1fdd9e5f17a3",
    "stderrSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "stdout": "No plugins found in marketplace <PROOF_ROOT>/ordinary/plain-café-🦀/marketplace.json.\n",
    "stderr": ""
  },
  {
    "case": "ordinary",
    "step": "empty-json",
    "terminal": false,
    "executable": "node",
    "args": [
      "<CHECKOUT>/openclaw.mjs",
      "plugins",
      "marketplace",
      "list",
      "<PROOF_ROOT>/ordinary/plain-café-🦀",
      "--json"
    ],
    "exit": 0,
    "elapsedMs": 3478,
    "stdoutBytes": 182,
    "stderrBytes": 0,
    "stdoutSha256": "c20fc34e862dc0d508be5d4626b5c52a240d57e4236cce530c58e2c20734f765",
    "stderrSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "stdout": "{\n  \"source\": \"<PROOF_ROOT>/ordinary/plain-café-🦀/marketplace.json\",\n  \"name\": \"Owned plain-café-🦀\",\n  \"plugins\": []\n}\n",
    "stderr": ""
  },
  {
    "case": "ordinary",
    "step": "populated-human",
    "terminal": false,
    "executable": "node",
    "args": [
      "<CHECKOUT>/openclaw.mjs",
      "plugins",
      "marketplace",
      "list",
      "<PROOF_ROOT>/ordinary/plain-café-🦀/populated.json"
    ],
    "exit": 0,
    "elapsedMs": 4344,
    "stdoutBytes": 51,
    "stderrBytes": 0,
    "stdoutSha256": "59aace17813e1ddc2f5f53b4a827ba22c18a9aa814c44f003f26a040abde66ba",
    "stderrSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "stdout": "Marketplace Owned café\\nFORGED🦀\nexample v1.0.0\n",
    "stderr": ""
  },
  {
    "case": "ordinary",
    "step": "populated-json",
    "terminal": false,
    "executable": "node",
    "args": [
      "<CHECKOUT>/openclaw.mjs",
      "plugins",
      "marketplace",
      "list",
      "<PROOF_ROOT>/ordinary/plain-café-🦀/populated.json",
      "--json"
    ],
    "exit": 0,
    "elapsedMs": 4494,
    "stdoutBytes": 330,
    "stderrBytes": 0,
    "stdoutSha256": "255f9ddf0e81c79c14bd0e8c2fd79d721f9fdc3c34b560c70c0b66cdac42e8e5",
    "stderrSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "stdout": "{\n  \"source\": \"<PROOF_ROOT>/ordinary/plain-café-🦀/populated.json\",\n  \"name\": \"Owned café\\nFORGED[JSON-ESCAPE-U+0007][U+0085]🦀\",\n  \"plugins\": [\n    {\n      \"name\": \"example\",\n      \"version\": \"1.0.0\",\n      \"source\": {\n        \"kind\": \"path\",\n        \"path\": \"./demo\"\n      }\n    }\n  ]\n}\n",
    "stderr": ""
  },
  {
    "case": "controls",
    "step": "empty-human",
    "terminal": false,
    "executable": "node",
    "args": [
      "<CHECKOUT>/openclaw.mjs",
      "plugins",
      "marketplace",
      "list",
      "<PROOF_ROOT>/controls/café\nFORGED[U+0007][U+0085]🦀"
    ],
    "exit": 0,
    "elapsedMs": 5519,
    "stdoutBytes": 145,
    "stderrBytes": 0,
    "stdoutSha256": "642bf3d3d20dbbca1ffdbe464e00a95da6bf75340e757fe1c6f7279a5b8999c3",
    "stderrSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "stdout": "No plugins found in marketplace <PROOF_ROOT>/controls/café\\nFORGED🦀/marketplace.json.\n",
    "stderr": ""
  },
  {
    "case": "controls",
    "step": "empty-json",
    "terminal": false,
    "executable": "node",
    "args": [
      "<CHECKOUT>/openclaw.mjs",
      "plugins",
      "marketplace",
      "list",
      "<PROOF_ROOT>/controls/café\nFORGED[U+0007][U+0085]🦀",
      "--json"
    ],
    "exit": 0,
    "elapsedMs": 3665,
    "stdoutBytes": 200,
    "stderrBytes": 0,
    "stdoutSha256": "6f4f1eb00020c4856413f823a0cdd6f2aa621c32e409926a495e5dc63d2b9ace",
    "stderrSha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "stdout": "{\n  \"source\": \"<PROOF_ROOT>/controls/café\\nFORGED[JSON-ESCAPE-U+0007][U+0085]🦀/marketplace.json\",\n  \"name\": \"Owned café\\nFORGED[JSON-ESCAPE-U+0007][U+0085]🦀\",\n  \"plugins\": []\n}\n",
    "stderr": ""
  }
]

Not tested: Interactive terminal-emulator screen effects, remote Git marketplaces, cross-OS execution, all Unicode format characters, broad suites and hosted CI were not tested. The native proof captures the real built CLI through pipes; it is not a GUI or rendered-screen claim.

AI-assisted implementation, tests and proof collection. All executions above actually ran. The following excerpt is from the actual local agent transcript; unrelated turns, tool internals, paths and credentials are omitted.

Agent Transcript

Redacted codex session transcript
source: [LOCAL_SESSION]
redaction: local paths, emails, phone-shaped strings, token-shaped strings, auth headers, auth query params
omitted: raw tool outputs, system/developer prompts, local paths, secrets, browser/session/auth details
stats: {"agent":"codex","entries":1,"user":0,"assistant":1,"toolCalls":0,"toolOutputsDropped":0,"web":0,"redactions":0,"omittedUnsafe":0,"rawEntries":3}

[assistant]
两个候选都已在未修改的 main 上通过真实 CLI 复现:插件更新提示会原样输出插件 ID 中的控制字符,空 marketplace 报告会原样输出路径中的控制字符。普通 Unicode、JSON 原值和实际安装文件的对照检查均通过;现在补回归测试并修复输出边界。

回归测试确认了两个缺口:空 marketplace 的新增场景失败,原有 14 项通过;插件更新的四类结果及目标错误提示共 5 个新增场景失败,原有 27 项通过。第三条转向检查本地 policy 报告:它能用真实终端和普通文件验证,不依赖模型或外部账号。

第三条也已通过真实终端复现:policy 报告会解释文件名中的控制字符,而 JSON 保留原值。它延续我们已合入的 policy CLI 方向,当前未发现同题竞品。第一条已进入提交、构建流程,第二条正在收尾检查;三条都补齐证据后再发布。

@clawsweeper

clawsweeper Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review blocked

Automated review did not run, so no review verdict was produced.

Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here.

Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update.

Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: S labels Oct 27, 2026
obviyus added a commit that referenced this pull request Oct 28, 2026
…amilies (#186502)

fix(cli): route remaining CLI reports through the terminal-text owner

After #185927 added one owner for escaping untrusted values in CLI output, contributors kept opening one PR per command to escape the next report. This moves the remaining human-readable reports in the plugins, secrets, sessions, memory and memory-wiki, workboard, backup, pairing, oc-path, config and setup commands onto `terminalText` / `displayPath`, and extends the owner to neutralize bidirectional control characters. JSON output, persisted identities, raw exports and the CLI's own colors are unchanged, and the trusted styling of `renderTable` is untouched.

This absorbs the per-site fixes from @Leon-SK668 (#184454, #184379, #185374, #186449, #184396, #184788, #184813, #184394), @huwei-xydt (#185895, #185719), @wangmiao0668000666 (#175600, #175181, #175179), @SunnyShu0925 (#184747), @KrasimirKralev (#184597) and @arpe1618 (#150599), whose original commits are kept. Families no PR touched (update, Doctor, install-trust producers and others) are listed under "Not fixed here".

Evidence: 85 built-CLI invocations per ref with crafted control and bidi characters in the reported values, captured as raw stdout bytes. Main printed the raw sequences; this change printed them neutralized, with identical normal colors and unchanged JSON. Details: #186502 (comment).

Co-authored-by: 胡伟0668000622 <[email protected]>
Co-authored-by: Claude Code <[email protected]>
Co-authored-by: Leon-SK668 <[email protected]>
Co-authored-by: wangmiao0668000666 <[email protected]>
Co-authored-by: SunnyShu <0668000539@local>
Co-authored-by: Krasimir Kralev <[email protected]>
Co-authored-by: arpe1618 <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
@obviyus

obviyus commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

Thanks @Leon-SK668. This is now fixed at the root in #186502 (3bcca4f), which routes the remaining CLI reports through the shared terminalText owner from terminal-core. Your commit is kept in that merge and you're credited as co-author, so I'm closing this one as covered. For new output sites, please pass untrusted values through terminalText (or displayPath for paths) rather than opening a PR per command.

@obviyus obviyus closed this Oct 28, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 29, 2026
…amilies (openclaw#186502)

fix(cli): route remaining CLI reports through the terminal-text owner

After openclaw#185927 added one owner for escaping untrusted values in CLI output, contributors kept opening one PR per command to escape the next report. This moves the remaining human-readable reports in the plugins, secrets, sessions, memory and memory-wiki, workboard, backup, pairing, oc-path, config and setup commands onto `terminalText` / `displayPath`, and extends the owner to neutralize bidirectional control characters. JSON output, persisted identities, raw exports and the CLI's own colors are unchanged, and the trusted styling of `renderTable` is untouched.

This absorbs the per-site fixes from @Leon-SK668 (openclaw#184454, openclaw#184379, openclaw#185374, openclaw#186449, openclaw#184396, openclaw#184788, openclaw#184813, openclaw#184394), @huwei-xydt (openclaw#185895, openclaw#185719), @wangmiao0668000666 (openclaw#175600, openclaw#175181, openclaw#175179), @SunnyShu0925 (openclaw#184747), @KrasimirKralev (openclaw#184597) and @arpe1618 (openclaw#150599), whose original commits are kept. Families no PR touched (update, Doctor, install-trust producers and others) are listed under "Not fixed here".

Evidence: 85 built-CLI invocations per ref with crafted control and bidi characters in the reported values, captured as raw stdout bytes. Main printed the raw sequences; this change printed them neutralized, with identical normal colors and unchanged JSON. Details: openclaw#186502 (comment).

Co-authored-by: 胡伟0668000622 <[email protected]>
Co-authored-by: Claude Code <[email protected]>
Co-authored-by: Leon-SK668 <[email protected]>
Co-authored-by: wangmiao0668000666 <[email protected]>
Co-authored-by: SunnyShu <0668000539@local>
Co-authored-by: Krasimir Kralev <[email protected]>
Co-authored-by: arpe1618 <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants