T09 · Insecure Skill Coding Practices
- Location
scripts/config.json:20- Finding
Hardcoded Feishu and OpenClaw Credentials in Distributed Configuration
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill largely does the advertised YouTube-to-Feishu digest job, but the published package includes apparent plaintext Feishu/OpenClaw credentials and uses local secrets with weak scoping guidance.
Review carefully before installing. Do not publish or install this package until the apparent secrets in scripts/config.json are removed and rotated. Use a virtual environment with pinned dependencies, provide the Feishu recipient explicitly, and confirm you are comfortable with YouTube transcript text being sent through the configured OpenClaw Gateway/Claude service and the resulting digest being posted to Feishu.
scripts/config.json:20Hardcoded Feishu and OpenClaw Credentials in Distributed Configuration
SKILL.md:16Unpinned Dependencies Installed into the System Python Environment
scripts/digest.py:204Indirect Prompt Injection Through Untrusted Video Titles and Transcripts
The declared purpose presents the skill as a simple YouTube digest, but the actual behavior includes reading local credentials, resolving recipient identity, calling a gateway/LLM service, sending data to Feishu, and persisting local state. This mismatch is dangerous because users may authorize or run the skill without understanding that sensitive local secrets and generated content will be accessed and transmitted to external services.
The skill sends transcript content to an external LLM endpoint through the configured gateway with no explicit notice, consent, or data-minimization controls. Transcript text can contain sensitive or proprietary information, and off-box transmission to a model provider materially changes the privacy and trust boundary.
The skill documentation exposes executable commands and describes behavior that requires broad capabilities (environment access, local file reads/writes, network, and shell execution) but declares no explicit tool scope or permission boundaries. That creates a real security gap because users and orchestration layers cannot constrain what the skill may access, especially since it reads local OpenClaw config and writes persistent state.
The description says the AI generates Chinese summaries, and the architecture later specifies Chinese title translation and summaries. This imposes a language/locale behavior in natural-language instructions without documenting user choice, opt-in, or a justified region-specific requirement.
The trigger phrases are generic enough that ordinary conversation about YouTube summaries or daily digests could invoke the skill unintentionally. Because this skill performs network activity, reads local configuration, and can send outbound messages, accidental invocation has meaningful side effects beyond a harmless lookup.
The markdown omits a clear warning that the skill reads local OpenClaw credentials/configuration and sends content through external services including an LLM/gateway and Feishu. This lack of transparency can lead users to expose secrets or sensitive summaries without informed consent, especially given the 'zero configuration' framing that downplays security implications.
The guide instructs the reader to read a local gateway authentication token from ~/.openclaw/openclaw.json and use it for API access, but it does so without any warning that this is a credential and without guidance on minimizing exposure. In a skill context, normalizing direct access to local secrets increases the chance that future automation reads, logs, or transmits the token unsafely, enabling unauthorized use of the user's local gateway.
The instructions require the first line to be a Chinese title translation and the rest of the summary format is also specified in Chinese, which imposes a language choice. SQP-3 applies to all file types and flags language-policy violations when a specific language is forced without user opt-in or clear justification.
The script silently reads ~/.openclaw/openclaw.json to obtain Feishu app credentials and the gateway token, giving the skill access to sensitive secrets outside its own directory. Even if used for legitimate functionality, implicit secret harvesting increases blast radius if the skill is modified, compromised, or run in an untrusted context.
The manifest describes a daily YouTube digest that fetches selected channels, summarizes transcripts, and pushes Feishu cards. Spawning an external command-line tool via subprocess introduces a broader execution capability than the stated purpose requires, especially since transcript retrieval is already implemented through a Python API path.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
import tempfile, glob, re
try:
with tempfile.TemporaryDirectory() as tmpdir:
subprocess.run([
"yt-dlp", "--write-sub", "--write-auto-sub",
"--sub-lang", "en", "--skip-download", "--sub-format", "vtt",
"-o", f"{tmpdir}/sub",
The system message explicitly instructs the model to produce Chinese summaries, imposing a fixed language choice. The policy requires flagging language or locale constraints when the skill forces a specific language without offering a user choice or documenting a justified region-specific requirement.
The prompt requires the first line to be a Chinese translation and the remainder to be a Chinese summary, which enforces a specific output language. There is no evidence in this file of user opt-in or a documented reason that the skill must be Chinese-only.
These functions call Feishu APIs using app_id, app_secret, bearer tokens, and message content, but the code does not provide a clear warning that external network requests will be made with local credentials and generated content. For code files, network transmission of user or system data should have some visible disclosure when not otherwise documented.
The skill enumerates local OpenClaw identity files and environment variables to discover a Feishu recipient ID without explicit user consent or tight scoping. That is broader-than-necessary access to local account metadata and can result in messages being sent to an unintended identity or expose internal identifiers to unreviewed skill code.