Back to skill

Security audit

AWS架构图生成工具

Security checks for vulnerabilities and agentic risk

Overview

This skill is labeled as an AWS diagram generator, but its artifacts require and persist a Xiaobenyang API key and route diagram requests to an external Xiaobenyang service with inconsistent leftover Gaokao references.

Review carefully before installing. Only use this skill if you intend to share an XBY API key and diagram request content with the Xiaobenyang service, and avoid using it in workspaces containing sensitive .env files or secrets unless the publisher clarifies the service identity, storage behavior, and remote data flow.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (20)

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill advertises and documents capabilities that include reading environment/config values, persisting data to disk, and calling external services, yet no declared permissions are present. This creates a transparency and consent gap: users and hosting platforms cannot accurately assess that the skill can access secrets, write files, and communicate over the network before execution.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The documented behavior materially exceeds and diverges from the declared purpose: the skill is presented as an AWS architecture diagram generator, but it also collects and stores an API key, supports many non-AWS diagram types, performs icon discovery, and appears to act as a generic remote client. This mismatch undermines informed consent and can conceal sensitive behaviors such as credential handling and outbound data transfer.

Description-Behavior Mismatch

High
Confidence
94% confidence
Finding
The skill introduces mandatory collection and storage of an API key for an external service that is not clearly justified by the advertised architecture-diagram purpose. Requesting a credential and persisting it to .env increases the risk of credential exposure, misuse, and unnecessary third-party data flow under a misleading pretext.

Intent-Code Divergence

High
Confidence
97% confidence
Finding
The documentation contains unrelated legacy references to gaokao/school-search code and example function calls, indicating copy-paste drift and poor integrity of the skill specification. Such inconsistencies are dangerous because they make it harder to audit the real behavior and increase the chance that hidden or unintended functionality remains exposed.

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The configuration targets an unrelated '小笨羊高考' service and uses different prefixes, endpoints, and identifiers than the advertised AWS architecture diagram skill. In a skill context, this mismatch is dangerous because it can silently route user configuration and secrets to an unintended external service, indicating possible repurposed or substituted code.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
This code persists and retrieves an unrelated XBY API key rather than configuration for the stated AWS diagram workflow. That creates a real risk of collecting, storing, and using credentials for a different backend than users expect, which can lead to unauthorized data transfer or credential misuse.

Intent-Code Divergence

Medium
Confidence
95% confidence
Finding
The docstring explicitly identifies the module as configuration for a different skill, contradicting the manifest's AWS architecture diagram purpose. Such identity mismatches are a supply-chain red flag because they suggest copied or swapped code and reduce user ability to understand where their data and credentials are going.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The documentation instructs the agent to solicit an API key from the user and store it, but provides no warning about credential sensitivity, persistence, retention, or where the key will be transmitted. This can normalize unsafe secret handling and lead users to disclose credentials into insecure channels or leave them stored in workspace files.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The function writes the API key into a local .env file and process environment without any warning, confirmation, or guidance on storage risks. In shared environments such as Codespaces, this increases the chance of accidental persistence, exposure through workspace files, or unintended reuse by other components.

Ssd 3

Medium
Confidence
90% confidence
Finding
The instruction to directly present raw tool output to the user creates a data-leak risk because raw responses may contain secrets, tokens, internal paths, stack traces, or echoed user-provided API keys. In this skill context, that risk is heightened because the workflow explicitly collects a credential earlier and uses remote APIs whose responses may include sensitive debugging or request data.

Credential Access

High
Category
Privilege Escalation
Content
default_year: int = 2025

    def model_post_init(self, __context):
        # 强制从 .env 文件读取 XBY_APIKEY
        env_path = Path(".env")
        if env_path.exists():
            content = env_path.read_text(encoding="utf-8")
Confidence
94% confidence
Finding
The code forcibly reads a specific XBY_APIKEY from .env regardless of the declared env_prefix and skill purpose. In this context, that is dangerous because it bypasses expected configuration scoping and targets a credential for an unrelated service, increasing the chance of covert credential collection or misuse.

Credential Access

High
Category
Privilege Escalation
Content
def model_post_init(self, __context):
        # 强制从 .env 文件读取 XBY_APIKEY
        env_path = Path(".env")
        if env_path.exists():
            content = env_path.read_text(encoding="utf-8")
            for line in content.splitlines():
Confidence
94% confidence
Finding
Opening and parsing the .env file to extract XBY_APIKEY is an explicit credential access path aimed at an unrelated service. Because the skill claims to generate AWS architecture diagrams, this hidden credential lookup materially increases risk and undermines user trust about what secrets are being consumed.

Credential Access

High
Category
Privilege Escalation
Content
def save_api_key_to_env(api_key: str) -> bool:
    """将API key保存到.env文件"""
    try:
        env_path = Path(".env")
        lines = []
        if env_path.exists():
            lines = env_path.read_text(encoding="utf-8").splitlines()
Confidence
92% confidence
Finding
The function is explicitly designed to save an API key into a plaintext .env file. In a shared development environment, plaintext secret persistence increases exposure risk through file leakage, backups, accidental commits, or access by other tooling.

Credential Access

High
Category
Privilege Escalation
Content
def set_api_key(api_key: str) -> bool:
    """设置API key并持久化到.env"""
    if not api_key or not api_key.strip():
        return False
    api_key = api_key.strip()
Confidence
91% confidence
Finding
This function advertises persistent storage of an API key to .env, reinforcing a workflow that stores secrets locally without clear safeguards. In the context of a mislabeled skill with unrelated service identifiers, this increases the likelihood that users will persist credentials they did not intend to give this tool.

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests>=2.31.0
pydantic>=2.7.0
pydantic-settings>=2.2.0
python-dotenv>=1.0.1
Confidence
97% confidence
Finding
The dependency is specified with a lower-bound only (`requests>=2.31.0`), which permits future versions to be installed without review and can also allow environment-dependent resolution differences. This increases supply-chain and reproducibility risk, especially because the minimum version referenced is also associated with published advisories.

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests>=2.31.0
pydantic>=2.7.0
pydantic-settings>=2.2.0
python-dotenv>=1.0.1
Confidence
94% confidence
Finding
`pydantic>=2.7.0` is unpinned, so builds may resolve to different versions over time, reducing reproducibility and weakening change control over third-party code. While not an immediate exploit by itself, this is a genuine supply-chain hygiene weakness.

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests>=2.31.0
pydantic>=2.7.0
pydantic-settings>=2.2.0
python-dotenv>=1.0.1
Confidence
94% confidence
Finding
`pydantic-settings>=2.2.0` allows uncontrolled future upgrades, which can introduce vulnerable or breaking releases into deployments. This is a real but low-severity dependency management issue rather than direct malicious behavior.

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests>=2.31.0
pydantic>=2.7.0
pydantic-settings>=2.2.0
python-dotenv>=1.0.1
Confidence
97% confidence
Finding
`python-dotenv>=1.0.1` is unpinned and the minimum allowed version is associated with a published advisory, so environments may install a vulnerable release. In a Codespaces/GitHub automation context, environment-file tooling can affect local secrets handling, making version control more important.

Known Vulnerable Dependency: requests==2.31.0 — 3 advisory(ies): CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi); CVE-2026-25645 (Requests has Insecure Temp File Reuse in its extract_zipped_paths() utility func)

Low
Category
Supply Chain
Confidence
95% confidence
Finding
The requirement permits installation of `requests` 2.31.0, and that version is associated with advisories including credential leakage via malicious URLs and session verification issues. In a tool that may interact with external services from a developer environment, flaws in HTTP handling can expose credentials or weaken transport security, making this more than a theoretical concern.

Known Vulnerable Dependency: python-dotenv==1.0.1 — 1 advisory(ies): CVE-2026-28684 (python-dotenv: Symlink following in set_key allows arbitrary file overwrite via )

Low
Category
Supply Chain
Confidence
92% confidence
Finding
The requirement permits installation of `python-dotenv` 1.0.1, which is flagged for symlink-following behavior in `set_key` that can enable arbitrary file overwrite under certain conditions. Because this skill operates in a developer/cloud workspace context where environment files and secrets are commonly managed, unsafe dotenv file operations could impact sensitive configuration or credentials.

Static analysis

No suspicious patterns detected.