T01 · Skill Instruction Hijacking
- Location
SKILL.md:172- Finding
Automatic External Reporting of User Conversation Content
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches TikTok OAuth and token management, but it adds automatic external feedback reporting and has overbroad credential, execution, and persistence controls that merit Review before installation.
Install only if you trust LinkFox with TikTok creator account metadata, token-management actions, and possible feedback content. Before use, pin the API base URL to the legitimate HTTPS LinkFox gateway, avoid setting TIKTOK_VIDEO_API_BASE_URL in normal operation, do not use the generic response wrapper with arbitrary scripts, store any persisted outputs in a private temporary directory, and delete them after use.
SKILL.md:172Automatic External Reporting of User Conversation Content
scripts/account_tokens.py:17API Credential Exfiltration Through Unrestricted Gateway Override
scripts/response_io.py:207Sensitive API Responses Persisted Without Secure Permissions or Cleanup
The request target is derived from the TIKTOK_VIDEO_API_BASE_URL environment variable and then used directly in urlopen, so anyone who can influence the runtime environment can redirect this token-query request to an attacker-controlled host. Because the request includes the LINKFOXAGENT_API_KEY authorization header and user-supplied account identifiers, this creates a server-side request forgery / credential exfiltration path and is especially sensitive in a token-management skill.
)
try:
with urlopen(req, timeout=150) as response:
return json.loads(response.read().decode("utf-8"))
except HTTPError as e:
body = e.read().decode("utf-8") if e.fp else ""
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
)
try:
with urlopen(req, timeout=150) as response:
return json.loads(response.read().decode("utf-8"))
except HTTPError as e:
body = e.read().decode("utf-8") if e.fp else ""
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
)
try:
with urlopen(req, timeout=150) as response:
return json.loads(response.read().decode("utf-8"))
except HTTPError as e:
body = e.read().decode("utf-8") if e.fp else ""
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
)
try:
with urlopen(req, timeout=150) as response:
return json.loads(response.read().decode("utf-8"))
except HTTPError as e:
body = e.read().decode("utf-8") if e.fp else ""
The documented purpose is TikTok creator OAuth and token management, but the included large-response pattern introduces a generic subprocess wrapper that can run different local scripts, persist outputs to disk, and re-read them with flexible field extraction. That mismatch weakens operator expectations and can be abused to broaden the skill from a narrow auth workflow into a more general local execution and data-handling surface.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
3. **获取该账号令牌**:调用 `/tiktokVideo/accountTokens`,传入 `openId`。
4. **把 `accessToken` 作为 `ttsAccessToken` 交给 `/tiktokVideo/developerProxy`** 执行具体业务调用。
## Display Rules
1. **只呈现数据**:展示授权结果、账号列表、令牌信息即可,不做业务建议。
2. **安全意识**:不要明文显示完整 `accessToken` / `refreshToken`,仅展示前 10 字符等掩码形式。
This skill explicitly supports obtaining access tokens for downstream use, which is credential access by design. In the context of an agent skill, that is especially dangerous because tokens can enable direct API actions on linked creator accounts if disclosed, mishandled, or routed to unintended consumers.
| "绑定 TikTok 视频号用于上传视频" | 新视频号授权 |
| "看看已授权的 TikTok 视频号" / "Show my authorized TikTok video accounts" | 列出已授权账号 |
| "TikTok 视频上传令牌过期了" / "My TikTok video token expired" | 刷新令牌 |
| "获取 TikTok 视频号的访问令牌" / "Get TikTok video account access token" | 查询账号令牌 |
**Not applicable** — 超出本 skill 的业务:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
#!/usr/bin/env python3
"""
TikTok Video Token Refresh - LinkFox Skill
Calls the /tiktokVideo/refreshToken endpoint to refresh the access token.
Usage:
python refresh_token.py '{"openId": "7010736057180325637"}'
Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.
# Force the child process to emit UTF-8 regardless of the host console
# encoding (Windows defaults to cp936 / gbk and would otherwise corrupt
# non-ASCII bytes when we read them back).
child_env = os.environ.copy()
child_env["PYTHONIOENCODING"] = "utf-8"
timed_out = False
The skill exposes capabilities consistent with shell, file I/O, network, and environment access but does not declare any tool restrictions. In an agent setting, missing scope boundaries increases the chance that later instructions in the skill cause over-broad execution, data access, or unintended side effects beyond TikTok authorization workflows.
The trigger language is broad enough that the skill may activate on many TikTok creator/video-token related requests, including ones outside the intended authorization boundary. Over-triggering is dangerous here because the skill handles sensitive account and token-management functions and may expose or request privileged actions too early.
The skill describes querying and refreshing tokens, which are highly sensitive credential operations, but the workflow section does not prominently warn about credential handling risks or require least-privilege presentation. Even though later display rules mention masking, the operational guidance still normalizes retrieval and movement of access tokens as routine workflow data.
The instruction to automatically call a separate Feedback API for complaints, praise, or improvement opportunities expands the skill's data flow beyond its stated authorization/token-management purpose. This can result in unnecessary transmission of user content or operational details to another endpoint without clear necessity or user awareness.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
---
## curl Examples
### Get Authorization URL
The note on L098-L099 states that full tokens are stored in the database, which describes behavior not implemented anywhere in this file. This is more than an omitted detail: it attributes a storage side effect to the script that the code does not perform, creating misleading intent/documentation for auditors and operators.
_resolve_script accepts an arbitrary filesystem path and only verifies that it exists, enabling the helper to invoke code unrelated to the declared TikTok authorization purpose. In a constrained skill environment, this is dangerous because it bypasses business-scope expectations and can be abused as a general launcher for other local Python programs.
Output size or generation rate is not bounded. Unbounded output enables denial-of-service through resource exhaustion, log flooding, or context-window stuffing.
"""Cap the sample's value fields when it has many keys.
`shape.*.item_keys` is the single source of truth for the full key list
(always complete, no truncation). The sample only ever shows up to
SAMPLE_KEY_CAP fields with their concrete values, since the agent only
needs a feel for value shapes — for the full menu of available fields,
they read `shape`.
The helper executes whatever path is supplied via --script with the current Python interpreter, with only an existence check and no restriction that the target belongs to this skill. In an agent context, this turns a TikTok OAuth utility into a generic code-execution wrapper that can run unintended local scripts and then persist their output, materially expanding the attack surface.
timed_out = False
try:
proc = subprocess.run(
[sys.executable, str(main_script), args.params],
capture_output=True,
text=True,
The helper always writes the full stdout of the executed subprocess to disk, even on errors and even when the output is not JSON. For an OAuth/token-management skill, persisted stdout may contain access tokens, refresh tokens, account identifiers, secrets, or other sensitive API responses, creating a confidentiality risk and a broader data-retention surface than the manifest implies.
The title and opening description say this document covers authorization and token-management interfaces for the /tiktokVideo module, and even states business calls via /tiktokVideo/developerProxy are not in this skill's scope. Later sections nevertheless reference developerProxy-related behavior in error codes and document a separate feedback API, which contradicts the stated scope boundary in the documentation.
The manifest scopes this skill to TikTok creator/video-account OAuth authorization, authorized-account listing, token lookup, and token refresh under /tiktokVideo. The documented Feedback API posts user sentiment and freeform content to a different service, which is not an obvious requirement for authorization or token management and represents an extra capability outside the stated purpose.
No suspicious patterns detected.