T09 · Insecure Skill Coding Practices
- Location
rules/feishu-bitetable-creator.md:110- Finding
Live VectCut API Key Embedded in Generated Feishu Workflow Prompts
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This VectCut video-editing skill is mostly coherent, but it mishandles the user's API key by asking agents to print, paste, or embed it in generated prompts.
Review before installing. Use this skill only if you are comfortable granting it VectCut account access for draft creation, uploads, rendering, and media processing. Do not paste API keys into chat, do not print them with echo or printenv, and do not use the Feishu workflow generator until it uses protected secret references instead of embedding the raw key.
rules/feishu-bitetable-creator.md:110Live VectCut API Key Embedded in Generated Feishu Workflow Prompts
scripts/vectcut_login.py:14VectCut API Key Exposed Through Chat, Command-Line Arguments, and Standard Output
references/bgms.json:3Unpinned Mutable Media Assets Loaded from an Unrelated Third-Party Domain
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def _query_draft_duration_seconds(token, draft_id):
resp = requests.post(
f"{BASE_URL}{QUERY_SCRIPT_PATH}",
headers=_auth_headers(token),
json={"draft_id": draft_id, "force_update": True},
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def _get_media_duration_seconds(token, url):
resp = requests.post(
f"{BASE_URL}{GET_DURATION_PATH}",
headers=_auth_headers(token),
json={"url": url},
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def _add_audio_once(token, payload):
resp = requests.post(
f"{BASE_URL}{ADD_AUDIO_PATH}",
headers=_auth_headers(token),
json=payload,
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def get_scene_effect_types(token):
resp = requests.get(
f"{BASE_URL}{SCENE_TYPES_PATH}",
headers=_auth_headers(token),
timeout=60,
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def get_character_effect_types(token):
resp = requests.get(
f"{BASE_URL}{CHARACTER_TYPES_PATH}",
headers=_auth_headers(token),
timeout=60,
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def add_effect(token, payload):
resp = requests.post(
f"{BASE_URL}{ADD_EFFECT_PATH}",
headers=_auth_headers(token),
json=payload,
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def _get_media_duration_seconds(token, url):
resp = requests.post(
f"{BASE_URL}{GET_DURATION_PATH}",
headers=_auth_headers(token),
json={"url": url},
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def _add_audio_once(token, payload):
resp = requests.post(
f"{BASE_URL}{ADD_AUDIO_PATH}",
headers=_auth_headers(token),
json=payload,
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def add_preset(token: str, payload: dict) -> dict:
resp = requests.post(
f"{BASE_URL}{ADD_PRESET_PATH}",
headers=_auth_headers(token),
json=payload,
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def add_title(token, payload):
resp = requests.post(
f"{BASE_URL}{ADD_TEXT_PATH}",
headers=_auth_headers(token),
json=payload,
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
# Step 1: Submit render task
print(f"[1/2] Submitting render task for draft: {draft_id} ({resolution}, {framerate}fps)...")
payload = {"draft_id": draft_id, "resolution": resolution, "framerate": framerate}
resp = requests.post(
f"{BASE_URL}/cut_jianying/generate_video",
headers=auth_headers,
json=payload,
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
if elapsed > TIMEOUT:
raise RuntimeError(f"Render timed out after {TIMEOUT}s. task_id: {task_id}")
resp = requests.post(
f"{BASE_URL}/cut_jianying/task_status",
headers=auth_headers,
json={"task_id": task_id},
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def submit_asr_basic_task(token, url):
payload = {"url": url, "effect_mode": "basic"}
resp = requests.post(
f"{BASE_URL}{ASR_SUBMIT_PATH}",
headers=_auth_headers(token),
json=payload,
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def get_duration(token, url):
resp = requests.post(
f"{BASE_URL}{GET_DURATION_PATH}",
headers=_auth_headers(token),
json={"url": url},
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def submit_split_video_task(token, video_url, start_s, end_s):
resp = requests.post(
f"{BASE_URL}{SPLIT_SUBMIT_PATH}",
headers=_auth_headers(token),
json={"video_url": video_url, "start": start_s, "end": end_s},
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def query_split_video_task_status(token, task_id):
resp = requests.get(
f"{BASE_URL}{SPLIT_STATUS_PATH}",
headers=_auth_headers(token),
params={"task_id": task_id},
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def query_asr_task_status(token, task_id):
headers = _auth_headers(token)
get_resp = requests.get(
f"{BASE_URL}{ASR_STATUS_PATH}",
headers=headers,
params={"task_id": task_id},
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
if get_resp.status_code == 200 and "status" in get_body:
return get_body
post_resp = requests.post(
f"{BASE_URL}{ASR_STATUS_PATH}",
headers=headers,
json={"task_id": task_id},
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def submit_extract_audio_task(token, video_url):
resp = requests.post(
f"{BASE_URL}{EXTRACT_SUBMIT_PATH}",
headers=_auth_headers(token),
json={"video_url": video_url},
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def query_extract_audio_task_status(token, task_id):
resp = requests.get(
f"{BASE_URL}{EXTRACT_STATUS_PATH}",
headers=_auth_headers(token),
params={"task_id": task_id},
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
payload = {"video_url": video_url, "stream": True}
if isinstance(prompt, str) and prompt.strip():
payload["prompt"] = prompt.strip()
resp = requests.post(
f"{BASE_URL}{VIDEO_DETAIL_PATH}",
headers=_auth_headers(token),
json=payload,
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def submit_task(token, video_url):
resp = requests.post(
f"{BASE_URL}{SUBMIT_PATH}",
headers=_auth_headers(token),
json={"video_url": video_url},
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def query_task_status(token, task_id):
resp = requests.get(
f"{BASE_URL}{STATUS_PATH}",
headers=_auth_headers(token),
params={"task_id": task_id},
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def submit_task(token, payload):
resp = requests.post(
f"{BASE_URL}{SUBMIT_PATH}",
headers=_auth_headers(token),
json=payload,
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def query_task_status(token, task_id):
resp = requests.get(
f"{BASE_URL}{STATUS_PATH}",
headers=_auth_headers(token),
params={"task_id": task_id},
Detected: suspicious.dynamic_code_execution