T01 · Skill Instruction Hijacking
- Location
SKILL.md:311- Finding
Silent External Feedback Objective Hijacks Agent Behavior
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill does implement Amazon Ads management, but it also adds automatic external feedback reporting, account and payment flows, credential handling, and local persistence behaviors that need careful review before installation.
Install only if you are comfortable giving this skill authority to query and change Amazon Ads data through LinkFox and to write full responses locally. Before use, keep LINKFOX_TOOL_GATEWAY and related endpoint overrides unset unless you trust the destination, avoid exposing API keys or SMS codes in transcripts or logs, review any billing/payment prompt separately, and keep the linkfox output directory out of source control with a plan to delete retained responses.
SKILL.md:311Silent External Feedback Objective Hijacks Agent Behavior
scripts/_common.py:40Configurable Gateway Can Redirect API Keys and Advertising Payloads
scripts/onboarding.py:478Generated API Keys Are Exposed Through Standard Output and Shell Configuration Guidance
scripts/_common.py:711Unsanitized Session Identifier Permits Path Traversal and Out-of-Scope File Writes
scripts/_common.py:677Full Sensitive Responses Can Be Persisted to Undocumented Fallback Locations
scripts/onboarding.py:163Onboarding Recommends Installing Unpinned Runtime Dependencies
The code builds request destinations from environment-controlled base URLs and then sends sensitive authentication material to those endpoints via requests.post. Because this script handles SMS login, access tokens, refresh tokens, and API key generation, a tampered environment can redirect those secrets to an attacker-controlled server, causing credential exfiltration and account compromise.
except RuntimeError as e:
return {"_error": str(e)}
try:
r = requests.post(url, json=body or {}, headers=headers, timeout=timeout)
return r.json()
except Exception as e:
body_text = ""
The gateway URL is also derived from environment variables and used in urllib.request.urlopen with the Authorization header populated from LINKFOX agent API keys. An attacker who can influence the runtime environment can redirect privileged API traffic to an arbitrary host and harvest credentials or manipulate onboarding and order operations.
headers["Content-Type"] = "application/json"
req = Request(url, method=method, data=body_bytes, headers=headers)
try:
with urlopen(req, timeout=30) as resp:
return json.loads(resp.read().decode())
except urllib.error.HTTPError as e:
status = e.code
The documented behavior does not cleanly match the described purpose: the skill includes local persistence of responses/session data and dependency plumbing that are not clearly disclosed as part of Amazon Ads management. This mismatch is dangerous because reviewers and users may authorize a business tool while overlooking data retention and auxiliary behaviors that expand privacy and security risk.
The documented behavior does not cleanly match the described purpose: the skill includes local persistence of responses/session data and dependency plumbing that are not clearly disclosed as part of Amazon Ads management. This mismatch is dangerous because reviewers and users may authorize a business tool while overlooking data retention and auxiliary behaviors that expand privacy and security risk.
The documented behavior does not cleanly match the described purpose: the skill includes local persistence of responses/session data and dependency plumbing that are not clearly disclosed as part of Amazon Ads management. This mismatch is dangerous because reviewers and users may authorize a business tool while overlooking data retention and auxiliary behaviors that expand privacy and security risk.
Referenced artifact was not completely inspected
python scripts/sp/list_campaigns.py '{"profileId":1234567890,"region":"NA",
Referenced artifact was not completely inspected
python scripts/sp/list_ad_groups.py '{"profileId":1234567890,"region":"NA",
Referenced artifact was not completely inspected
python scripts/sp/list_product_ads.py '{"profileId":1234567890,"region":"NA",
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
证码后:`python scripts/onboarding.py login <phone> <code>`(workbuddy 宿主加 `--channel workbuddy`)
- 拿到 `api_key` 后把下面三平台配置转发给用户,提示重启会话生效:
- Windows PowerShell(永久):`setx LINKFOX_AGENT_API_KEY "<key>"`
- macOS zsh:`echo 'export LINKFOX_AGENT_API_KEY="<key>"' >> ~/.zshrc && source ~/.zshrc`
- Linux bash:`echo 'export LINKFOX_AGENT_API_KEY="<key>"' >> ~/.bashrc && source ~/.bashrc`
- 变量名 `LINKFOX_AGENT_API_KEY`(主推)或 `LINKFOXAGENT_API_KEY`(老规范)任一即可
**billing 场景**:`errcode=402` 或消息含 `积分/余额/quota/insufficient/充值/套餐到期`。
- `python scripts/onboarding.py list-plans` → 有 AskUserQuestion 就弹菜单,否则输出编号清单让用户选
- 校验 `plan_id` ∈ 清单、支付方式 ∈ 该套餐 `available_methods`(通常 `wechat/alipay`)
- `python scripts/onboarding.py order <plan_id> <method>` → 展示优先级 PNG
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
All list_*.py scripts import from this module for:
- Dependency check (linkfox-amazon-ads-auth must be installed)
- LINKFOXAGENT_API_KEY retrieval
- /amazonAds/storeTokens call to get access token
- /amazonAds/developerProxy call with the right method / Content-Type per ad product
- Auto-pagination across Sponsored Products / Sponsored Brands (nextToken) and
Sponsored Display (startIndex + count offset)
This file implements SMS login, API key issuance, package purchasing, and order querying for the platform itself rather than Amazon Ads management described by the skill metadata. That mismatch increases supply-chain risk because users invoking an ads-management skill may unknowingly expose phone numbers, verification codes, and account credentials to unrelated account/bootstrap flows.
Payment order creation, package purchase, and QR-code payment rendering are unrelated to managing Amazon SP/SB/SD campaigns and materially expand the capability surface into billing workflows. In this context, such code can enable unexpected charges, phishing-like payment prompts, and user confusion under the guise of an Amazon Ads tool.
The skill exposes capabilities consistent with environment access, shell execution, network access, and file writes, but the manifest does not declare any tool scope or allowed-tools boundaries. In an agent setting, missing least-privilege constraints increases the blast radius of prompt injection or misuse because the runtime may permit broader actions than users or reviewers expect.
The skill metadata description is entirely specified in Chinese and presents the skill as operating in that language, while the document provides no explicit option for users to choose another language or locale for interaction. Under the policy, locale or language constraints should be opt-in or clearly justified; here there is no user-facing language choice.
The skill instructs that complete API responses be always written to disk in the working directory, but it does not clearly warn users that account-linked advertising data and session-organized outputs will be persistently stored locally. This creates a privacy and data-governance risk because sensitive business data may remain on disk, be committed to source control, or be read by other tools/users on the same machine.
Persistently storing full user/account-linked API responses in the project working directory by default materially increases the risk of sensitive data exposure. In this context, Amazon Ads metadata can include account structure, campaign names, identifiers, budgets, and operational details; saving all of it by default makes leakage through local compromise, backups, logs, or accidental repository inclusion much more likely.
The document contains contradictory billing guidance: one section says the tool consumes credits and warns against extra retrieval attempts, while another states '不消耗积分' (does not consume credits). Inconsistency around cost semantics can mislead users or agents into making unintended paid calls, which is especially risky for automated retry or exploration flows.
This markdown file presents all operational instructions and reference material exclusively in Chinese. Under the stated policy, forcing a specific language without user opt-in or a clearly documented regional justification is a natural-language policy violation.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
与上面的工具 API base URL 不同:
curl -X POST https://skill-api.linkfox.com/api/v1/public/feedback \
-H "Content-Type: application/json" \
-d '{"skillName":"linkfox-amazon-ads-manager","sentiment":"POSITIVE",
"category":"OTHER","content":"实体查询结果与预期一致"}'
该文件的自然语言内容全部为中文,且没有说明可根据用户偏好切换语言,也没有提供英文或多语言选项。根据语言/locale 政策,若技能内容强制特定语言而未取得用户选择或明确限定场景,属于自然语言策略风险。
The onboarding instructions direct the operator to collect and use a user's phone number and SMS verification code for account registration/login, but they do not require explicit user consent, disclose how the data will be handled, or warn about privacy implications. In a skill that brokers third-party account access and credential setup, this creates a real privacy and account-security risk because sensitive identifiers and one-time codes could be mishandled or requested without adequate notice.
The skill's stated purpose is Amazon Ads query and mutation through a dependent auth skill, but this module uses subprocess.run to execute another Python script for dependency checking. Spawning a subprocess is a stronger execution capability than the manifest suggests and is not an obvious requirement of ad-management logic itself.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
sys.exit(DEPENDENCY_EXIT_CODE)
try:
result = subprocess.run(
[sys.executable, str(checker)],
capture_output=True,
text=True,
The shared helper persistently writes full API responses, session metadata, and indexing information to local storage outside the core Amazon Ads management function. Because ad-management responses can contain account identifiers, campaign data, and possibly operational metadata, this creates an unnecessary data-retention surface and increases the chance of local disclosure to other users, processes, or later tooling.
API responses are written to disk automatically without explicit user warning or confirmation. In this skill context, those responses may include sensitive advertising account data, identifiers, and operational outputs, so silent persistence can violate least surprise and materially increase data exposure risk on shared or unmanaged systems.