Back to skill

Security audit

Pydantic Ai Agent Creation

Security checks for vulnerabilities and agentic risk

Overview

This is a documentation-only skill for building PydanticAI agents, with a privacy caveat around sending prompts and user context to model providers.

Install is reasonable for learning PydanticAI patterns. Before using its examples in real projects, review what your chosen model provider receives, avoid putting secrets or direct user identifiers in prompts or dynamic instructions, and check provider logging, retention, and compliance settings.

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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill repeatedly demonstrates configuring real third-party LLM providers but never warns that prompts, outputs, and potentially attached dependency data may be transmitted to external services. In a skill specifically intended to help users build production AI agents, this omission can cause developers to unknowingly expose sensitive business or personal data during testing or deployment.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The dynamic-instructions example injects ctx.deps.user_id directly into model-visible context, which teaches a pattern of forwarding user identifiers to the LLM without discussing necessity, minimization, or privacy implications. Even if a user ID seems harmless, identifiers can become personal data or enable correlation across logs and provider-side retention systems.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.