Back to skill

Security audit

huawei-cloud-outfit-generate

Security checks for vulnerabilities and agentic risk

Overview

This local outfit generator has proportionate file access and no cloud activity, credential use, or hidden background behavior.

No cloud account or credentials are needed. Treat outfits as demo suggestions and check fallback notices because requested style or season may be relaxed. Custom wardrobes should include all four categories. Choose --output carefully because it replaces an existing file.

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
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • 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 (4)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The primary purpose matches, but the description overstates the selection guarantees. pick_outfit explicitly relaxes constraints instead of requiring every selected item to match both the chosen style and season. load_wardrobe also accepts wardrobes lacking required categories, which can yield incomplete outfits. Fallbacks are generally disclosed in the output, but the declared description does not mention these exceptions. Custom wardrobe loading and optional file output are supporting features, not unrelated capabilities; the no-cloud and standard-library-only claims are supported by the supplied code.

Content

No source excerpt is available for this finding.

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: file_read, file_write, shell.

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.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · tests/test_generate_outfit.py (reported line 170)May include surrounding context.

python
class CliTests(unittest.TestCase):
    def _run(self, *args):
        return subprocess.run(
            [sys.executable, SCRIPT_PATH, *args],
            capture_output=True,
            text=True,

Forced style and season constraints are relaxed when no matching item exists.

Low
Category
Excessive Agency
Confidence
98% confidence
Finding

The manifest states that --style and --season force the requested attributes by filtering each category to matching items. At L182–L192, the code instead falls back to style-only matches, season-only matches, or the entire category, even when both options were explicitly supplied. Although the output reports relaxed filtering, the generated outfit can violate the manifest's promised constraints.

Content

No source excerpt is available for this finding.