openclaw - ✅(Solved) Fix False plugin provenance / allowlist warnings for npm-installed global plugin under ~/.openclaw/extensions [1 pull requests, 1 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#63182Fetched 2026-04-09 07:57:22
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

openclaw-weixin is installed via openclaw plugins install @tencent-weixin/openclaw-weixin@latest and has a valid plugins.installs record plus an explicit plugins.allow entry in ~/.openclaw/openclaw.json.

However, after restarting openclaw gateway, the runtime still logs:

  • plugins.allow is empty; discovered non-bundled plugins may auto-load
  • loaded without install/load-path provenance; treat as untracked local code

The plugin loads and works normally. This appears to be a false warning caused by a mismatch between plugin discovery/origin classification and provenance/allowlist checks.

Error Message

After openclaw gateway restart, ~/.openclaw/logs/gateway.err.log contains:

Root Cause

The plugin loads and works normally. This appears to be a false warning caused by a mismatch between plugin discovery/origin classification and provenance/allowlist checks.

PR fix notes

PR #64387: fix(plugins): include activationSourceConfig in loadOpenClawPlugins destructuring

Description (problem / solution / changelog)

Summary

  • resolvePluginLoadCacheContext returns activationSourceConfig in its result object (used to thread the original raw config through to activation-source creation)
  • loadOpenClawPlugins destructures the result but omits activationSourceConfig
  • The compiled build (2026.4.9, loader-BSIqIOsD.js) injects a diagnostic log inside loadOpenClawPlugins that references activationSourceConfig as a bare variable
  • Since the variable was never destructured, this causes ReferenceError: activationSourceConfig is not defined, crash-looping the gateway on every startup attempt

One-line fix

Add activationSourceConfig to the destructuring at loadOpenClawPlugins line ~1092.

Reproduction

  1. Install OpenClaw 2026.4.9 via pnpm/npm
  2. Start the gateway (openclaw gateway start or via LaunchAgent)
  3. Gateway crash-loops: starting...loading configuration…resolving authentication… → crash → repeat every ~4s
  4. ~/.openclaw/logs/gateway.err.log shows: Gateway failed to start: ReferenceError: activationSourceConfig is not defined

Evidence

Gateway error log (repeating every ~4 seconds):

2026-04-10T14:14:03.652+03:00 Gateway failed to start: ReferenceError: activationSourceConfig is not defined
2026-04-10T14:14:07.982+03:00 Gateway failed to start: ReferenceError: activationSourceConfig is not defined
2026-04-10T14:14:12.218+03:00 Gateway failed to start: ReferenceError: activationSourceConfig is not defined

Compiled code trace

In loader-BSIqIOsD.js:

Line ~1996resolvePluginLoadCacheContext declares and returns activationSourceConfig:

const activationSourceConfig = options.activationSourceConfig ?? options.config ?? {};
// ...
return { env, cfg, normalized, activationSourceConfig, activationSource, ... };

Line ~2336loadOpenClawPlugins destructures but omits it:

const { env, cfg, normalized, activationSource, autoEnabledReasons, ... } = resolvePluginLoadCacheContext(options);
//                              ^ missing activationSourceConfig here

Line ~2446 — a diagnostic log references it as a bare variable:

if (shouldActivate) logger.warn(`[plugins-diag] ... activation.plugins=${JSON.stringify(activationSourceConfig?.plugins ?? null)}`);
// ReferenceError: activationSourceConfig is not defined

Environment

  • OpenClaw: 2026.4.9 (0512059)
  • Node.js: v25.9.0
  • OS: macOS 26.3.1 (arm64)

AI-assisted

  • AI-assisted (Claude Code / Opus 4.6)
  • Tested locally: applied equivalent patch to compiled loader-BSIqIOsD.js, confirmed gateway starts successfully
  • I understand what the code does

Related issues

Fixes #64357

Related (same symptom family — false plugins.allow is empty warnings):

  • #62049, #64170, #62521, #63693, #63182

Possibly related (plugin loading crashes/hangs):

  • #64306, #64354

Test plan

  • pnpm build && pnpm check && pnpm test passes
  • Gateway starts without crash-loop on fresh install
  • openclaw doctor no longer shows activationSourceConfig ReferenceError

Changed files

  • scripts/check-no-raw-channel-fetch.mjs (modified, +1/-1)
  • src/plugins/loader.ts (modified, +2/-0)
  • test/scripts/lint-suppressions.test.ts (modified, +1/-0)

Code Example

"plugins": {
  "entries": {
    "openclaw-weixin": {
      "enabled": true
    }
  },
  "allow": [
    "minimax",
    "telegram",
    "openclaw-weixin"
  ],
  "installs": {
    "openclaw-weixin": {
      "source": "npm",
      "spec": "@tencent-weixin/openclaw-weixin@latest",
      "installPath": "/Users/tedxiong/.openclaw/extensions/openclaw-weixin",
      "version": "2.1.7",
      "resolvedName": "@tencent-weixin/openclaw-weixin",
      "resolvedVersion": "2.1.7",
      "resolvedSpec": "@tencent-weixin/[email protected]"
    }
  }
}

---

2026-04-08T21:59:08.870+08:00 [plugins] plugins.allow is empty; discovered non-bundled plugins may auto-load: openclaw-weixin (/Users/tedxiong/.openclaw/extensions/openclaw-weixin/index.ts). Set plugins.allow to explicit trusted ids.
2026-04-08T21:59:08.948+08:00 [plugins] openclaw-weixin: loaded without install/load-path provenance; treat as untracked local code and pin trust via plugins.allow or install records (/Users/tedxiong/.openclaw/extensions/openclaw-weixin/index.ts)

---

Status: loaded
Source: ~/.openclaw/extensions/openclaw-weixin/index.ts
Origin: global

Install:
Source: npm
Spec: @tencent-weixin/openclaw-weixin@latest
Install path: ~/.openclaw/extensions/openclaw-weixin
Recorded version: 2.1.7

---

function matchesInstalledPluginRecord(params) {
  if (params.candidate.origin !== "global") return false;
  const record = params.config?.plugins?.installs?.[params.pluginId];
  if (!record) return false;
  const candidateSource = resolveUserPath(params.candidate.source, params.env);
  const trackedPaths = [record.installPath, record.sourcePath]
    .filter(...)
    .map(...);
  if (trackedPaths.length === 0) return false;
  return trackedPaths.some((trackedPath) => {
    return candidateSource === trackedPath || isPathInside(trackedPath, candidateSource);
  });
}

---

function buildProvenanceIndex(params) {
  const installs = params.config.plugins?.installs ?? {};
  for (const [pluginId, install] of Object.entries(installs)) {
    const trackedPaths = [install.installPath, install.sourcePath]...
    ...
  }
}

function isTrackedByProvenance(params) {
  const installRule = params.index.installRules.get(params.pluginId);
  if (installRule) {
    if (installRule.trackedWithoutPaths) return true;
    if (matchesPathMatcher(installRule.matcher, sourcePath)) return true;
  }
  return matchesPathMatcher(params.index.loadPathMatcher, sourcePath);
}

---

if (allowSet.has(plugin.id)) continue;
if (isTrackedByProvenance(...)) continue;
logger.warn(`[plugins] ${plugin.id}: loaded without install/load-path provenance ...`);
RAW_BUFFERClick to expand / collapse

Title

False plugin provenance / allowlist warnings for npm-installed global plugin under ~/.openclaw/extensions

Summary

openclaw-weixin is installed via openclaw plugins install @tencent-weixin/openclaw-weixin@latest and has a valid plugins.installs record plus an explicit plugins.allow entry in ~/.openclaw/openclaw.json.

However, after restarting openclaw gateway, the runtime still logs:

  • plugins.allow is empty; discovered non-bundled plugins may auto-load
  • loaded without install/load-path provenance; treat as untracked local code

The plugin loads and works normally. This appears to be a false warning caused by a mismatch between plugin discovery/origin classification and provenance/allowlist checks.

Environment

  • OpenClaw host version: 2026.4.5
  • Host install path:
    • /Users/tedxiong/.local/share/fnm/node-versions/v24.14.1/installation/lib/node_modules/openclaw
  • State dir:
    • /Users/tedxiong/.openclaw
  • Plugin:
  • OS:
    • macOS

Config state

Relevant config excerpt from ~/.openclaw/openclaw.json:

"plugins": {
  "entries": {
    "openclaw-weixin": {
      "enabled": true
    }
  },
  "allow": [
    "minimax",
    "telegram",
    "openclaw-weixin"
  ],
  "installs": {
    "openclaw-weixin": {
      "source": "npm",
      "spec": "@tencent-weixin/openclaw-weixin@latest",
      "installPath": "/Users/tedxiong/.openclaw/extensions/openclaw-weixin",
      "version": "2.1.7",
      "resolvedName": "@tencent-weixin/openclaw-weixin",
      "resolvedVersion": "2.1.7",
      "resolvedSpec": "@tencent-weixin/[email protected]"
    }
  }
}

Observed behavior

After openclaw gateway restart, ~/.openclaw/logs/gateway.err.log contains:

2026-04-08T21:59:08.870+08:00 [plugins] plugins.allow is empty; discovered non-bundled plugins may auto-load: openclaw-weixin (/Users/tedxiong/.openclaw/extensions/openclaw-weixin/index.ts). Set plugins.allow to explicit trusted ids.
2026-04-08T21:59:08.948+08:00 [plugins] openclaw-weixin: loaded without install/load-path provenance; treat as untracked local code and pin trust via plugins.allow or install records (/Users/tedxiong/.openclaw/extensions/openclaw-weixin/index.ts)

But:

  • openclaw gateway status reports the service as running
  • the plugin loads successfully
  • openclaw plugins inspect openclaw-weixin shows both:
    • Origin: global
    • Install: Source: npm, with the correct install record

Example inspect output:

Status: loaded
Source: ~/.openclaw/extensions/openclaw-weixin/index.ts
Origin: global

Install:
Source: npm
Spec: @tencent-weixin/openclaw-weixin@latest
Install path: ~/.openclaw/extensions/openclaw-weixin
Recorded version: 2.1.7

Why this looks wrong

The runtime appears to recognize the plugin install record in some code paths, but not in the warning path.

Manifest registry path appears correct

dist/manifest-registry-Cqdpf6fh.js:

function matchesInstalledPluginRecord(params) {
  if (params.candidate.origin !== "global") return false;
  const record = params.config?.plugins?.installs?.[params.pluginId];
  if (!record) return false;
  const candidateSource = resolveUserPath(params.candidate.source, params.env);
  const trackedPaths = [record.installPath, record.sourcePath]
    .filter(...)
    .map(...);
  if (trackedPaths.length === 0) return false;
  return trackedPaths.some((trackedPath) => {
    return candidateSource === trackedPath || isPathInside(trackedPath, candidateSource);
  });
}

For this plugin:

  • candidate.source = /Users/tedxiong/.openclaw/extensions/openclaw-weixin/index.ts
  • record.installPath = /Users/tedxiong/.openclaw/extensions/openclaw-weixin

So this should match.

Warning path also appears intended to honor install records

dist/loader-BkajlJCF.js:

function buildProvenanceIndex(params) {
  const installs = params.config.plugins?.installs ?? {};
  for (const [pluginId, install] of Object.entries(installs)) {
    const trackedPaths = [install.installPath, install.sourcePath]...
    ...
  }
}

function isTrackedByProvenance(params) {
  const installRule = params.index.installRules.get(params.pluginId);
  if (installRule) {
    if (installRule.trackedWithoutPaths) return true;
    if (matchesPathMatcher(installRule.matcher, sourcePath)) return true;
  }
  return matchesPathMatcher(params.index.loadPathMatcher, sourcePath);
}

And the warning only fires if provenance tracking fails:

if (allowSet.has(plugin.id)) continue;
if (isTrackedByProvenance(...)) continue;
logger.warn(`[plugins] ${plugin.id}: loaded without install/load-path provenance ...`);

Given the config above, this plugin should be tracked by provenance.

Suspected bug

One of these is happening during gateway load:

  1. The warning phase is not receiving the same resolved config that includes plugins.allow and plugins.installs.
  2. Plugin origin/discovery metadata is resolved correctly enough for inspect/manifests, but the allowlist/provenance warning path uses a stale or differently-normalized config snapshot.
  3. There is a bug in how install rules are built or matched for global plugins installed into ~/.openclaw/extensions/<plugin-id> when the plugin entrypoint is index.ts.

Expected behavior

For an npm-installed plugin with:

  • a valid plugins.installs.<id> record
  • matching installPath
  • explicit plugins.allow entry

gateway startup should not emit either of these warnings:

  • plugins.allow is empty
  • loaded without install/load-path provenance

Actual impact

  • No functional outage
  • Produces misleading security warnings in logs
  • Makes it hard to distinguish genuine untracked local code from properly-installed plugins

Repro sketch

  1. Install plugin with:
    • openclaw plugins install @tencent-weixin/openclaw-weixin@latest
  2. Ensure config contains:
    • plugins.entries.openclaw-weixin.enabled = true
    • plugins.allow includes openclaw-weixin
    • plugins.installs.openclaw-weixin.installPath = ~/.openclaw/extensions/openclaw-weixin
  3. Restart gateway
  4. Observe false warnings in ~/.openclaw/logs/gateway.err.log
  5. Run openclaw plugins inspect openclaw-weixin and observe that the same plugin is also recognized as installed from npm

Notes

I separately fixed an unrelated skills-path issue in this environment; after that fix, the only remaining gateway warnings were these plugin provenance warnings.

extent analysis

TL;DR

The most likely fix for the false plugin provenance warnings is to verify that the plugins.allow and plugins.installs configurations are correctly propagated to the warning phase during gateway load.

Guidance

  1. Verify config propagation: Check if the plugins.allow and plugins.installs configurations are correctly loaded and available during the warning phase.
  2. Check for config normalization issues: Investigate if there are any differences in how the config is normalized or resolved between the inspect/manifests path and the warning path.
  3. Test with a minimal config: Try reducing the config to the minimum required for the plugin to work and see if the warnings persist.
  4. Compare config snapshots: Compare the config snapshots used by the inspect/manifests path and the warning path to identify any discrepancies.

Example

No code example is provided as the issue seems to be related to config propagation or normalization rather than a specific code bug.

Notes

The issue appears to be related to a mismatch between how the config is resolved and used in different parts of the code. Verifying config propagation and checking for config normalization issues may help identify the root cause.

Recommendation

Apply a workaround by verifying the config propagation and checking for config normalization issues, as the root cause of the issue is not entirely clear from the provided information.

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…

FAQ

Expected behavior

For an npm-installed plugin with:

  • a valid plugins.installs.<id> record
  • matching installPath
  • explicit plugins.allow entry

gateway startup should not emit either of these warnings:

  • plugins.allow is empty
  • loaded without install/load-path provenance

Still need to ship something?

×6

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

Back to top recommendations

TRENDING