Back to skill

Security audit

OpenClaw Logfire

Security checks for vulnerabilities and agentic risk

Overview

This is a real Logfire observability plugin, but it defaults to sending tool arguments and raw error details to Logfire with privacy controls that do not reliably cover common secret formats.

Review this before installing in a workspace that handles credentials, customer data, private files, or production operations. Set captureToolInput and captureStackTraces to false unless explicitly needed, keep captureToolOutput and captureMessageContent disabled, treat redaction as best-effort rather than guaranteed, restrict Logfire project access, and upgrade the flagged dependencies before broad deployment.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
src/config.ts:71
Finding
Tool arguments are exported by default with incomplete secret redaction<![CDATA[ ## Vulnerability Details **File Location**: `src/config.ts:71`, `src/hooks/before-tool-call.ts:59-69`, `src/util.ts:6-11`, `src/util.ts:59-70` **Vulnerability Type**: Sensitive data exposure through telemetry **Risk Level**: High ### Vulnerable Code `src/config.ts:71`: ```ts captureToolInput: true, ``` `src/hooks/before-tool-call.ts:59-69`: ```ts // Opt-in: capture tool arguments if (config.captureToolInput && event.tool?.args !== undefined) { attributes['gen_ai.tool.call.arguments'] = prepareForCapture( event.tool.args, config.toolInputMaxLength, config.redactSecrets, ); attributes['openclaw.tool.input_size'] = typeof event.tool.args === 'string' ? event.tool.args.length : JSON.stringify(event.tool.args ?? '').length; } ``` `src/util.ts:6-11`: ```ts /** Patterns that likely indicate secret values. */ const SECRET_PATTERNS = [ /(?:api[_-]?key|token|secret|password|auth|credential|bearer)\s*[:=]\s*["']?[^\s"',}{]{8,}/gi, /(?:sk|pk|rk|pat|ghp|gho|glpat|xox[bpras])[_-][A-Za-z0-9_-]{10,}/g, /eyJ[A-Za-z0-9_-]{20,}\.[A-Za-z0-9_-]{20,}/g, // JWT ]; ``` `src/util.ts:59-70`: ```ts export function prepareForCapture( value: unknown, maxLength: number, redact: boolean, ): string { let str = typeof value === 'string' ? value : safeJsonStringify(value); if (redact) { str = redactSecrets(str); } return truncate(str, maxLength); } ``` ### Technical Analysis Tool-input capture is enabled by default, despite the source comment describing it as opt-in. Every tool invocation can therefore place serialized arguments in the `gen_ai.tool.call.arguments` span attribute. The OpenTelemetry exporter subsequently transmits that attribute to Pydantic Logfire. The redaction mechanism operates on the serialized string using a limited set of regular expressions. It is not a structural redactor and does not reliably match normal JSON property syntax. For example, a serialized value such as: ```json {"password":"sen ...[truncated 2524 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Change `captureToolInput` to `false` by default so argument collection requires explicit administrator consent. 2. Redact structured values before serialization: - Recursively traverse objects and arrays. - Replace values whose keys match names such as `password`, `token`, `secret`, `authorization`, `cookie`, `credential`, `privateKey`, or `connectionString`. - Perform key matching case-insensitively and normalize separators. 3. Prefer an allowlist of telemetry-safe fields over a denylist of secret formats. 4. Add detection for private keys, cookies, database URLs, cloud credentials, and common vendor-token formats as defense in depth. 5. Never treat regular-expression redaction as a guarantee that arbitrary tool input is safe to export. 6. Add regression tests covering: ```json {"password":"sensitive-value-123"} {"apiKey":"sensitive-value-123"} {"Authorization":"Bearer sensitive-value-123"} {"nested":{"credentials":{"secret":"sensitive-value-123"}}} ``` 7. Provide per-tool capture policies so security-sensitive tools such as shell execution, file reading, HTTP requests, and secret-management operations can always be excluded. 8. Update documentation to state that redaction is best-effort unless structural redaction and comprehensive tests are implemented. 9. Review and purge previously collected traces that may contain credentials, then rotate any potentially exposed secrets. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
src/hooks/tool-result-persist.ts:60
Finding
Error messages and native exception stacks bypass telemetry privacy controls<![CDATA[ ## Vulnerability Details **File Location**: `src/config.ts:75`, `src/hooks/tool-result-persist.ts:60-84` **Vulnerability Type**: Sensitive data exposure through unsanitized exception telemetry **Risk Level**: Medium ### Vulnerable Code `src/config.ts:75`: ```ts captureStackTraces: true, ``` `src/hooks/tool-result-persist.ts:60-84`: ```ts // Error handling with stack traces if (event.error) { const session = spanStore.get(event.context.sessionKey); if (session) session.hasError = true; const details = extractErrorDetails(event.error); entry.span.setAttribute('error.type', details.type); entry.span.setStatus({ code: SpanStatusCode.ERROR, message: details.message, }); // Record exception per OTEL semantic conventions if (event.error instanceof Error) { entry.span.recordException(event.error); } else { // Manual exception event for non-Error objects entry.span.addEvent('exception', { 'exception.type': details.type, 'exception.message': details.message, ...(config.captureStackTraces && details.stacktrace ? { 'exception.stacktrace': details.stacktrace } : {}), }); } } else { entry.span.setStatus({ code: SpanStatusCode.OK }); } ``` ### Technical Analysis The tool-result hook exports error information without applying `redactSecrets()` or `prepareForCapture()`. The span status always receives the raw `details.message`. For native JavaScript `Error` objects, the complete exception object is passed to `recordException(event.error)`. OpenTelemetry can record the exception message and stack from that object. The `captureStackTraces` setting only controls the manually constructed event for non-`Error` values. It does not control the native `Error` branch, so setting `captureStackTraces` to `false` does not reliably prevent stack export. Stack capture is also enabled by default. Error messages and stacks commonly contain: - Request URLs with query parameters - Authenticatio ...[truncated 1880 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Sanitize every exception message before assigning it to span status or event attributes. 2. Do not pass the original `Error` object directly to `recordException()` when privacy controls are enabled. 3. Construct a sanitized exception event explicitly: - Redact the message. - Include the stack only when `captureStackTraces` is explicitly enabled. - Redact the stack before recording it. 4. Change `captureStackTraces` to `false` by default. 5. Add maximum-length limits for exception messages and stack traces. 6. Remove URL query strings, user information, and credentials from errors before telemetry export. 7. Ensure `redactSecrets` governs all capture paths, including span statuses, exception events, native errors, and initialization failures. 8. Add tests proving that: - Native `Error` stacks are absent when stack capture is disabled. - JSON-shaped secrets in error messages are redacted. - Authorization headers, cookies, connection strings, and query parameters are sanitized. 9. Review existing Logfire traces for exposed secrets and rotate credentials where exposure cannot be ruled out. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (70)

Known Vulnerable Dependency: protobufjs==7.5.4 — 12 advisory(ies): CVE-2026-44294 (protobuf.js: Denial of service from crafted field names in generated code); CVE-2026-44293 (protobuf.js: Code injection through bytes field defaults in generated toObject c); CVE-2026-44289 (protobuf.js: Denial of service through unbounded protobuf recursion) +9 more

Critical
Category
Supply Chain
Confidence
90% confidence
Finding
protobufjs 7.5.4 has multiple serious advisories including potential code generation abuse and denial-of-service conditions. Because this package is used transitively by gRPC/OTLP telemetry components and the skill is built around OpenTelemetry export/import paths, attacker-influenced protobuf payloads may be in scope depending on enabled exporters or parsers.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The declared description describes an observability/logging skill related to Pydantic Logfire and OpenTelemetry-style tracing. The supplied code does not implement any runtime observability, tracing, metrics, tool spans, or related integrations. Instead, it is an ESLint configuration file used for static analysis and code quality enforcement in a TypeScript project. This is a materially different primary purpose, so the description does not accurately represent the code.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The declared description suggests a full observability/tracing integration for Pydantic Logfire, including OTEL GenAI traces, tool spans, token metrics, and distributed tracing. The actual code chunk does not implement or exercise those capabilities; it only contains unit tests for building a Logfire trace URL. This is a materially different and much narrower purpose than the declared description, so it should be flagged as a mismatch.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
There is a strong description-behavior mismatch. The declared purpose centers on observability and tracing features associated with Pydantic Logfire and OpenTelemetry. However, the provided code is only a test suite for generic utility functions. While secret redaction and capture preparation could be supporting pieces in a logging/observability system, the chunk’s primary behavior is unrelated utility testing rather than tracing, telemetry, or metrics. No resource access, triggers, or permissions are evident, but the main capability described is materially different from what this code actually covers.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The declared description is about observability and tracing functionality, but the supplied code only configures the Vitest test runner and coverage behavior. It does not implement or expose Logfire observability, OTEL tracing, token metrics, tool call spans, or distributed tracing. This is a materially different primary purpose, so it is a clear mismatch.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The document defines a business automation and multi-agent control plane that is materially broader than the declared observability-only skill purpose. Scope mismatch is dangerous because it can smuggle privileged capabilities, external integrations, and autonomous workflow behavior into an environment where operators expect tracing-only behavior and may grant trust or deployment approval on that basis.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
This section adds webhook-triggered agent execution, REST control of workflows, and shared-memory APIs, which are active control and data-plane features rather than observability. That creates hidden authority to send messages, trigger backend actions, and move data across systems under the cover of a tracing-oriented skill description.

Context-Inappropriate Capability

High
Confidence
98% confidence
Finding
Spawning Claude Code subprocesses introduces code-execution and repository-modification capability that is unrelated to observability. In practice this can be leveraged to run shell commands, alter source, access credentials available to the subprocess, or perform high-impact actions through inherited developer tooling and auth context.

Context-Inappropriate Capability

High
Confidence
98% confidence
Finding
The skill expands into Gmail, Drive, Calendar, HubSpot, LinkedIn, and Apollo integrations far beyond observability needs. Such breadth increases blast radius by granting access to sensitive communications, documents, CRM data, and external business systems without users expecting that level of reach from the skill metadata.

Known Vulnerable Dependency: @grpc/grpc-js==1.14.3 — 2 advisory(ies): CVE-2026-48068 (@grpc/grpc-js: A malformed request can cause a server crash); CVE-2026-48069 (@grpc/grpc-js: An incoming malformed compressed message can cause a client or se)

High
Category
Supply Chain
Confidence
92% confidence
Finding
@grpc/grpc-js 1.14.3 is flagged for malformed-request and malformed-compression denial-of-service issues. In this package context it is a transitive runtime dependency via OpenTelemetry exporters, so if the skill exposes gRPC telemetry endpoints or processes attacker-influenced telemetry traffic, crashes are plausible.

Known Vulnerable Dependency: @opentelemetry/exporter-prometheus==0.57.2 — 1 advisory(ies): CVE-2026-44902 (Prometheus exporter process crash via malformed HTTP request)

High
Category
Supply Chain
Confidence
90% confidence
Finding
@opentelemetry/exporter-prometheus 0.57.2 is reported vulnerable to process crash via malformed HTTP request. In an observability skill, Prometheus export functionality is directly aligned with expected use, so a malformed scrape or probe could potentially trigger denial of service on exposed metrics endpoints.

Known Vulnerable Dependency: @opentelemetry/propagator-jaeger==1.30.1 — 1 advisory(ies): CVE-2026-59892 (OpenTelemetry JavaScript: Denial of service in `JaegerPropagator` via unhandled )

High
Category
Supply Chain
Confidence
85% confidence
Finding
@opentelemetry/propagator-jaeger 1.30.1 is flagged for denial of service via unhandled input. Since this package is used for trace-context propagation, untrusted inbound tracing headers could trigger failures in services using this propagator, especially in internet-facing environments.

Known Vulnerable Dependency: @opentelemetry/sdk-node==0.57.2 — 1 advisory(ies): CVE-2026-44902 (Prometheus exporter process crash via malformed HTTP request)

High
Category
Supply Chain
Confidence
88% confidence
Finding
@opentelemetry/sdk-node 0.57.2 inherits exposure from the vulnerable Prometheus exporter included in the SDK bundle. Because this skill centers on telemetry collection/export, the vulnerable feature is more likely to be enabled than in a generic package.

Known Vulnerable Dependency: brace-expansion==2.0.2 — 4 advisory(ies): CVE-2026-13149 (brace-expansion: DoS via exponential-time expansion of consecutive non-expanding); CVE-2026-33750 (brace-expansion: Zero-step sequence causes process hang and memory exhaustion); CVE-2026-14257 (brace-expansion: DoS via unbounded expansion length causing an out-of-memory pro) +1 more

High
Category
Supply Chain
Confidence
80% confidence
Finding
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Known Vulnerable Dependency: minimatch==9.0.5 — 3 advisory(ies): CVE-2026-27904 (minimatch ReDoS: nested *() extglobs generate catastrophically backtracking regu); CVE-2026-26996 (minimatch has a ReDoS via repeated wildcards with non-matching literal in patter); CVE-2026-27903 (minimatch has ReDoS: matchOne() combinatorial backtracking via multiple non-adja)

High
Category
Supply Chain
Confidence
80% confidence
Finding
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Known Vulnerable Dependency: brace-expansion==1.1.12 — 4 advisory(ies): CVE-2026-13149 (brace-expansion: DoS via exponential-time expansion of consecutive non-expanding); CVE-2026-33750 (brace-expansion: Zero-step sequence causes process hang and memory exhaustion); CVE-2026-14257 (brace-expansion: DoS via unbounded expansion length causing an out-of-memory pro) +1 more

High
Category
Supply Chain
Confidence
80% confidence
Finding
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Known Vulnerable Dependency: flatted==3.3.3 — 2 advisory(ies): CVE-2026-32141 (flatted vulnerable to unbounded recursion DoS in parse() revive phase); CVE-2026-33228 (Prototype Pollution via parse() in NodeJS flatted)

High
Category
Supply Chain
Confidence
80% confidence
Finding
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Known Vulnerable Dependency: js-yaml==4.1.1 — 4 advisory(ies): CVE-2026-84375 (js-yaml: maxTotalMergeKeys does not limit CPU use for empty merge sources); CVE-2026-59869 (js-yaml: YAML merge-key chains can force quadratic CPU consumption); GHSA-5p4m-2wfm-xmqj (JS-YAML: Quadratic CPU consumption in !!omap resolution (3.x and 4.x) — CVE-2026) +1 more

High
Category
Supply Chain
Confidence
80% confidence
Finding
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Known Vulnerable Dependency: minimatch==3.1.2 — 3 advisory(ies): CVE-2026-27904 (minimatch ReDoS: nested *() extglobs generate catastrophically backtracking regu); CVE-2026-26996 (minimatch has a ReDoS via repeated wildcards with non-matching literal in patter); CVE-2026-27903 (minimatch has ReDoS: matchOne() combinatorial backtracking via multiple non-adja)

High
Category
Supply Chain
Confidence
80% confidence
Finding
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Known Vulnerable Dependency: nanoid==3.3.11 — 3 advisory(ies): CVE-2026-67214 (nanoid: non-secure generators can loop indefinitely with negative size); CVE-2026-67213 (nanoid: custom generators can loop indefinitely when size is zero); CVE-2026-73086 (nanoid: Integer Overflow or Wraparound)

High
Category
Supply Chain
Confidence
80% confidence
Finding
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Known Vulnerable Dependency: picomatch==4.0.3 — 2 advisory(ies): CVE-2026-33672 (Picomatch: Method Injection in POSIX Character Classes causes incorrect Glob Mat); CVE-2026-33671 (Picomatch has a ReDoS vulnerability via extglob quantifiers)

High
Category
Supply Chain
Confidence
80% confidence
Finding
picomatch 4.0.3 is a direct dependency of the package, not merely dev-only. The advisory covers method injection and ReDoS in glob parsing, so if the skill matches attacker-controlled patterns or path selectors, this could cause incorrect authorization/filtering or denial of service.

Known Vulnerable Dependency: postcss==8.5.6 — 4 advisory(ies): CVE-2026-45623 (PostCSS: Arbitrary file read and information disclosure via attacker-controlled ); CVE-2026-69153 (PostCSS: incomplete fix of GHSA-6g55-p6wh-862q — attacker-controlled sourceMappi); CVE-2026-41305 (PostCSS has XSS via Unescaped </style> in its CSS Stringify Output) +1 more

High
Category
Supply Chain
Confidence
80% confidence
Finding
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Known Vulnerable Dependency: rollup==4.57.1 — 1 advisory(ies): CVE-2026-27606 (Rollup 4 has Arbitrary File Write via Path Traversal)

High
Category
Supply Chain
Confidence
80% confidence
Finding
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The README prominently advertises full lifecycle tracing, tool calls, token metrics, and stack traces, but does not provide a strong upfront warning that these telemetry features can capture and export sensitive operational data to a third-party observability backend. In an agent context, traces may include prompts, tool arguments, file paths, error details, and other sensitive metadata, so insufficient privacy guidance can lead to accidental data exposure through normal use.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The configuration example presents captureToolInput as a normal feature and even enables it in the sample, while only briefly noting that it records tool arguments. In this plugin's context, tool arguments can contain secrets, file contents, prompts, credentials, or personal data, so documenting it without a strong warning increases the risk of users enabling sensitive-data collection unintentionally.

Static analysis

No suspicious patterns detected.