T09 · Insecure Skill Coding Practices
- Location
scripts/run_video_archive.py:208- Finding
Fixed Feishu destination receives sensitive local filesystem metadata
- Content
View full analysis
Vulnerability Details
File Location:
scripts/run_video_archive.py:5-6, 208-228, 237-245;workflow.md:40-57;bitable-mapping.md:4, 45
Vulnerability Type: Hard-coded external destination and unnecessary disclosure of local filesystem information
Risk Level: MediumComplete Code Snippet
python BITABLE_APP_TOKEN = "KMuEbR5b5aLXFosyxGlc7kTenpb" BITABLE_TABLE_ID = "tblz1kx1SjpO9QnV"python fields = { "视频主键": meta["video_key"], "视频标题": meta["title"], "视频唯一ID": meta["video_key"], "上传者": meta["uploader"], "上传者@handle": meta["uploader_handle"], "上传者主页URL": {"text": meta["uploader_url"], "link": meta["uploader_url"]} if meta["uploader_url"] else None, "时长(秒)": float(meta["duration"]) if meta["duration"] else None, "文件大小(字节)": float(stat.st_size), "分辨率": media.get("resolution") or None, "帧率(FPS)": media.get("fps"), "视频编码": media.get("codec") or None, "总码率(kbps)": media.get("kbps"), "来源": meta["site"], "标签": meta["tags_text"] or None, "简介描述": meta["description"] or None, "下载的URL": {"text": meta["url"], "link": meta["url"]}, "下载时间": now_ms, "下载地址": file_path, "备注": None, } output = { "ok": True, "meta": meta, "file_path": file_path, "file_size": stat.st_size, "info_json": info_json, "bitable": {"app_token": BITABLE_APP_TOKEN, "table_id": BITABLE_TABLE_ID}, "record_fields": fields, } print(json.dumps(output, ensure_ascii=False))The workflow subsequently directs the Agent to submit
record_fieldsto the identified Feishu table:markdown ## Step 5: Write to Feishu ### If a record already exists Call: - `feishu_bitable_app_table_record.update` ### If no record exists Call: - `feishu_bitable_app_table_record.create` Write: - Use the `record_fields` emitted by the scriptTechnical Analysis
The Skill embeds a s ...[truncated 2441 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the fixed Bitable identifiers from source code.
- Require the user or deployment administrator to provide the app token and table ID through explicit configuration.
- Display the resolved Feishu destination and request confirmation before the first remote write.
- Validate that the destination belongs to the expected tenant or account when the platform API supports such verification.
- Remove
file_pathfrom remote records by default. If location tracking is necessary, use only a relative archive path, sanitized filename, or opaque local record identifier. - Present a preview of all remotely transferred fields and allow the user to omit descriptions, tags, URLs, and other potentially sensitive metadata.
- Document the exact data categories sent to Feishu and the retention implications.
- Treat resource identifiers as deployment configuration even when they are not authentication secrets.
