T01 · Skill Instruction Hijacking
- Location
SKILL.md:84- Finding
Forced Injection of Unrelated Third-Party Authentication Instructions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This SKILL.md formatter adds unrelated RedFox API-key instructions and runs third-party usage reporting after each use.
Review carefully before installing. The skill is not just a local formatter: it can add unrelated RedFox credential instructions to other skills and reports usage to a third-party endpoint after each run. Prefer a local-only version with the mandatory auth-template insertion and telemetry script removed.
SKILL.md:84Forced Injection of Unrelated Third-Party Authentication Instructions
scripts/record.py:28Automatic Third-Party Usage Telemetry and Credential Transmission
scripts/record.py:28Hardcoded Shared API Credential in Distributed Source Code
scripts/record.py:21Unpinned Runtime Dependency Installation Guidance
The stated purpose is only to optimize SKILL.md content, yet the instructions also introduce external authentication, telemetry/reporting, and subprocess execution. This mismatch is dangerous because users may invoke the skill expecting a local formatting action while it performs undisclosed external operations and uses credentials.
Embedding public/shared API-key guidance and reporting capability in a local formatter is unjustified and expands the attack surface. It encourages credential use for a task that should not need external services, creating risks of secret misuse, data leakage, and hidden service dependency.
The skill instructs use of an embedded/shared API key and a reporting path without clearly warning that data may be transmitted externally. Lack of an explicit privacy and transmission notice prevents informed consent and can expose user content, metadata, or environment-linked activity to a third party.
The skill embeds instructions to rely on a shared built-in API key and couples it with automatic reporting behavior. Shared credentials are dangerous because they obscure accountability, encourage broad reuse, and can expose all users to abuse, revocation, or unintended access patterns if the key or service is compromised.
Referenced artifact was not completely inspected
1. 读取目标 `SKILL.md`
A skill that claims to only restructure markdown should not require running an external usage-recording script after each execution. This creates an unnecessary data-flow outside the core task and can transmit metadata or content-derived information without informed consent.
Directing execution of python3 scripts/record.py adds subprocess behavior that is unrelated to markdown optimization and may perform arbitrary file, network, or environment access through that script. This is especially risky because the invocation is framed as routine and automatic rather than exceptional and consent-based.
The script explicitly states that every use of the skill triggers a report to an external service, but this capability is unrelated to optimizing SKILL.md content and is not transparently disclosed in the skill's stated purpose. Undisclosed telemetry creates a privacy and trust risk because user activity is transmitted off-platform without informed consent.
This code performs authenticated outbound network reporting to a third-party endpoint whenever the skill is used, which is not necessary for a documentation-formatting skill. In the context of a skill that should only edit local markdown, hidden remote communication materially increases the risk of covert tracking and unauthorized data exfiltration pathways.
The usage guidance says users can simply describe their optimization need in natural language, without defining narrow activation boundaries. In agent ecosystems, broad trigger phrasing can cause accidental invocation on loosely related requests, leading the skill to read or rewrite SKILL.md content when the user did not clearly intend that operation.
The example prompt about optimizing 'my xxx skill' is generic and can overlap with ordinary requests about improving a skill, capability, or workflow rather than specifically editing a SKILL.md document. This increases the chance of unintended routing or over-selection of the skill in contexts where the user did not mean documentation normalization.
The natural-language instructions, examples, and usage guidance are presented entirely in Chinese, which effectively imposes a language expectation on users. The file does not offer an alternative language, user opt-in, or a justification that the skill is intentionally limited to a Chinese-speaking context.
The usage guidance states that users can invoke the skill with broad natural-language optimization requests, without clear scope boundaries or exclusion criteria. This increases the chance that an agent will match and activate the skill on loosely related requests, causing unintended document rewrites or workflow interference rather than a direct exploit.
The example trigger phrases are generic and action-oriented, such as asking to optimize or check a SKILL.md, but they do not define required context, file presence, or disambiguation rules. In an agent environment, such broad triggers can cause accidental selection of this skill over others, leading to misrouting, unintended edits, or prompt-scope confusion.
The skill advertises a local markdown-optimization function, but its content references environment-variable credentials and a networked recording flow without declaring tool scope or permissions. Missing scope declarations make it harder for users and platforms to understand that external access may occur, increasing the risk of unintended data exposure or unauthorized capability use.
The description lists trigger phrases such as “改进skill” and “skill优化”, which are generic enough to overlap with ordinary requests about improving a skill rather than specifically editing a SKILL.md file. The activation guidance does not provide negative examples or tighter scope constraints to clarify when this skill should not trigger.
The document says it only changes SKILL.md and does not modify scripts/, yet it relies on behavior in scripts/record.py and requires executing it. This contradiction can mislead reviewers and users about the real operational scope, reducing the chance that the script is scrutinized for harmful behavior.
The file imposes fixed Chinese section titles such as “📝 简介”, “✨ 功能特性”, and “🔑 鉴权” for every SKILL.md. This is a language policy constraint presented as mandatory behavior, but the document does not provide user opt-in, multilingual alternatives, or a justification that the skill is only for a Chinese-specific environment.
Mandatory post-run reporting is introduced without a clear safety or privacy disclosure, despite involving execution of an external script that may transmit usage data. This hidden operational step undermines transparency and could surprise users who expected a local-only edit operation.
A natural-language requirement to report usage after every run creates a persistent telemetry channel that is unrelated to the core markdown-formatting task. In this context, the hidden reporting is more dangerous because the skill presents itself as a harmless local optimizer, lowering user suspicion and increasing the chance of silent data collection.
The guidance explicitly encourages inclusion of broad trigger keywords but does not require narrowing conditions, exclusions, or ambiguity handling. In a skill-selection system, this can cause overbroad activation, making the optimizer rewrite or standardize SKILL.md files outside the intended scope and increasing the chance of prompt-routing mistakes or unintended tool use.
The script is designed to use environment-provided credentials for external reporting, despite the skill's declared purpose being local SKILL.md optimization. Accessing ambient credentials in a non-essential path expands the blast radius of the skill and can enable misuse of secrets or unauthorized association of user identity with usage events.
A hardcoded API key is embedded in the script and used to authenticate telemetry without any consent or warning. Hardcoded secrets are inherently risky because they can be extracted, reused, rotated poorly, and they normalize hidden privileged communication from a tool whose purpose does not require it.
The outbound POST request transmits data to an external service, creating an exfiltration channel in a skill that should not need network access to optimize markdown. While the current payload appears limited, the existence of this transmission path is itself dangerous because it can be repurposed or expanded without user awareness.
'X-API-Key': api_key,
}
try:
resp = requests.post(
RECORD_URL,
json=payload,
headers=headers,
The use-case prompts are broad product-style descriptions and do not clearly state the boundaries for when this skill should or should not activate. While the skill's domain is documentation optimization rather than a high-risk operational action, ambiguous activation can still cause incorrect tool selection, unnecessary file modification, or confusion in multi-skill environments.