Back to skill

Security audit

Arquitecto Senior

Security checks for vulnerabilities and agentic risk

Overview

This skill coherently provides architecture review, decision guidance, and local project analysis without hidden network access, persistence, or credential handling.

Before installing, be comfortable with the skill reading the project directories you point it at. Use care with --output and --save paths because existing files can be replaced, and render generated Mermaid or PlantUML from untrusted repositories in a restricted renderer without sensitive network or filesystem access.

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

Warning
Location
scripts/architecture_diagram_generator.py:245
Finding

Unescaped Project Metadata Permits Mermaid and PlantUML Diagram Injection

Content
View full analysis
{file_count} files"]') # Mermaid external dependency labels if self.external_deps: lines.append('') lines.append(' subgraph External') for dep in list(self.external_deps)[:5]: safe_dep = self._safe_id(dep) lines.append(f' {safe_dep}(("{dep}"))') lines.append(' end') ``` ```python # PlantUML component labels for name, info in self.components.items(): file_count = info.get('files', 0) lines.append( f'component "{name}\\n({file_count} files)" as {self._safe_id(name)}' ) # PlantUML external dependency labels if self.external_deps: lines.append('') lines.append('package "External Dependencies" {') for dep in list(self.external_deps)[:5]: lines.append(f' [{dep}]') lines.append('}') ``` The identifier sanitizer does not protect the displayed labels: ```python def _safe_id(self, name: str) -> str: """Convert name to safe Mermaid ID.""" return re.sub(r'[^a-zA-Z0-9]', '_', name) ``` ### Technical Analysis The scanner obtains component names from top-level directory names and dependency names from project-controlled package manifests. These values are inserted directly into Mermaid and PlantUML source code. Although `_safe_id()` converts node identifiers to alphanumeric forms, the original `name` and `dep` values remain unescaped inside labels. Characters such as quotation marks, closing brackets, parentheses, newlines, and diagram directives can terminate the inte ...[truncated 2521 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The code is clearly architecture-diagram generation tooling: it reads a supplied project directory, scans folders and code files, heuristically classifies components into layers, detects some technologies and external dependencies, and emits diagrams or JSON. This aligns with only one portion of the description: creating architecture diagrams and some light dependency analysis. However, the declared purpose is much broader, claiming system architecture design, evaluation of patterns, choosing monolith vs microservices, selecting databases/tech stacks, writing ADRs, and scalability planning. None of those higher-level decision-making or artifact-generation capabilities are implemented. The primary behavior is therefore materially narrower than the declared description, so this should be flagged as a description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
86% confidence
Finding

The code partially overlaps with the description because it does evaluate existing project architecture patterns, dependencies, and scalability-related organization concerns. However, the declared purpose is broader and primarily design-oriented: creating architecture artifacts, choosing monolith vs. microservices, selecting databases/tech stacks, and producing ADRs/diagrams. None of those artifact-generation or decision-support capabilities are implemented here. Instead, the code's actual primary purpose is static analysis of an existing codebase's structure and imports to detect patterns, code smells, and layer violations, then print a report. That is a materially narrower and somewhat different capability set than the declared description, so this should be flagged as a mismatch.

Content

No source excerpt is available for this finding.

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/tech_decision_guide.md (reported line 240)May include surrounding context.

md
| Token Type | Suggested Lifetime |
|------------|-------------------|
| Access token | 15-60 minutes |
| Refresh token | 7-30 days |
| API key | No expiry (rotate quarterly) |
| Session | 24 hours - 7 days |

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The script writes JSON scan output directly to a path supplied via --output using write_text(), which can overwrite an existing file. Although the CLI help mentions that an output file may be used, there is no explicit warning or confirmation at the point of the file write about replacing existing content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The diagram output path is user-controlled and Path(args.output).write_text(diagram) will overwrite existing files silently. The script prints a success message after the write, but it does not disclose beforehand that an existing file may be modified or replaced.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

This code writes analysis output to a user-specified path via Path(args.save).write_text(...), which modifies local files. While the --save flag implies persistence, there is no confirmation prompt, overwrite notice, or explicit user-facing warning near the write operation about file creation or replacement.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.