Back to skill

Security audit

Model Context Transfer

Security checks for vulnerabilities and agentic risk

Overview

This skill is useful for model handoffs, but it explicitly encourages transferring credentials and other sensitive context without redaction or clear user control.

Review before installing. Use it only with a strict rule that raw passwords, tokens, API keys, cookies, private keys, and recovery codes must never be copied into CONTEXT_TRANSFER or MEMORY.md; use secret-manager references or environment variable names instead, and require explicit user approval before any handoff is sent to another model or agent.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:121
Finding

Raw Credentials May Be Included in Plaintext Model Handover Documents

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:56-60, SKILL.md:101-110, and SKILL.md:121-127; plaintext output occurs at scripts/generate_transfer.py:91-92
Vulnerability Type: Sensitive information exposure through plaintext context transfer
Risk Level: High

Vulnerable Documentation

English rendering of SKILL.md:56-60:

markdown
When temporarily switching models:
1. The current model generates a `CONTEXT_TRANSFER` summary
2. Send the summary to the new model
3. The new model continues working based on the summary
4. Transfer the result back after completion

English rendering of SKILL.md:101-110:

markdown
### Important Notes
- Prohibited actions: []
- Sensitive information: []
- Dependencies: []

English rendering of SKILL.md:121-127:

markdown
Before handover, confirm:
- [ ] The project background is clear
- [ ] The current progress is explicit
- [ ] Key constraints are recorded
- [ ] Files, paths, and credentials have been handed over
- [ ] The next actions are specific and executable
- [ ] Potential risks are identified

The corresponding plaintext write operation in scripts/generate_transfer.py:91-92 is:

python
with open(output_file, 'w', encoding='utf-8') as f:
    f.write(content)

Technical Analysis

The Skill explicitly instructs users or agents to include credentials in a handover and provides a field for sensitive information. The handover is then intended to be sent to another model. No guidance or enforcement prevents raw API keys, passwords, access tokens, session cookies, private keys, or other secrets from being placed in the generated document.

The generator writes all supplied information directly to an unencrypted Markdown file without secret detection, redaction, output-permission hardening, retention controls, or recipient authorization checks. Although the script does not independently collect or tr ...[truncated 1685 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace the credential-handover requirement with an explicit prohibition against including raw credentials, passwords, tokens, private keys, cookies, or recovery codes.
  2. Permit only indirect secret references, such as secret-manager identifiers, environment-variable names, or credential aliases that contain no secret value.
  3. Add a mandatory pre-transfer secret scan for common token formats, private-key headers, connection strings, authentication headers, and high-entropy values.
  4. Refuse generation or require explicit redaction when a probable secret is detected.
  5. Remove the generic sensitive-information field or redefine it to contain only handling requirements and data classifications.
  6. Require confirmation that the receiving model or agent is authorized to access every included resource.
  7. Create output files with restrictive permissions and avoid predictable shared locations.
  8. Document retention limits and secure deletion procedures for transfer files, logs, and conversation records.
  9. Add a warning that model prompts and responses may be retained by providers or observability systems.
  10. Where cross-agent credential access is necessary, grant access through a scoped secret manager rather than copying secret material into context.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

This skill explicitly encourages transferring detailed memory, constraints, file paths, APIs, and even lists 凭据/credentials in its checklist, but it provides no clear warning or guardrails about sensitive-data handling. Because the core purpose of the skill is cross-model or cross-agent context handoff, missing disclosure and redaction guidance materially increases the chance of secret leakage to another model, agent, channel, or log.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger conditions are broad enough that ordinary conversation about switching models or agents could activate context-transfer behavior unintentionally. In this skill's context, accidental activation is risky because the generated transfer payload is designed to include conversation memory, project state, file paths, APIs, and potentially other sensitive operational details.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest text is written entirely in Chinese and presents the skill purpose only in that language, with no indication that users can choose another language or that the skill is intentionally limited to a Chinese-speaking environment. Under the policy, a language constraint should either be optional for the user or explicitly justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown template is entirely written in Chinese, including the title and all field labels, with no indication that language selection is optional or that the template is intended only for a Chinese-speaking context. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python file contains natural-language strings entirely in Chinese, including the module description, generated document labels, CLI help text, and completion message. Under the policy rules, forcing a specific language without opt-in can be a locale-policy violation unless the skill clearly documents that it is intended only for a Chinese-language context, which this file does not do.

Content

No source excerpt is available for this finding.