md2wechat
Audited by Socket on Sep 17, 2026
10 alerts found:
Securityx3Anomalyx7SUSPICIOUS: the skill’s purpose broadly matches Markdown-to-WeChat publishing, and the CLI/install provenance is largely coherent, but the data flow is not cleanly limited to official WeChat APIs. Routing draft/media operations and potentially WeChat secrets through md2wechat-operated endpoints is a significant integrity and credential-forwarding concern.
No direct malicious behavior or data theft is evident. The script implements automatic binary provisioning, but it presents a significant supply-chain risk because it downloads and executes binaries from GitHub or jsDelivr with only a file-size check and no cryptographic integrity verification. Cached binaries are also trusted based on path, executability, and version metadata. Use only with trusted release infrastructure and add pinned checksums or signatures before installation and execution.
This is a binary auto-provisioning wrapper with a significant supply-chain integrity weakness: it downloads and executes binaries from remote endpoints based only on URL availability and file size. GitHub/jsDelivr usage is consistent with the stated purpose, and the fragment shows no direct credential theft, exfiltration, persistence, or destructive behavior. Binary signatures or pinned SHA-256 hashes should be required, and cache/local binaries should be integrity-checked. The set -e arithmetic bug may prevent downloads from functioning as intended.
No clear malicious or intentionally sabotaged behavior is present. The code contains security risks if its inputs are attacker-controlled: unrestricted URL fetching creates SSRF and unbounded download risk, while predictable temporary paths and unsanitized filenames create file collision, symlink, and local information exposure concerns. Access-token exposure is also sensitive. Use randomized files such as os.CreateTemp, sanitize or ignore user filenames, restrict outbound URL schemes and destinations, enforce response-size limits, and avoid exposing access tokens.
The code appears intended to generate and upload images, with no clear embedded malware or obfuscation. However, it contains a serious command-execution vulnerability: the user-controlled output_path argument is executed directly via subprocess.check_output. If an attacker can control script arguments, they can run arbitrary local executables with the script's privileges. The API-key handling and remote image download are functional but should use stricter configuration and URL/content validation.
The code appears to implement intended WeChat image and draft uploading rather than malware. The main security issue is an unvalidated HTML image src path that can traverse outside base_dir and upload readable local files to the WeChat account. The dynamic local import also warrants review of the generate_image module and package contents. Restrict image paths to a resolved base directory, reject absolute paths and traversal, validate URLs, and avoid exposing access tokens in query strings where the API permits alternatives.
The fragment appears to be ordinary image conversion code with no evidence of malware or intentional sabotage. The primary security concern is potential HTML injection/XSS because WechatURL is interpolated into an HTML attribute without escaping or strict URL validation. Image parsing also has ordering and validation weaknesses that may cause incorrect substitutions. Use HTML escaping and allowlist safe URL schemes before constructing the tag.
脚本的可见行为是常规安装流程,没有直接发现数据窃取、反向 shell、挖矿、破坏文件或恶意持久化行为。主要安全问题是通过远程脚本 iex 安装,以及无完整性校验地下载并执行 GitHub latest release 的 EXE。建议改用固定版本 URL,验证发布者签名或官方 SHA-256,并避免执行未经审查的 DownloadString 内容。
The fragment is a rendering CLI and contains no evident malware or deliberate exfiltration. It has security-sensitive design issues: arbitrary file reads through the content argument, unrestricted output-path writes, and unescaped HTML/SVG passed to an unspecified rendering engine. Jinja2 template safety depends on the external style_prompts implementation; attacker-controlled template text would be dangerous. Review html_to_image and style_prompts before treating untrusted input as safe.
未发现脚本自身包含明显恶意行为、凭据窃取、网络外传、反向 shell 或系统破坏逻辑。该安装方式存在中等供应链安全风险:它从可变的 GitHub latest Release 下载二进制文件,未进行签名或哈希校验,并将其直接标记为可执行。应优先使用固定版本、校验官方签名或 SHA-256,并在执行前审查二进制文件。