openclaw - 💡(How to fix) Fix [Security] Dangerous code patterns detected in @openclaw/matrix plugin (v2026.3.22) [10 comments, 6 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#59085Fetched 2026-04-08 02:28:52
View on GitHub
Comments
10
Participants
6
Timeline
23
Reactions
4
Author
Timeline (top)
commented ×10subscribed ×8mentioned ×2closed ×1

Error Message

Error Output

Fix Action

Fix / Workaround

  1. Publish patched version — Once fixed, release @openclaw/[email protected] or similar

Code Example

Environment variable access combined with network send — possible credential harvesting

---

Environment variable access combined with network send — possible credential harvesting

---

Shell command execution detected (child_process)

---

WARNING: Plugin "matrix" contains dangerous code patterns: Environment variable access combined with network send — possible credential harvesting (/tmp/openclaw-plugin-EszReB/extract/package/src/channel.setup.test.ts:163); Shell command execution detected (child_process) (/tmp/openclaw-plugin-EszReB/extract/package/src/matrix/deps.ts:71); Environment variable access combined with network send — possible credential harvesting (/tmp/openclaw-plugin-EszReB/extract/package/src/matrix/client/config.ts:105)

Plugin "matrix" installation blocked: dangerous code patterns detected
RAW_BUFFERClick to expand / collapse

Security Issue Summary

OpenClaw v2026.3.31 blocked installation of the @openclaw/matrix plugin (v2026.3.22) due to dangerous code patterns that could enable credential harvesting.

Detection Details

The plugin was identified as verification=source-linked (official plugin), but OpenClaw's security scanner detected three concerning patterns:

1. Environment Variable Access + Network Send (Possible Credential Harvesting)

File: src/channel.setup.test.ts:163

Environment variable access combined with network send — possible credential harvesting

File: src/matrix/client/config.ts:105

Environment variable access combined with network send — possible credential harvesting

2. Shell Command Execution

File: src/matrix/deps.ts:71

Shell command execution detected (child_process)

Why This Is Critical

OpenClaw configurations typically contain sensitive environment variables:

  • API keys (Cloudflare, various AI providers)
  • Authentication tokens (Telegram, GitHub, etc.)
  • Gateway passwords
  • Database credentials

A plugin with these patterns could potentially exfiltrate these credentials to external servers.

Error Output

WARNING: Plugin "matrix" contains dangerous code patterns: Environment variable access combined with network send — possible credential harvesting (/tmp/openclaw-plugin-EszReB/extract/package/src/channel.setup.test.ts:163); Shell command execution detected (child_process) (/tmp/openclaw-plugin-EszReB/extract/package/src/matrix/deps.ts:71); Environment variable access combined with network send — possible credential harvesting (/tmp/openclaw-plugin-EszReB/extract/package/src/matrix/client/config.ts:105)

Plugin "matrix" installation blocked: dangerous code patterns detected

Recommended Actions

  1. Audit the flagged files — The team should review:

    • src/channel.setup.test.ts:163
    • src/matrix/deps.ts:71
    • src/matrix/client/config.ts:105
  2. Determine if this is intentional or compromised — If legitimate code, consider:

    • Refactoring to avoid env+network patterns
    • Adding explicit API boundaries with user consent
    • Marking as trusted after security review
  3. If compromised — Remove the malicious package from ClawHub immediately

  4. Publish patched version — Once fixed, release @openclaw/[email protected] or similar

Environment

  • OpenClaw version: 2026.3.31 (213a704)
  • Plugin: @openclaw/[email protected]
  • Channel: official
  • Verification: source-linked

Request

Please investigate and provide guidance. Many users rely on the Matrix plugin for multi-room coordination, and the security block prevents installation of the current version.


Note: The security scanner is working correctly — this is a feature, not a bug. The concern is whether the official Matrix plugin has been compromised or if these patterns are legitimate but need redesign.

extent analysis

TL;DR

Audit the flagged files in the @openclaw/matrix plugin to determine if the detected code patterns are intentional or indicative of a compromise.

Guidance

  • Review the files src/channel.setup.test.ts:163, src/matrix/deps.ts:71, and src/matrix/client/config.ts:105 to understand the context and purpose of the environment variable access and network send patterns.
  • Assess whether the detected patterns are legitimate and necessary for the plugin's functionality, or if they pose a security risk.
  • Consider refactoring the code to avoid environment variable access combined with network send patterns, and instead use secure and explicit API boundaries with user consent.
  • If the patterns are deemed malicious, remove the compromised package from ClawHub immediately and publish a patched version of the plugin.

Example

No code snippet is provided as the issue does not contain sufficient information to create a specific example.

Notes

The guidance provided is based on the information given in the issue and may not be comprehensive or applicable in all scenarios. Further investigation and security review are necessary to determine the best course of action.

Recommendation

Apply a workaround by auditing and refactoring the flagged files to ensure the plugin's security and functionality. This approach allows for a thorough review and potential redesign of the code patterns, rather than simply upgrading to a fixed version, which may not be available.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Security] Dangerous code patterns detected in @openclaw/matrix plugin (v2026.3.22) [10 comments, 6 participants]