Back to skill

Security audit

Multi-Agent Governance

Security checks for vulnerabilities and agentic risk

Overview

The skill is not malicious, but its governance checks can fail open in ways that could let agent workflows bypass intended role boundaries.

Install only if you will treat this as advisory or review/fix the enforcement logic first. Do not rely on its allowed/success outputs as authoritative security decisions until action validation is fail-closed and handoff identities are canonicalized or rejected on mismatch. Use user-first conflict resolution for sensitive workflows and keep configuration file paths explicit and trusted.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (2)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
src/validators.py:120
Finding

Role authorization fails open for actions outside declared responsibilities

Content
View full analysis

Vulnerability Details

File Location: src/validators.py:120-132
Vulnerability Type: Fail-open authorization and insufficient role-boundary enforcement
Risk Level: Medium

Vulnerable Code

python
      action_allowed = False
      for responsibility in role.responsibilities:
          if self._action_matches(action, responsibility):
              action_allowed = True
              break

      if not action_allowed and len(violations) == 0:
          recommendations.append(f"Action '{action}' not explicitly in responsibilities. Consider adding it.")

      allowed = len(violations) == 0

      return BoundaryCheckResult(
          allowed=allowed,
          violations=violations,
          recommendations=recommendations
      )

Technical Analysis

The authorization result is determined exclusively by whether an action matches an entry in the role's must_not list. Although the method checks whether the action matches a declared responsibility, failure to find a match only produces a recommendation. The action is still returned as allowed=True.

Consequently, the responsibility list does not operate as an allowlist. Any action not anticipated by the deny list is permitted, including sensitive or cross-role actions expressed using wording that does not match a prohibited phrase. This is a fail-open design that conflicts with the Skill's stated purpose of defining and validating role boundaries.

The issue is amplified by _action_matches() using heuristic natural-language matching. An attacker may rephrase a prohibited operation to avoid sharing the keywords needed for a match.

Attack Path

  1. Identify a registered agent and inspect or infer its responsibilities and must_not restrictions.
  2. Select an operation outside the agent's declared responsibilities.
  3. Phrase the operation so it does not exactly or heuristically match a must_not entry.
  4. Submit the action ...[truncated 839 chars]
Remediation
View remediation

Remediation Suggestions

  1. Use fail-closed authorization: return allowed=False when an action does not match a declared responsibility.
  2. Separate advisory and enforcement behavior through an explicit configuration option, with enforcement mode as the secure default.
  3. Replace natural-language authorization rules with structured action identifiers or enumerated capabilities.
  4. Treat must_not entries as an additional denial layer rather than the sole effective access-control mechanism.
  5. Validate role configuration at registration time and reject empty or malformed authorization lists where enforcement is required.
  6. Add tests confirming that unknown actions, rephrased prohibited actions, and cross-role actions are denied.
  7. A secure decision pattern would be:
python
if violations:
    allowed = False
elif action_allowed:
    allowed = True
else:
    allowed = False
    violations.append(
        f"Action '{action}' is outside the declared responsibilities for '{agent}'"
    )

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
src/core.py:141
Finding

Caller-controlled handoff fields can override validated agent identities

Content
View full analysis

Vulnerability Details

File Location: src/core.py:141-164
Vulnerability Type: Handoff identity spoofing and audit-record integrity failure
Risk Level: Medium

Vulnerable Code

python
  def enforce_handoff(
      self,
      from_agent: str,
      to_agent: str,
      data: Dict[str, Any],
      template_name: Optional[str] = None
  ) -> HandoffResult:
      """Enforce a handoff between agents"""
      validation_result = self.validate_handoff(data, template_name)

      success = validation_result.valid
      if not success and self.template.missing_input_action == MissingInputAction.BLOCK_TRANSITION:
          success = False

      handoff_data = {
          "from": from_agent,
          "to": to_agent,
          **data
      }

      return HandoffResult(
          success=success,
          handoff_data=handoff_data,
          validation_result=validation_result,
          next_phase=data.get("next_phase"),
          next_gate=data.get("next_gate")
      )

The public caller validates only the separate arguments before invoking this method:

python
      if not self.registry.get_role(from_agent):
          return HandoffResult(
              success=False,
              handoff_data=handoff_data,
              validation_result=ValidationResult(
                  valid=False,
                  errors=[f"Agent '{from_agent}' not registered"]
              )
          )

      if not self.registry.get_role(to_agent):
          return HandoffResult(
              success=False,
              handoff_data=handoff_data,
              validation_result=ValidationResult(
                  valid=False,
                  errors=[f"Agent '{to_agent}' not registered"]
              )
          )

      result = self.handoff_manager.enforce_handoff(from_agent, to_agent, handoff_data)

Technical Analysis

The separately supplie ...[truncated 2100 chars]

Remediation
View remediation

Remediation Suggestions

  1. Construct the canonical payload with validated identities last so caller-controlled values cannot override them:
python
handoff_data = {
    **data,
    "from": from_agent,
    "to": to_agent,
}
  1. Prefer rejecting inconsistent input rather than silently replacing it:
python
if data.get("from") != from_agent or data.get("to") != to_agent:
    return HandoffResult(
        success=False,
        handoff_data=data,
        validation_result=ValidationResult(
            valid=False,
            errors=["Handoff identity fields do not match validated agents"]
        )
    )
  1. Build the canonical payload before validation and validate that canonical object.
  2. Ensure reporting and downstream processing use only canonical, validated identities.
  3. Consider removing duplicate identity sources from the API so each identity has one authoritative representation.
  4. Add regression tests for mismatched, unregistered, privileged, missing, and duplicate from and to values.
  5. If handoffs cross a trust boundary, authenticate the caller and cryptographically bind the identities to the handoff record.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (10)

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'file_read' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'file_write' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · src/templates.py (reported line 181)May include surrounding context.

python
"Record documentation impact decisions"
                ],
                "must_not": [
                    "Modify docs without verification agent approval",
                    "Skip documentation impact recording"
                ],
                "outputs": [

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · src/templates.py (reported line 243)May include surrounding context.

python
"Update task status"
                ],
                "must_not": [
                    "Expand scope without approval",
                    "Self-approve review"
                ],
                "outputs": [

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file documents save_configuration() and load_configuration() as file operations, but it provides no user-facing warning about their impact on local files or configuration data. Under the markdown-specific SQP-2 criteria, documentation should disclose behaviors that can affect user data or system state.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The method saves role data to disk in YAML or JSON format, which is a safety-relevant file write. In this code, there is no confirmation prompt, logging, or other user-visible notice that the write is occurring.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code writes governance configuration data to YAML or JSON files, which can modify user data on disk. Although the method has an internal docstring, there is no confirmation prompt, logging, or other visible user-facing disclosure in this file about the write operation.

Content

No source excerpt is available for this finding.

Scope Creep

Low
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

Scanner excerpt · src/templates.py (reported line 84)May include surrounding context.

python
"Record implementation notes when needed"
                ],
                "must_not": [
                    "Expand scope without returning to requirement or design",
                    "Self-approve final code review, verification, or archive readiness"
                ],
                "outputs": [

Scope Creep

Low
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

Scanner excerpt · src/templates.py (reported line 243)May include surrounding context.

python
"Record implementation notes when needed"
                ],
                "must_not": [
                    "Expand scope without returning to requirement or design",
                    "Self-approve final code review, verification, or archive readiness"
                ],
                "outputs": [

Scope Creep

Low
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

Scanner excerpt · tests/test_core.py (reported line 225)May include surrounding context.

python
"Record implementation notes when needed"
                ],
                "must_not": [
                    "Expand scope without returning to requirement or design",
                    "Self-approve final code review, verification, or archive readiness"
                ],
                "outputs": [