Back to skill

Security audit

Anygen Diagram

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a disclosed diagram-generation/API integration guide, but it includes unsafe administrator-run troubleshooting guidance for external command-line tooling.

Review this skill before installing if you will run its commands. Use a normal user account, keep outputs in user-writable directories, do not rerun external AnyGen or Python commands as administrator just to fix permissions, and only send content/API keys to AnyGen if you trust that service and have approval to process the documents there.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:330
Finding

Unsafe Recommendation to Run with Administrator Privileges

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:330
Vulnerability Type: Unnecessary privilege escalation
Risk Level: Medium

Vulnerable Code Snippet

markdown
| Permission denied | The current user lacks read/write permissions | Check file permissions and run as administrator |

The original instruction at line 330 recommends running as administrator when the current user lacks file read/write permissions.

Technical Analysis

The troubleshooting guidance responds to an ordinary filesystem permission error by recommending administrator-level execution. Diagram generation and file-output operations do not inherently require elevated privileges. The instruction does not first require the user to identify the affected path, select a user-writable output directory, correct narrowly scoped ownership or permissions, or validate the command and its dependencies.

The package contains only SKILL.md; it does not include the helper scripts repeatedly referenced by its examples. It also relies on an external CLI and workflow dependency. Consequently, elevating execution would extend administrator privileges to components not available for inspection in this package. This violates the principle of least privilege and unnecessarily magnifies the consequences of a compromised dependency, unsafe command, malicious input, or incorrect output path.

Attack Path

  1. A user invokes the external AnyGen CLI or one of the referenced helper workflows.
  2. The operation encounters a read/write permission error.
  3. Following the troubleshooting instruction at SKILL.md:330, the user reruns the operation with administrator privileges.
  4. A compromised external component, unsafe command path, or attacker-controlled input is processed in the elevated context.
  5. The invoked component can access or modify resources available to the administrator rather than only those available to the original user.

This document does not itself provide an exploit paylo ...[truncated 832 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the recommendation to run the tool as administrator.
  2. Replace it with least-privilege troubleshooting steps:
    • Identify the exact file or directory causing the error.
    • Confirm that the configured input and output paths are correct.
    • Select an output directory owned by and writable to the current user.
    • Inspect ownership and permissions before making changes.
    • Grant only the minimum required permission to the specific path.
    • Avoid recursive or system-wide permission changes.
  3. Require explicit justification and user confirmation before any exceptional elevated operation.
  4. Do not elevate unspecified scripts, external CLIs, or dependencies that have not been reviewed and integrity-verified.
  5. Document trusted installation sources, pinned versions, and integrity-verification procedures for the required AnyGen CLI and workflow dependency.
  6. Use sandboxing or a restricted service account for diagram-generation processes, especially when processing untrusted descriptions or documents.

A safer replacement would be:

markdown
| Permission denied | The current user lacks access to the selected path | Verify the path and ownership, select a user-writable output directory, or grant the current user only the minimum required permission to that specific path; do not run the tool as administrator |
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill description explicitly says '支持中文交互' ('supports Chinese interaction'), and the flagged issue is that it enforces a language preference without clear user choice or opt-in. This is not a code-execution flaw, but it can constrain user intent, reduce transparency, and cause agents to ignore user language preferences, which is a policy and UX safety issue.

Content

No source excerpt is available for this finding.

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 · SKILL.md (reported line 131)May include surrounding context.

md
--output ./diagrams/user_flow.svg
# ...
# API 集成到文档系统
curl -X POST https://api.anygen.io/v1/diagrams \
  -H "Authorization: Bearer $ANYGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · SKILL.md (reported line 131)May include surrounding context.

md
--output ./diagrams/user_flow.svg
# ...
# API 集成到文档系统
curl -X POST https://api.anygen.io/v1/diagrams \
  -H "Authorization: Bearer $ANYGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{

Static analysis

No suspicious patterns detected.