Back to skill

Security audit

M-Pesa Daraja

Security checks for vulnerabilities and agentic risk

Overview

This is a reference-only payment integration skill with explicit safeguards against live payment activity without approval.

Installers should treat this as payment-integration guidance only. Keep real Daraja credentials and customer data out of committed files, verify current Safaricom documentation before production work, and require explicit approval before any live payment, payout, reversal, or customer-facing request.

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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (1)

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 · references/api-endpoints.md (reported line 33)May include surrounding context.

md
- Use sandbox endpoints by default. Switch to production hostnames only when the user explicitly asks for production guidance, and ask before any live call.
- Re-check the official catalogue before writing production instructions. Endpoint versions can differ from older examples and SDK snippets.
- The May 2026 catalogue listed C2B register URL as \`v2\` and B2C payment request as \`v3\`; avoid hard-coding older \`v1\` B2C/C2B URLs unless maintaining legacy code.
- If the catalogue and a detailed documentation page disagree, report the disagreement and avoid claiming a migration is required without confirmation from Safaricom.

Static analysis

No suspicious patterns detected.