Back to skill

Security audit

Zoe飞书媒体发送

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it claims: sends a chosen local image to Feishu, but users should be careful with credentials and sensitive screenshots.

Install only if you intend to send local images through a Feishu app. Prefer environment variables or a secret manager over command-line secrets, review images for confidential content before sending, and confirm the destination chat or user every time.

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
scripts/feishu_image.py:132
Finding

Feishu Application Secret Exposed Through Command-Line Arguments

Content
View full analysis
3 else None cmd_secret = sys.argv[4] if len(sys.argv) > 4 else None send_image(image_path, chat_id, cmd_app_id, cmd_secret) ``` ### Technical Analysis The command-line interface permits the Feishu App ID and App Secret to be supplied as process arguments. Command-line arguments are not a secure secret-transport mechanism because they may be exposed through: - Shell command history - Process inspection utilities - Process-monitoring and endpoint-management software - Terminal session recordings - CI/CD build logs - Wrapper scripts and diagnostic output The project documentation also presents command-line credential submission as a supported configuration method. Although environment variables are recommended, retaining this alternative makes accidental credential disclosure likely. The exposed App Secret can be combined with the App ID to request a Feishu tenant access token. The effective privileges depend on the permissions granted to the associated Feishu application. ### Attack Path 1. A user invokes the script with the App ID and App Secret as positional arguments. 2. The command is retained in shell history, logs, terminal recordings, or the operating system's process metadata. 3. Another local user, monitoring agent, log reader, or compromised process obtains the arguments. 4. The attacker submits the recovered credentials to Feishu's tenant access-token endpoint. 5. The attacker uses the resulting token to exercise the Feishu application's granted permissions, potentially including image uploads and message delivery. ### Impact Assessment Successful exploitation exposes the Feishu application's identity and secret. An attacker could operate as that application within the scope of its ...[truncated 333 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
SKILL.md:17
Finding

Unpinned Third-Party Dependency Installation

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
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Tainted flow: 'data' from os.environ.get (line 56, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/feishu_image.py (reported line 61)May include surrounding context.

python
"app_secret": app_secret
        }
        
        response = requests.post(url, headers=headers, json=data)
        result = response.json()
        
        if result.get("code") != 0:

Tainted flow: 'data' from os.environ.get (line 56, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/feishu_image.py (reported line 84)May include surrounding context.

python
data = {"image_type": "message"}
        
        upload_url = f"{BASE_URL}/im/v1/images"
        response = requests.post(upload_url, files=files, data=data, headers=get_headers())
    
    result = response.json()
    print(f"[DEBUG] Upload image response: {result}")

Tainted flow: 'data' from os.environ.get (line 56, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/feishu_image.py (reported line 108)May include surrounding context.

python
"content": content
    }
    
    response = requests.post(send_url, headers=get_headers(), params=params, json=data)
    result = response.json()
    print(f"[DEBUG] Send image response: {result}")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill description explains that it sends local images to Feishu, but it does not prominently warn users at the point of use that local files will be uploaded to an external third-party service. In the context of screenshots and design files, this is risky because such files often contain sensitive internal information, and users may not realize the action causes off-device transmission.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger phrases like “发图片”, “发送图片”, and especially “发到飞书” are broad enough to match ordinary conversation and could cause the agent to invoke the skill unexpectedly. Because this skill transmits a local file to an external service, accidental activation increases the risk of unintended data exfiltration or privacy-impacting actions without sufficiently explicit user intent.

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/feishu_image.py (reported line 61)May include surrounding context.

python
"app_secret": app_secret
        }
        
        response = requests.post(url, headers=headers, json=data)
        result = response.json()
        
        if result.get("code") != 0: