Back to skill

Security audit

Feishu Fetch

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it says, but its default download path can be influenced by a remote attachment filename and may overwrite local files.

Review before installing. The Feishu credential and network behavior is expected, but use an explicit trusted --output path and avoid running this on messages from untrusted senders until the script sanitizes attachment filenames and prevents unintended overwrites.

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
scripts/feishu-fetch.sh:157
Finding

Path Traversal Through an Untrusted Attachment Filename Allows Arbitrary File Overwrite

Content
View full analysis
Remediation
View remediation
&2 exit 1 fi ``` 6. **Validate explicit `--output` paths separately.** If arbitrary output paths are required functionality, clearly treat them as trusted caller input and still refuse unintended overwrites unless an explicit option such as `--force` is supplied. 7. **Add regression tests** covering filenames such as: ```text ../../home/user/.bashrc ../target /path/to/file ..\target . .. ``` Tests should verify that the final canonical path remains inside the approved download directory and that existing files are not replace ...[truncated 17 chars]
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill invokes shell-based functionality and reads environment/runtime credentials, but it does not explicitly declare a restrictive tool scope such as allowed tools or permissions. In an agent ecosystem, that ambiguity can cause the runtime to grant broader execution capability than reviewers or orchestrators expect, increasing the risk of unintended command execution or access to sensitive local state.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

This JSON manifest is in scope for SQP-2 only if it were markdown, so the main check here is semantic disclosure embedded in the manifest description of behavior. The file states that credentials are read from an existing config and that the script downloads attachments using those credentials, but it provides no explicit warning to users that sensitive secrets are accessed at runtime and used for network requests.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

This shell script reads Feishu app credentials from a local config file and uses them to request an access token, which is then sent in subsequent HTTP requests. Although comments describe the behavior, there is no user-facing prompt, warning, or visible disclosure at runtime about accessing credentials and transmitting them to the remote API.

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/feishu-fetch.sh (reported line 105)May include surrounding context.

sh
# 拿 token(secret 通过 stdin 喂 curl,命令行不出现)
printf '{"app_id":"%s","app_secret":"%s"}' "$APP_ID" "$APP_SECRET" \
  | curl -fsS -X POST 'https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal' \
        -H 'Content-Type: application/json' \
        --data-binary @- \
  > "$TMPDIR/tok.json"

Static analysis

No suspicious patterns detected.