Back to skill

Security audit

Agnes画影

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly a normal Agnes AI image/video API helper, but it teaches the agent to persist an API key in shell startup files, which broadens credential exposure.

Review before installing if you are uncomfortable with an agent handling API keys or editing shell profile files. Prefer setting AGNES_API_KEY through a scoped secret manager or temporary environment variable, and do not let the agent append raw secrets to dotfiles unless you accept persistent credential exposure.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Rogue AgentSelf-Modification, Session Persistence
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (11)

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

YARA rule 'backdoor_persistence': Backdoor persistence with malicious payloads (shell commands, SSH key injection, hidden root users) [malware]

High
Category
YARA Match
Confidence
75% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · SKILL.md (reported line 56)May include surrounding context.

md
API Key

| 步骤 | 操作 |
|------|------|
| 1 | 打开 [platform.agnes-ai.com](https://platform.agnes-ai.com/),注册/登录 |
| 2 | 左侧导航 → **API Keys** → **Create API Key** |
| 3 | 复制生成的 `sk-` 开头密钥 |
| 4a | **侦测环境**:`uname -s` 判 OS,`echo $SHELL` 判 shell |
| 4b | **配置命令**(据上一步结果选择):<br>• Linux/macOS + **zsh** → `echo 'export AGNES_API_KEY="sk-..."' >> ~/.zshrc && source ~/.zshrc`<br>• Linux + **bash** → `echo 'export AGNES_API_KEY="sk-..."' >> ~/.bashrc && source ~/.bashrc`<br>• macOS + **bash** → `echo 'export AGNES_API_KEY="sk-..."' >> ~/.bash_profile && source ~/.bash_profile`<br>• Windows + **PowerShell** → `Add-Content -Path $PROFILE -Value '$env:AGNES_API_KEY="sk-..."'`<br>• 其他环境 → 询问用户其 shell 配置文件名 |
| 5 | 验证:`curl -s https://apihub.agnes-ai.com/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer $AGNES_API_KEY" -d

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · modules/01-api-reference.md (reported line 42)May include surrounding context.

bash
# 提交
TASK_ID=$(curl -s https://apihub.agnes-ai.com/v1/video/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $AGNES_API_KEY" \
  -d '{"model":"agnes-video-v2.0","prompt":"...","duration":5}' \

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · modules/01-api-reference.md (reported line 50)May include surrounding context.

md
# 轮询(间隔 10-15 秒)
while true; do
  resp=$(curl -s "https://apihub.agnes-ai.com/v1/video/generations/$TASK_ID" \
    -H "Authorization: Bearer $AGNES_API_KEY")
  status=$(echo "$resp" | python3 -c "import sys,json; print(json.load(sys.stdin).get('data',{}).get('status',''))")
  progress=$(echo "$resp" | python3 -c "import sys,json; print(json.load(sys.stdin).get('data',{}).get('progress',0))")

Session Persistence

Medium
Category
Rogue Agent
Confidence
82% confidence
Finding

The combination of Write and Bash permissions with instructions to modify shell profile files creates session persistence for a credential, causing the secret to remain available across future sessions and potentially accessible to later commands or skills. In context, persistence is not framed as malware, but it does increase blast radius if the environment is later compromised or the agent misuses its tooling.

Content

Scanner excerpt · SKILL.md (reported line 7)May include surrounding context.

md
description: 调用 Agnes AI 免费 API 生成图片/视频。从 AGNES_API_KEY 环境变量读取密钥。
allowed-tools:
  - Read
  - Write
  - Bash
  - AskUserQuestion
metadata:

Ssd 3

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill instructs users to persist an API key into shell profile files and immediately source them, which increases the chance of accidental secret exposure through shell history, shared profiles, backups, screenshots, or agent-mediated file access. Because the skill has Read/Write/Bash capabilities, normalizing persistent secret setup inside the workflow broadens the exposure surface beyond the immediate API call.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

The verification step sends an authenticated request containing the user's bearer token to an external third-party service. Although that is the intended API usage, it is still a real external transmission of a secret-backed request and becomes more dangerous in an agent skill because users may be induced to run it before fully understanding data handling or trust boundaries.

Content

Scanner excerpt · SKILL.md (reported line 57)May include surrounding context.

md
| 3 | 复制生成的 `sk-` 开头密钥 |
| 4a | **侦测环境**:`uname -s` 判 OS,`echo $SHELL` 判 shell |
| 4b | **配置命令**(据上一步结果选择):<br>• Linux/macOS + **zsh** → `echo 'export AGNES_API_KEY="sk-..."' >> ~/.zshrc && source ~/.zshrc`<br>• Linux + **bash** → `echo 'export AGNES_API_KEY="sk-..."' >> ~/.bashrc && source ~/.bashrc`<br>• macOS + **bash** → `echo 'export AGNES_API_KEY="sk-..."' >> ~/.bash_profile && source ~/.bash_profile`<br>• Windows + **PowerShell** → `Add-Content -Path $PROFILE -Value '$env:AGNES_API_KEY="sk-..."'`<br>• 其他环境 → 询问用户其 shell 配置文件名 |
| 5 | 验证:`curl -s https://apihub.agnes-ai.com/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer $AGNES_API_KEY" -d '{"model":"agnes-2.0-flash","messages":[{"role":"user","content":"hi"}]}'`,返回含 `choices` 即成功 |

---

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · modules/01-api-reference.md (reported line 3)May include surrounding context.

API 参考

通用 curl 骨架

bash
curl -s https://apihub.agnes-ai.com/v1/{ENDPOINT} \

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · modules/01-api-reference.md (reported line 42)May include surrounding context.

bash
# 提交
TASK_ID=$(curl -s https://apihub.agnes-ai.com/v1/video/generations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $AGNES_API_KEY" \
  -d '{"model":"agnes-video-v2.0","prompt":"...","duration":5}' \

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The natural-language content in this file forces a single language presentation and does not mention any user-selectable language option or justified region-specific scope. Under the policy, language-specific instructions can be a violation when the skill does not provide opt-in or document the constraint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This markdown file includes multiple curl examples that send an Authorization header using $AGNES_API_KEY to a remote API service. While the examples are normal for API usage, the documentation does not include any warning about keeping the API key secret, avoiding shell history leakage, or protecting credentials when running the commands.

Content

No source excerpt is available for this finding.