Back to skill

Security audit

Feishu File Sender

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says: it uploads a user-specified local file to Feishu and sends it to a configured recipient, with no hidden persistence or unrelated behavior found.

Install only if you intend to let the skill upload chosen local files to Feishu using your Feishu app credentials. Check the file path and recipient before invoking it, avoid sending secrets or private files accidentally, and prefer a tightly scoped Feishu app and receiver configuration.

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

Note
Location
scripts/send_file.sh:55
Finding

Unvalidated input interpolation into JSON bodies and URL query parameters

Content
View full analysis
Remediation
View remediation
&2 exit 1 ;; esac ``` 3. Let `curl` encode the query parameter: ```bash SEND_URL="https://open.feishu.cn/open-apis/im/v1/messages" SEND_PAYLOAD=$(jq -n \ --arg receive_id "$RECEIVER_ID" \ --arg file_key "$FILE_KEY" \ '{ receive_id: $receive_id, msg_type: "file", content: ({file_key: $file_key} | tojson) }') SEND_RESPONSE=$(curl -sS -X POST \ --get "$SEND_URL" \ --data-urlencode "receive_id_type=$RECEIVER_TYPE" \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ --data "$SEND_PAYLOAD") ``` If `--get` conflicts with the required POST semantics in the installed `curl` version, construct the encoded query value separately or use `curl --url-query` while explicitly retaining `-X POST`. 4. Validate receiver identifiers according to the selected receiver type, including reasonable length limits and expected formats. 5. Use `set -euo pipefail` and `curl --fail-with-body --show-error` to improve failure handling and prevent silent processing of transport errors. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/send_file.sh (reported line 50)May include surrounding context.

sh
echo "📂 Sending file: $FILE_NAME to $RECEIVER_ID ($RECEIVER_TYPE)"

# 1. Get Tenant Access Token
echo "🔑 Getting access token..."
TOKEN_RESPONSE=$(curl -s -X POST "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal" \
    -H "Content-Type: application/json" \

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/send_file.sh (reported line 51)May include surrounding context.

sh
echo "📂 Sending file: $FILE_NAME to $RECEIVER_ID ($RECEIVER_TYPE)"

# 1. Get Tenant Access Token
echo "🔑 Getting access token..."
TOKEN_RESPONSE=$(curl -s -X POST "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal" \
    -H "Content-Type: application/json" \
    -d "{\"app_id\": \"$FEISHU_APP_ID\", \"app_secret\": \"$FEISHU_APP_SECRET\"}")

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill invokes shell commands and performs network-capable actions, but it does not declare an explicit tool scope such as permissions or allowed-tools. This weakens defense-in-depth by making the skill's execution capabilities less transparent to users and enforcement systems, increasing the risk of unintended command execution or data transfer.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill handles local files and uploads them to an external Feishu service, but the description and usage text do not prominently warn users that local content leaves the host environment. This creates a meaningful risk of accidental exfiltration of sensitive files because a user may treat the action as local messaging automation rather than external data transfer.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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/send_file.sh (reported line 52)May include surrounding context.

sh
# 1. Get Tenant Access Token
echo "🔑 Getting access token..."
TOKEN_RESPONSE=$(curl -s -X POST "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal" \
    -H "Content-Type: application/json" \
    -d "{\"app_id\": \"$FEISHU_APP_ID\", \"app_secret\": \"$FEISHU_APP_SECRET\"}")

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

The script sends a user-supplied local file to an external Feishu recipient with no path restrictions, file allowlist, confirmation prompt, or policy enforcement. In an agent context, that creates a real exfiltration channel because any readable local file can be uploaded and delivered outside the local environment if the skill is invoked with a sensitive path or attacker-controlled receiver.

Content

Scanner excerpt · scripts/send_file.sh (reported line 84)May include surrounding context.

sh
# 3. Send message
echo "📨 Sending message..."
SEND_RESPONSE=$(curl -s -X POST "https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=$RECEIVER_TYPE" \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d "{

Static analysis

No suspicious patterns detected.