T09 · Insecure Skill Coding Practices
- Location
scripts/upload_image.py:13- Finding
Hard-Coded Third-Party Upload Credential
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill appears to be a real AI-video helper, but it needs Review because it can upload local files to a public image host using embedded credentials without enough scoping or warnings.
Review before installing. Use only non-sensitive image files, assume uploaded images may become publicly reachable or retained by a third party, replace or remove the embedded ImgURL credential, and avoid invoking the uploader on arbitrary paths until file validation, size limits, workspace restrictions, and explicit confirmation are added.
scripts/upload_image.py:13Hard-Coded Third-Party Upload Credential
scripts/upload_image.py:17Arbitrary Local Files Can Be Uploaded to a Third-Party Public Host
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
req = urllib.request.Request(url, data=data, headers=headers, method="POST")
try:
with urllib.request.urlopen(req) as resp:
return json.loads(resp.read().decode("utf-8"))
except urllib.error.HTTPError as e:
body = e.read().decode("utf-8")
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
req = urllib.request.Request(url, data=data, headers=headers, method="POST")
try:
with urllib.request.urlopen(req) as resp:
return json.loads(resp.read().decode("utf-8"))
except urllib.error.HTTPError as e:
body = e.read().decode("utf-8")
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
)
try:
with urllib.request.urlopen(req, timeout=30) as resp:
result = json.loads(resp.read().decode())
if result.get("code") == 200:
url = result["data"]["url"]
The skill claims to be a video-generation helper, but its instructions include uploading local images to a third-party image host and using credentials for API access without clearly presenting those data-transfer risks in the declared behavior. In a skill handling user media, undeclared outbound transmission is especially sensitive because local files may contain private or proprietary content.
The skill claims to be a video-generation helper, but its instructions include uploading local images to a third-party image host and using credentials for API access without clearly presenting those data-transfer risks in the declared behavior. In a skill handling user media, undeclared outbound transmission is especially sensitive because local files may contain private or proprietary content.
The skill documents use of environment variables, external APIs, image upload, and file transfer, but does not declare any tool scope or permission boundaries. This makes the skill harder to audit and increases the chance an agent can access network or secrets more broadly than users expect.
The skill instructs users to upload local images to a public image host to obtain a URL, but gives no warning that the image may become publicly accessible or retained by a third party. This can expose sensitive personal, internal, or copyrighted images beyond the user's intent.
The skill advises downloading generated videos locally and sending them to Feishu without warning about local storage, retention, or third-party transmission. This can leak sensitive generated content or metadata and may leave residual files on disk after transfer.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
**文档:** https://klingai.kuaishou.com/api/docs
**端点:** `https://api.klingai.com/v1/videos/text2video`
**认证:** 需要 JWT Token(用 Access Key + Secret Key 生成)
The module docstring presents the script name, supported features, and usage instructions only in Chinese. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is clearly justified, which is not provided here.
Argument help text, validation errors, and status output are all emitted in Chinese, with no option to choose another language. This enforces a single language for operation and troubleshooting, which matches the language/locale policy violation described in SQP-3.
This skill is presented as a video-generation capability, but the file implements image upload to a public hosting provider. That scope expansion matters because it introduces data exfiltration/public-publication behavior that a user invoking a video tool may not reasonably expect, increasing the chance that local images are exposed externally without informed consent.
The script contains built-in fallback API credentials, including what appears to be a live token, and uses them automatically if environment variables are absent. Hardcoded secrets can be abused by anyone with access to the code, may incur unauthorized usage/costs, and indicate poor secret-management hygiene in a component that transmits data to a third-party service.
The script uploads a user-specified local file to a public image-hosting service and returns a public URL, but there is no explicit privacy warning or consent gate. In the context of an AI media skill, users may provide personal, proprietary, or sensitive images, so silent public disclosure materially increases the risk of accidental data exposure.
The description says the skill triggers when the user asks to generate a video, turn an image into a dynamic video, or generate clips from storyboard descriptions, but it does not define clear boundaries or exclusions. Phrases like '要求生成视频' are broad enough to match many ordinary creative requests, which could cause unintended invocation without more specific trigger constraints.
The script accesses upload credentials without any user-facing disclosure, which reduces transparency around third-party service use and account context. While less severe than the hardcoded-secret issue, hidden credential use can mislead operators about which external account receives uploaded content and can complicate accountability and incident response.
No suspicious patterns detected.