Back to skill

Security audit

CopilotKit React Best Practices

Security checks for vulnerabilities and agentic risk

Overview

This is a documentation-only CopilotKit React guidance skill with no executable behavior, though users should be careful not to over-share sensitive app context when following its examples.

Installers should treat this as CopilotKit-specific coding guidance. When applying its context-sharing examples, share only the minimum fields needed and avoid secrets, tokens, customer data, private identifiers, or unnecessary user-role details unless the application has clear consent and server-side controls.

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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Missing User Warnings

Medium
Confidence
87% confidence
Finding
The examples encourage exposing rich project, task, and user-role data to agent-readable context without any guidance on data minimization, redaction, consent, or sensitivity classification. In an agent-integration skill, this can normalize passing potentially sensitive application state to LLM backends or external runtimes, increasing the risk of privacy leaks, over-sharing, and unintended retention by downstream services.

Vague Triggers

Low
Confidence
89% confidence
Finding
The description says to use the skill when 'writing, reviewing, or refactoring React code' and that it 'triggers on tasks involving agent integration, tool rendering, shared state, or generative UI in React.' These conditions are fairly broad natural-language triggers and do not provide exclusion conditions or negative examples, which could lead to unintended invocation on ordinary React work that only loosely relates to agent features.

Missing User Warnings

Low
Confidence
89% confidence
Finding
The guidance encourages developers to provide richer agent context and includes examples with project and role data, but it does not warn that such context may be transmitted to an AI agent or model backend. In this skill's context, that omission can lead developers to include sensitive user, project, or authorization data unnecessarily, increasing the risk of data overexposure to the agent and downstream systems.

Static analysis

No suspicious patterns detected.