tencent-cloud-cos
Audited by Socket on Aug 16, 2026
5 alerts found:
Anomalyx3Securityx2The provided fragment is primarily a legitimate local setup/configuration script for Tencent COS tooling. There is no clear evidence of overt malware (no exfiltration, backdoor behavior, or payload execution). However, it materially increases security exposure in three ways: (1) it writes long-lived credentials to ~/.mcporter/mcporter.json (and optionally ~/.cos.conf) even with mode 0600; (2) it uses eval with string-built arguments in both do_setup and coscmd configuration paths, which could enable command injection if inputs contain shell metacharacters; and (3) it installs npm dependencies at runtime without visible pinning/integrity controls in the snippet. Overall: low likelihood of malware, but non-trivial security hygiene issues warrant review/hardening (avoid eval, sanitize/quote inputs, and pin dependencies).
No direct malware payload is evident in this Python fragment (no backdoor/exfiltration logic is implemented here). However, it has significant security and operational risk: it executes a Node-based tool via npx at runtime (supply-chain risk) and exposes COS credentials through subprocess command-line arguments and temporary on-disk JSON (credentials could leak via process inspection, logging/telemetry, or abnormal termination). Additionally, the MCP “tool call” function appears to be mocked rather than actually invoking the MCP server in this module, reducing confidence in the real behavior and potentially causing silent security/functional failures. Overall: treat as high-risk for secret leakage and supply-chain review, and verify the real cos-mcp invocation path and dependency integrity.
This is a demo-style driver script but it introduces high-impact security issues: (1) cloud credentials are hardcoded and written into environment variables, and (2) it modifies sys.path to import a wrapper from a relative directory, enabling import-hijacking/supply-chain tampering if that directory is not strictly controlled. The script then performs numerous remote/upload/download and processing/search actions via the wrapper. No explicit malicious payload is visible in this fragment, so malware presence is not confirmed, but the security risk is elevated due to credential handling and dynamic import behavior.
No direct malicious payload is evident in this configuration snippet. However, it is security-sensitive: it embeds credential-like material in configuration and passes cloud secrets directly as command-line arguments to an 'npx'-executed package ('cos-mcp'), which can expose secrets through process/log artifacts. It also introduces supply-chain risk due to dynamic dependency execution via npx without visible pinning/lock control. Treat as a credential-handling and supply-chain integrity concern rather than confirmed malware.
No direct malicious behavior (e.g., exfiltration, backdoors, obfuscation, reverse shells) is evident in this Bash installer fragment. The primary risk is supply-chain and operational: it installs/updates `cos-mcp` from npm using an unpinned `@latest` target with global installation semantics that can trigger npm lifecycle scripts, plus it creates workflow artifacts that may lead users to store sensitive COS credentials in plaintext `.env`/JSON. The actual malware likelihood depends on the `cos-mcp` and local wrapper code not shown here; therefore, treat this as a moderate supply-chain review item and prefer pinning/verifying the npm package version before running in sensitive environments.