Back to skill

Security audit

Multica Sdd Workflow

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent Multica development workflow, but it can change remote project state, repository files, git history, and run repository-provided commands without enough confirmation or validation.

Review this skill before installing in shared or untrusted repositories. Use it only when you are comfortable with Multica project/issue changes, repository document edits, git commits, and execution of the configured test/typecheck commands. Treat .multica/squad.md as security-sensitive, verify all IDs and command fields, and require a human approval step before mutation or command execution.

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

Error
Location
issue-templates.md:96
Finding

Repository-Controlled Configuration Allows Arbitrary Command Execution

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:96-98 and issue-templates.md:96-98
Vulnerability Type: Command injection through unvalidated project configuration
Risk Level: High

Vulnerable Code

Configuration values are extracted directly from the repository-controlled .multica/squad.md file:

bash
WORK_DIR=$(grep '| work-dir'           .multica/squad.md | cut -d'`' -f2)
TEST_CMD=$(grep '| test-cmd'           .multica/squad.md | cut -d'`' -f2)
TYPECHECK_CMD=$(grep '| typecheck-cmd' .multica/squad.md | cut -d'`' -f2)

The generated Leader Kickoff instructions subsequently direct an agent to execute those values:

bash
# 1. Verify code
cd ${WORK_DIR}
${TEST_CMD}           # All tests pass
${TYPECHECK_CMD}      # TypeScript strict has no errors

Technical Analysis

The Skill treats values read from .multica/squad.md as trusted shell commands without validating them against an allowlist or requiring approval before execution. Because this configuration is part of the target repository, anyone able to prepare or modify that repository can control TEST_CMD, TYPECHECK_CMD, and WORK_DIR.

A command variable expanded as ${TEST_CMD} or ${TYPECHECK_CMD} can select an arbitrary executable and provide arguments. For example, an attacker can add a malicious executable or script to the repository and configure the test command to invoke it. The issue template then instructs the Leader agent to execute that command during its normal review loop.

WORK_DIR is also interpolated into cd without quoting or validation. Although this does not by itself cause shell control operators introduced through variable expansion to be reparsed, it permits unintended argument splitting and directory-selection behavior. It should therefore be considered part of the same unsafe configuration boundary.

Attack Path

  1. An attacker creates or modifies a project containing `.multica/squad.md ...[truncated 1422 chars]
Remediation
View remediation

Remediation Suggestions

  1. Treat every value read from .multica/squad.md as untrusted input.
  2. Replace free-form test-cmd and typecheck-cmd strings with predefined command identifiers mapped to trusted commands by the Skill or execution environment.
  3. If configurable commands are required, represent the executable and each argument as separate structured fields and reject shell interpreters, unexpected executables, redirection syntax, and control characters.
  4. Resolve the executable to a canonical path and enforce an explicit allowlist, such as approved package-manager binaries and known project scripts.
  5. Require explicit user confirmation showing the exact executable and arguments before running any repository-supplied command.
  6. Validate WORK_DIR using canonical path resolution, ensure it is within an approved workspace root, and reject nonexistent paths or paths that escape through symbolic links.
  7. Quote directory variables safely:
bash
cd -- "$WORK_DIR"
  1. Execute validation commands in a sandbox with minimal filesystem access, no unnecessary credentials, restricted environment variables, and disabled network access where possible.
  2. Document .multica/squad.md as a security-sensitive configuration file and require review of changes to its command fields.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (10)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases include broad everyday expressions such as '新增功能' and '功能更新', which can cause the skill to activate in contexts where the user did not intend a high-impact workflow. Because this skill performs issue creation, document mutation, and git commits, accidental activation can lead to unintended write operations across the repository and external Multica systems.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill describes multiple write-capable and externally visible actions—creating issues, updating project documents, modifying configuration/history, and committing to git—without an explicit risk disclosure or user confirmation requirement. In an agent setting, this increases the chance of silent state changes, audit noise, accidental disclosure to external systems, and repository modifications that the user did not knowingly authorize.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

L292 states a hard constraint of '零网络调用' (zero network calls). However, the documented workflow repeatedly uses multica commands to list agents, create projects/squads/issues, assign work, and monitor status (for example L105-L106, L115-L125, L149-L155, L203-L210), which necessarily interact with an external service. This is an active contradiction between the skill's stated constraints and its documented behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

This section includes concrete commands that change remote issue state and assign work, but provides no guardrails such as explicit human confirmation, scope validation, or target verification. In an agent skill context, operational instructions that perform state-changing actions can lead to unintended project changes, misassignment, or premature issue closure if followed automatically or with insufficient validation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file’s instructional text and all template examples are written in Chinese, including required section guidance and task fields, with no indication that users may choose another language. This can violate a language/locale policy when the skill effectively mandates a specific language without opt-in or documented regional scope.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

该文件整体以中文规定触发与执行流程,且没有说明可根据用户偏好切换语言或提供多语言选项。若组织要求尊重用户语言/区域选择,这种默认固定语言的说明可能构成语言策略违例。

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The document instructs writing generated content to /tmp/phase_desc.txt, which is a file write affecting the local system, but the markdown does not include any warning or disclosure about this side effect. Under the markdown-specific warning rule, filesystem modifications that may affect user data or system state should be disclosed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The '子 Issue' section instructs writing output to /tmp/task_desc.txt, but the document does not warn users that the action creates or overwrites a local file. This is a system-affecting behavior that should be disclosed in the skill description.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The 'Leader Kickoff Issue' section specifies writing content to /tmp/kickoff.txt but gives no warning that a local file will be created or overwritten. The markdown warning criterion calls for disclosure of behaviors that affect system state.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

This markdown file defines an activation condition for the review loop as ongoing and then says '每当有 Issue 进入 in_review 状态,执行', but it does not clearly scope which issues count beyond the surrounding phase context or provide negative examples. In environments with multiple issues transitioning to in_review, this could be interpreted too broadly and cause unintended invocation of the described workflow.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.