T09 · Insecure Skill Coding Practices
- Location
scripts/bundle.cjs:1859- Finding
Sensitive authentication material is written to plaintext logs and configuration
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This installer broadly matches its purpose, but it handles login credentials and installs a mutable plugin in ways users should review before trusting it.
Install only if you trust the publisher and are comfortable with the skill sending a machine-derived fingerprint to the AgentSentry service, installing the latest registry version of the plugin, granting conversation access to that plugin, restarting the OpenClaw gateway, and storing/logging activation data locally. Prefer a version-pinned installer with redacted logs and documented file permissions before use in a sensitive environment.
scripts/bundle.cjs:1859Sensitive authentication material is written to plaintext logs and configuration
scripts/bundle.cjs:1854Unpinned registry package is installed and executed during skill initialization
Referenced artifact was not completely inspected
The bundled script (`bundle.cjs`) performs the following operations:
Referenced artifact was not completely inspected
The bundled script (`bundle.cjs`) performs the following operations:
The code collects a stable machine identifier via node-machine-id and sends it as an HTTP header to a remote endpoint. Persistent device fingerprints enable long-term host tracking and linkage across sessions, which is especially risky because this capability is not clearly necessary for a generic plugin installer and is not prominently disclosed here.
The logging wrapper writes workflow details to a local file, and other code paths log login URLs, tokens, and full API responses. Those artifacts can grant account/session access or expose sensitive backend-issued identity/configuration data to any local user or process that can read the state directory or collected logs.
The installer configures the plugin with allowConversationAccess: true, granting the plugin access to user conversations without that elevated permission being clearly disclosed in the manifest. Because the plugin is remotely configured and security-related, conversation access meaningfully expands data exposure and the blast radius of any plugin compromise or misuse.
The installation instructions require the user to input the trigger phrase in Chinese ("帮我安装 agent-sentry 插件"), and the surrounding README is entirely written in Chinese without indicating that other languages are supported. This creates a language/locale constraint in natural-language instructions without documenting user choice or an explicit justified region-specific limitation.
The skill explicitly instructs execution of a bundled Node.js script and relies on shell/environment capabilities, but the manifest declares no corresponding tool restrictions or allowed-tools scope. This creates an authorization gap where an agent may invoke broader shell access than users expect, increasing the chance of unintended command execution or misuse by modified bundled code.
The skill persists login state, token material, device fingerprint data, and activation information across runs in local state files, then reuses that state during finalize. Persisting authentication-related state on disk increases exposure to local token theft, replay, correlation of device identity, or tampering that could alter later configuration behavior, especially if file permissions and expiry handling are weak.
The skill uses a bundled CommonJS script (`bundle.cjs`) for installation. This script is executed directly and supports two explicit phases:
- **Phase 1 (`--phase init`)**: Install plugin, create login token, print the product authorization activation page link, save local state, and return quickly.
- **Phase 2 (`--phase finalize`)**: Read the saved state, perform a short polling window, and finish writing OpenClaw plugin configuration if platform login and activation are complete.
If the script is run without `--phase`, it automatically chooses:
The skill asks the agent to run a bundled CommonJS script from an external source that performs system queries, network communication, file writes, and may invoke child processes via dependencies. Even though the document warns about arbitrary code execution, that warning confirms the risk rather than mitigating it: executing opaque bundled code gives the skill effectively unrestricted behavior on the host.
- **Bundled Code:** The script includes bundled third-party libraries, which may execute system-level operations.
- **System Queries:** The script uses `node-machine-id` library, which may use `child_process` to query system information.
- **Network Access:** The script communicates with remote API endpoints for authentication.
- **Arbitrary Code Execution:** Running bundled scripts from unknown sources can execute arbitrary code on your system.
### Security Measures
The skill exceeds its stated installer/basic-configuration purpose by initiating a remote authentication workflow and transmitting host-derived identity data to an external service. In an installation skill, undisclosed network enrollment and identity exchange increases trust and privacy risk because users may run it expecting only local package/config changes.
The skill sends a device fingerprint to a remote service without any clear warning or consent in this code path. Hidden collection of persistent identifiers undermines informed consent and creates privacy and tracking risk disproportionate to an installation workflow.
The script saves login state containing sensitive metadata, including token-related workflow information and device fingerprint, to disk without warning the user. If the state directory is readable by other users or included in backups, this can leak authentication and tracking data beyond the intended runtime context.
The code logs full identity responses from the remote service, which may include sensitive account, endpoint, or credential-related values, without warning that these contents may be persisted. Verbose logging of authentication payloads increases the chance of credential leakage through local logs, support bundles, or telemetry collection.
The script restarts the OpenClaw gateway during finalization, which is a service-impacting action not disclosed by the manifest's 'install and basic configuration' description. Unexpected restarts can interrupt active workloads or be abused for denial-of-service-like operational disruption if run in production contexts.
The configuration hard-codes language: "zh" in the plugin settings. This is a natural-language policy issue because it imposes a specific language/locale on users with no visible opt-in, selection mechanism, or documented justification in the file.
Skill requests more permissions than appear necessary for its stated functionality. Review if elevated access is justified.
2. **Verify Integrity:** Check the script's file integrity using a hash if provided
3. **Monitor Execution:** Run the script in a controlled environment and monitor its output
4. **Ensure Trust:** Only run the script if you trust the source of this skill
5. **Check Permissions:** Ensure the script has appropriate file permissions
### Alternative Installation
The surrounding documentation/UX context says to use the skill to complete installation and basic configuration in one go, but the code explicitly states Phase 1 exits quickly and requires rerunning the skill after the user logs in. This is an intent-level contradiction between the claimed workflow and the implemented behavior.