T09 · Insecure Skill Coding Practices
- Location
guides/01-quickstart.md:19- Finding
Credential-Like StepFun API Key Exposed in Documentation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly coherent with cloud video analysis, but it has material privacy and secret-handling concerns users should review before installing.
Install only if you are comfortable sending the selected video and optional extracted audio text to StepFun. Do not use the API key shown in the quickstart; create your own key, store it carefully, and assume the published value must be revoked. Avoid sensitive or private videos unless retention and deletion behavior are acceptable, because cleanup success is not verified. Expect possible runtime failure until the missing report template is supplied.
guides/01-quickstart.md:19Credential-Like StepFun API Key Exposed in Documentation
scripts/stepfun_client.py:55Cloud Video Deletion Failures Are Not Detected
requirements.txt:1Dependencies Are Installed Without Exact Version or Integrity Pinning
The declared behavior says the skill performs full short-video narrative and psychological analysis with markdown and JSON outputs, but the finding indicates the implemented behavior is materially different and mainly performs ASR plus external transmission. This mismatch is dangerous because users and downstream agents may trust the declared purpose while sensitive media content is sent off-box and promised outputs or analysis stages are not actually performed, undermining informed consent and security review.
The guide includes a concrete API key value and instructs users to export it directly, with no warning that credentials are secret. If the key is real, it may already be compromised; even if it is a placeholder, presenting it as a usable secret trains unsafe handling practices and can lead to accidental credential leakage in shells, dotfiles, screenshots, and logs.
Publishing a real-looking API key in setup docs is a direct secret exposure issue. Beyond possible unauthorized use of the vendor account, the example normalizes unsafe credential practices and increases the chance that users will paste genuine secrets into persistent plaintext locations.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
key = os.environ.get("STEP_API_KEY")
if key:
return key
env_file = Path(__file__).resolve().parent.parent / ".env"
if env_file.exists():
for line in env_file.read_text(encoding="utf-8").splitlines():
line = line.strip()
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
key = os.environ.get("STEP_API_KEY")
if key:
return key
env_file = Path(__file__).resolve().parent.parent / ".env"
if env_file.exists():
for line in env_file.read_text(encoding="utf-8").splitlines():
line = line.strip()
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
if k.strip() == "STEP_API_KEY":
return v.strip().strip('"').strip("'")
raise RuntimeError(
"STEP_API_KEY 未设置。先 `export STEP_API_KEY=sk-xxx` 或写到 skill 根目录的 .env 文件里,"
"key 从 https://platform.stepfun.com 拿。"
)
The listed trigger phrases include common expressions such as "分析这条视频" and "卡点在哪", which are broad enough to overlap with ordinary conversation about videos. The README does not provide exclusion conditions or narrow context constraints to clarify when the skill should or should not activate.
The README explicitly states that uploaded video files are sent to a third-party cloud API for analysis and then deleted afterward, which materially changes the skill’s data flow from a local file processor to an external data transfer workflow. If the manifest does not clearly declare this external transmission, users and orchestrators may unknowingly expose sensitive video content, creating a confidentiality and consent risk.
The skill advertises capabilities that include environment access, file read/write, network access, and shell execution, but it does not declare any explicit tool scope or permissions boundaries. In an agent framework, this creates unnecessary ambient authority and makes misuse or overreach harder to audit, especially because the skill processes user-supplied local file paths and can exfiltrate content over the network.
The trigger phrases are broad everyday expressions about analyzing videos, which increases the chance the skill is invoked unintentionally during normal conversation. In an agent setting, accidental invocation matters because this skill reads local files and may upload media to an external API, so over-broad dispatch can turn casual requests into unexpected data handling.
The skill explicitly transmits video/audio-derived content to an external StepFun API. External transmission is not inherently malicious, but it is security-relevant because local media may contain sensitive audio, faces, locations, or other personal data, and the risk is elevated in this context because the skill ingests local files rather than public URLs.
- `manifest.json` 已声明 `entry / inputs / outputs / triggers / models`,可被 StepClaw Agent 直接 dispatch
- 默认 `STEP_API_KEY` 走环境变量或 skill 根目录的 `.env`
- 输出路径 `output/{video_stem}-{report.md, analysis.json}` 是固定 schema,下游 Agent 可直接读取
- ASR 与 vision 模型都走 `https://api.stepfun.com/v1`,不需要额外 endpoint
## 限制
The entire quickstart is written only in Chinese, with no indication that the skill is China-specific or that users can choose another language. The policy requires flagging language or locale constraints when a specific language is effectively imposed without opt-in or clear justification.
The workflow description shows both cloud upload of the video and ASR processing of audio/transcript content, but the skill description does not clearly warn that user media and derived text are sent to a third-party service. In the context of user-supplied social video files, this can expose personal, copyrighted, or confidential content without informed consent.
The quickstart explicitly shows the video being uploaded to StepFun cloud and later deleted remotely, which contradicts the higher-level description implying a local-file input and local report outputs. This is dangerous because users may supply sensitive videos under the assumption that processing is local, creating an undisclosed third-party data exposure risk.
The entire guide is written in Chinese and assumes Chinese-language operation, including examples and recommended prompt text, without indicating that users may choose another language or locale. Under the policy rule for language/locale, this is a natural-language policy violation because it imposes a specific language experience without opt-in or justification.
The manifest references cloud-side file retention via the keep-upload flag, which strongly implies local video content may be uploaded to remote services, but it does not clearly disclose that default analysis may involve cloud transfer. Because the input is a local MP4 path, users may reasonably assume local-only processing; undisclosed upload of personal or sensitive video content creates a meaningful privacy and data-handling risk.
The trigger phrases are generic, conversational requests that can easily match normal user intent outside a deliberate tool invocation. In an agent environment, this raises the risk of accidental activation on unrelated chats, which could cause unintended processing of local video files and associated uploads or analysis actions.
The file’s instructions are entirely in Chinese and direct the model to produce output in that language, but there is no user opt-in or alternative locale option. Under the policy, forcing a specific language without user choice is a natural-language policy violation unless the locale restriction is explicitly justified.
The prompt is written entirely in Chinese and directs the model into a Chinese-language analyst role, with no indication that the user may choose another language. Under the policy, forcing a specific language without opt-in is a natural-language locale violation unless the constraint is clearly justified as region-specific.
The skill sends a user-supplied local MP4 to a third-party cloud service (StepFun) for analysis, but the skill metadata describes input as a local file path and output as local report artifacts, which can reasonably imply local processing. This creates a data exfiltration/privacy risk because users may provide sensitive videos without clear notice that the content is uploaded off-device; the optional --keep-upload flag increases retention risk.
The hardcoded external ASR endpoint confirms that media-derived content leaves the local environment for cloud processing. Given the manifest's omission of third-party transmission, this is a meaningful privacy and trust issue, and the skill context makes it more dangerous because users may provide personal or proprietary videos expecting local-only analysis.
import httpx
ASR_ENDPOINT = "https://api.stepfun.com/v1/audio/asr/sse"
MODEL = "stepaudio-2.5-asr"
ASR_TIMEOUT_SEC = 600.0
The helper silently loads an API key from the environment or a local .env file in support of uploading media-derived content to a third-party ASR service. In the context of a skill described as taking a local MP4 and producing local reports, undeclared credential use and cloud dependency create a transparency and data-governance issue, especially if users assume all processing is local.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
"-acodec", "pcm_s16le",
str(out_path),
]
proc = subprocess.run(cmd, capture_output=True, text=True)
if proc.returncode != 0:
raise RuntimeError(
f"ffmpeg 抽音失败 (returncode={proc.returncode}):\n{proc.stderr[-1500:]}"
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
"-acodec", "pcm_s16le",
str(out_path),
]
proc = subprocess.run(cmd, capture_output=True, text=True)
if proc.returncode != 0:
raise RuntimeError(
f"ffmpeg 抽音失败 (returncode={proc.returncode}):\n{proc.stderr[-1500:]}"
The code base64-encodes extracted audio from the user's video and transmits it to https://api.stepfun.com for transcription, but the manifest only mentions local file input and local output generation. This mismatch is dangerous because users may unknowingly send sensitive voice content, copyrighted media, or personal information to an external service without informed consent.