T09 · Insecure Skill Coding Practices
- Location
SKILL.md:96- Finding
Unsafe Immediate Publication to an Unverified Social Account
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 96–110
Vulnerability Type: Blind selection of a social account and immediate publication without confirmation
Risk Level: MediumVulnerable Code
python # First get connected account IDs accounts = requests.get( "https://elb-api.vizard.ai/hvizard-server-front/open-api/v1/project/social-accounts", headers={"VIZARDAI_API_KEY": "YOUR_API_KEY"} ).json()["accounts"] # Then publish requests.post( "https://elb-api.vizard.ai/hvizard-server-front/open-api/v1/project/publish-video", headers={**headers}, json={ "finalVideoId": clips[0]["videoId"], "socialAccountId": accounts[0]["id"], "post": "" # empty = AI auto-generates caption + hashtags } )Technical Analysis
The publication example automatically selects
clips[0]andaccounts[0]without validating which clip or social account the user intended to use. It does not inspect the account's platform, username, ownership, or connection status before submitting the publication request.The request also omits
publishTime, which the API reference indicates results in immediate publication. Supplying an emptypostdelegates caption and hashtag generation to the remote service, so the public text is not presented to the user for review. There is no explicit confirmation step immediately before this externally visible action.The API key and transmission of a selected video URL to the declared Vizard HTTPS endpoint are necessary for the Skill's stated functionality. No unrelated credential exfiltration was identified. However, publication authority is exercised more broadly than necessary because the example does not constrain the action to a user-selected destination and reviewed content.
Attack Path
- A user has multiple social accounts connected to the Vizard account.
- The Agent follows the documented workflow and retrieves the connected accounts.
- The example blindly ...[truncated 1392 chars]
- Remediation
View remediation
Remediation Suggestions
- Require the user to explicitly select the destination account by verified platform and username rather than using
accounts[0]. - Display available accounts and reject accounts whose status is expired, locked, inactive, or not connected.
- Require explicit selection and preview of the clip instead of automatically using
clips[0]. - Generate or accept the caption separately, show the complete caption and hashtags to the user, and require approval before publication.
- Present a final confirmation containing the destination platform, username, clip title or ID, caption, and publication time.
- Separate content generation from publication so that processing a video cannot implicitly authorize a public post.
- Prefer a draft or scheduled-publication workflow where supported. If immediate publication is required, obtain confirmation immediately before the
publish-videorequest. - Check HTTP status codes and API response fields before reporting success, and avoid retrying publication requests without verifying whether the first request succeeded.
- Document that the API key grants access to connected social accounts and should be stored securely, redacted from logs, and scoped or rotated where the service supports those controls.
A safer workflow should identify the target account explicitly:
python active_accounts = [ account for account in accounts if account.get("status") == "active" ] # Present platform, username, and ID to the user. # Continue only after the user explicitly selects an account and approves # the exact clip, caption, and publication timing. selected_account_id = user_confirmed_account_id selected_video_id = user_confirmed_video_id approved_caption = user_confirmed_caption payload = { "finalVideoId": selected_video_id, "socialAccountId": selected_account_id, "post": approved_caption } # Send only after final user confirmation. response = requests.post( "https://elb-api.vizard.ai ...[truncated 145 chars]- Require the user to explicitly select the destination account by verified platform and username rather than using
