Back to skill

Security audit

Feishu Doc Transfer

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it says, but it can immediately transfer Feishu document ownership using a tenant token and gives too little protection against mistakes or token exposure.

Install only if you are comfortable with a tool that can reassign Feishu document ownership. Use a least-privilege Feishu app, avoid putting real tenant tokens in command history or shared transcripts, verify the file token and target owner carefully, and prefer adding a confirmation or dry-run workflow before operational use.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:15
Finding

Tenant Bearer Token Exposed Through Command-Line Arguments

Content
View full analysis
\ \ \ \ [file_type] ``` The script retrieves the credential directly from its command-line arguments: ```python tenant_token = sys.argv[1] file_token = sys.argv[2] owner_id = sys.argv[3] member_type = sys.argv[4] file_type = sys.argv[5] if len(sys.argv) > 5 else "doc" ``` ### Technical Analysis The Skill instructs users and agents to place a Feishu tenant access token directly in a command string. The script then reads that bearer token from `sys.argv`. Command-line arguments are not an appropriate secret-delivery mechanism. Depending on the operating environment, the token can be exposed through: - Shell history files. - Agent command transcripts and execution logs. - Process monitoring and telemetry. - Process argument inspection by sufficiently privileged local users. - Debugging, audit, or job-scheduling systems that record full commands. The token is legitimately transmitted over HTTPS to the official Feishu endpoint in the `Authorization` header. That network transmission is necessary for the declared ownership-transfer functionality and no unrelated network destination was identified. The vulnerability is the local handling of the token before transmission, not the Feishu API request itself. ### Attack Path 1. A user or agent follows the documented invocation and places a valid tenant token in the command line. 2. The complete command is retained in shell history, agent logs, telemetry, or process metadata. 3. An attacker with access to one of those sources extracts the bearer token. 4. Before the token expires, the attacker submits authenticated requests to Feishu ...[truncated 871 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:69
Finding

Third-Party Dependency Installed Without Version or Integrity Pinning

Content
View full analysis
Remediation
View remediation
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)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill invokes a Python script that performs API calls to Feishu and therefore has network-capable behavior, but the manifest does not declare any tool scope such as permissions or allowed-tools. This weakens policy enforcement and user visibility, making it easier for a skill that changes document ownership to operate without explicit capability disclosure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill performs ownership transfer of documents, which is a privileged and potentially disruptive action affecting control, access, and accountability, yet the description lacks a clear warning about sensitivity or possible irreversibility. In this context, a user may trigger the operation without fully understanding that it can reassign control of important enterprise content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The instructions tell users to obtain and use tenant tokens and app credentials but do not clearly warn that these are sensitive secrets that must not be exposed in command history, logs, chat transcripts, or shared examples. Because these credentials can authorize document-management actions across a tenant, mishandling them could enable unauthorized ownership changes or broader API misuse.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/transfer_owner.py (reported line 45)May include surrounding context.

python
}
    
    try:
        resp = requests.post(url, json=data, headers=headers, timeout=10)
        result = resp.json()
        
        if resp.status_code == 200 and result.get("code") == 0:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script performs a real ownership-transfer action against the Feishu API immediately from CLI input, but provides no confirmation prompt, dry-run mode, or explicit destructive-action warning. In the context of a skill intended to transfer document ownership, this makes accidental misuse more likely and could cause loss of control, mistaken reassignment, or unauthorized administrative changes if run with a valid tenant token.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The file's docstrings and command-line usage/output strings are entirely in Chinese, which imposes a specific language on users without any indication of locale scope or an option to choose another language. Under the policy, language constraints should be opt-in or clearly justified as region-specific.

Content

No source excerpt is available for this finding.