Back to skill

Security audit

mermaid-architecture

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent Mermaid diagram/documentation helper, with the main residual risk being disclosed use of an unpinned Mermaid CLI through npx.

Install/use this for Mermaid architecture documentation only in repositories where the agent may read source and configuration files. Prefer a preinstalled or pinned Mermaid CLI instead of allowing automatic unpinned npx execution, and keep generated outputs constrained to docs/architecture/.

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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (46)

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

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

md
---
name: mermaid-architecture
description: Use when generating, documenting, or updating architecture diagrams, flowcharts, sequence, ER, class, or state diagrams using Mermaid in docs/architecture/.
license: MIT
metadata:
  version: 1.0.0
  visibility: public
  author: merged from SpillwaveSolutions/design-doc-mermaid
  url: https://github.com/afonsoft/skills
  homepage: https://github.com/SpillwaveSolutions/design-doc-mermaid
  sources: https://github.com/SpillwaveSolutions/design-doc-mermaid
---

# Mermaid Architecture Diagrams

Create structured, high-contrast, production-ready Mermaid architecture diagrams, workflows,

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| Database Design | `assets/database-design-template.md` | `docs/architecture/database-design.md` |

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · assets/api-design-template.md (reported line 76)May include surrounding context.

md
User2[GET /users/:id]
        User3[POST /users]
        User4[PUT /users/:id]
        User5[DELETE /users/:id]
    end

    subgraph "Resources"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · assets/api-design-template.md (reported line 84)May include surrounding context.

Res2[GET /resources/:id] Res3[POST /resources] Res4[PUT /resources/:id] Res5[DELETE /resources/:id] end

text

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 · assets/api-design-template.md (reported line 92)May include surrounding context.

POST /auth/login

Authenticate a user and receive access token.

Request:

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 · assets/system-design-template.md (reported line 538)May include surrounding context.

md
User->>Client: Login
    Client->>AuthServer: POST /oauth/token
    AuthServer->>AuthServer: Validate Credentials
    AuthServer-->>Client: Access Token + Refresh Token
    Client->>ResourceServer: GET /resource<br/>Authorization: Bearer {token}
    ResourceServer->>AuthServer: Validate Token
    AuthServer-->>ResourceServer: Token Valid + Claims

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · examples/fastapi/README.md (reported line 553)May include surrounding context.

LOG_LEVEL: str = "INFO"

text
class Config:
    env_file = ".env"
text

**Configuration Diagram:**

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · examples/java-webapp/README.md (reported line 222)May include surrounding context.

md
<display-name>Contact Management App</display-name>

    <!-- Context Parameters -->
    <context-param>
        <param-name>db.url</param-name>
        <param-value>jdbc:mysql://localhost:3306/contacts</param-value>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · examples/java-webapp/README.md (reported line 740)May include surrounding context.

xml
<web-app>
    <!-- Filter execution order defined by order in web.xml -->

    <!-- 1. Logging Filter - First to log all requests -->
    <filter>

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · examples/react/README.md (reported line 299)May include surrounding context.

md
Component->>Hook: handleDelete(id)

    Hook->>Redux: dispatch(deleteContact(id))
    Redux->>API: DELETE /api/contacts/:id

    API-->>Redux: 204 No Content
    Redux->>Redux: Remove from state

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/guides/code-to-diagram/README.md (reported line 433)May include surrounding context.

Example Mapping:

xml
<!-- web.xml -->
<servlet>
    <servlet-name>ContactServlet</servlet-name>
    <servlet-class>com.example.ContactServlet</servlet-class>

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 · references/guides/diagrams/sequence-diagrams.md (reported line 258)May include surrounding context.

md
AuthService->>+DB: SELECT * FROM users<br/>WHERE email = ?
    DB-->>-AuthService: User record
    AuthService->>AuthService: Verify password hash
    AuthService->>AuthService: Generate JWT access token<br/>(expires in 15 min)
    AuthService->>AuthService: Generate refresh token<br/>(expires in 7 days)
    AuthService->>+DB: INSERT INTO refresh_tokens<br/>(user_id, token, expires_at)
    DB-->>-AuthService: OK

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 · references/guides/diagrams/sequence-diagrams.md (reported line 285)May include surrounding context.

md
AuthService->>+DB: SELECT * FROM users<br/>WHERE email = ?
    DB-->>-AuthService: User record
    AuthService->>AuthService: Verify password hash
    AuthService->>AuthService: Generate JWT access token<br/>(expires in 15 min)
    AuthService->>AuthService: Generate refresh token<br/>(expires in 7 days)
    AuthService->>+DB: INSERT INTO refresh_tokens<br/>(user_id, token, expires_at)
    DB-->>-AuthService: OK

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/guides/diagrams/sequence-diagrams.md (reported line 742)May include surrounding context.

md
Client->>+API: GET /users/123
    API-->>-Client: ✅ HTTP 200 OK

    Client->>+API: DELETE /users/123
    API-->>-Client: ✅ HTTP 204 No Content

    Client->>+API: GET /users/999

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 · references/mermaid-diagram-guide.md (reported line 536)May include surrounding context.

sequenceDiagram Note over Client,Server: OAuth 2.0 Authentication Flow

text
Client->>AuthServer: Request Access Token
Note right of AuthServer: Validates client credentials
AuthServer-->>Client: Access Token (JWT)
text

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 · references/mermaid-diagram-guide.md (reported line 538)May include surrounding context.

sequenceDiagram Note over Client,Server: OAuth 2.0 Authentication Flow

text
Client->>AuthServer: Request Access Token
Note right of AuthServer: Validates client credentials
AuthServer-->>Client: Access Token (JWT)
text

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill clearly instructs the agent to read and write files and execute shell commands, but it declares no explicit tool scope or permission boundary. That creates an unnecessary trust gap where an orchestrator or agent may grant broader capabilities than intended, increasing the chance of unsafe file modification or command execution during normal use or prompt-injection scenarios.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

Referencing Mermaid CLI via unpinned npx package resolution allows the latest published package to be fetched at execution time with no version lock. This exposes the workflow to supply-chain compromise, malicious upstream releases, or unexpected breaking changes that could execute arbitrary code in the agent environment.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding

Using npx -y @mermaid-js/mermaid-cli performs automatic package installation and execution without a pinned version, which is especially risky in an agent context because it removes friction and trust checks. If the npm package or one of its dependencies is compromised, arbitrary code could run under the agent's privileges.

Content

No source excerpt is available for this finding.

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 · assets/api-design-template.md (reported line 32)May include surrounding context.

2.1 Base URL

text
Production:  https://api.example.com/v1
Staging:     https://api-staging.example.com/v1
Development: http://localhost:8000/v1

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 · assets/api-design-template.md (reported line 497)May include surrounding context.

2.1 Base URL

text
Production:  https://api.example.com/v1
Staging:     https://api-staging.example.com/v1
Development: http://localhost:8000/v1

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 · assets/api-design-template.md (reported line 522)May include surrounding context.

2.1 Base URL

text
Production:  https://api.example.com/v1
Staging:     https://api-staging.example.com/v1
Development: http://localhost:8000/v1

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 · assets/api-design-template.md (reported line 494)May include surrounding context.

15. API Client Examples

15.1 cURL

bash
curl -X POST https://api.example.com/v1/resources \

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 · assets/api-design-template.md (reported line 521)May include surrounding context.

md
"type": "type_a"
}

response = requests.post(
    "https://api.example.com/v1/resources",
    headers=headers,
    json=data

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 · assets/api-design-template.md (reported line 521)May include surrounding context.

md
"type": "type_a"
}

response = requests.post(
    "https://api.example.com/v1/resources",
    headers=headers,
    json=data