Back to skill

Security audit

Prioritize uv

Security checks for vulnerabilities and agentic risk

Overview

This skill is openly about forcing uv usage for Python work, but its always-on scope and unpinned uvx execution make it broad enough to warrant Review before installation.

Install only if you intentionally want an always-on policy that routes Python commands through uv. Review projects with pinned, offline, hermetic, or non-uv workflows carefully, and prefer project-managed locked tools over unpinned uvx or @latest commands.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:2
Finding
Always-On Instructions Override the Agent's Command-Execution Policy<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 2-23 **Vulnerability Type**: `T01: Skill Instruction Hijacking` **Risk Level**: High ### Vulnerable Code Snippet ```yaml name: uv-priority description: Prioritize uv over pip for all Python package management and execution. When running ANY Python command or CLI tool (python, dbt, pytest, etc.), MUST wrap with uv run. license: MIT metadata: always: true emoji: "⚡" homepage: https://github.com/marcoracer/uv-priority os: [darwin, linux, windows] tags: [python, uv, pip, package-management, dbt] requires: anyBins: [uv] --- # UV Priority ## CRITICAL: Always Wrap Python Commands with uv or uvx This is a **mandatory skill** for all Python-related tasks. When the user mentions Python, dbt, or ANY Python package, you **MUST**: 1. **NEVER** run Python commands directly (python, python3, dbt, pytest, etc.) 2. **ALWAYS** wrap them with `uv run` or `uvx` 3. **NEVER** install packages with `pip install` 4. **ALWAYS** use `uv add` or `uv pip install` ``` ### Technical Analysis The skill declares itself as `always: true` and uses absolute directives such as “MUST,” “NEVER,” and “ONLY” to replace the agent's normal command-selection behavior. The scope is exceptionally broad: it applies whenever Python, dbt, or any Python package is mentioned, rather than only when the user explicitly requests dependency management through `uv`. This is instruction hijacking because loading the skill alters the agent's active execution policy regardless of the current task's requirements. In particular, it can cause an otherwise local command to be routed through `uv run` or `uvx`. Those tools may resolve environments, alter dependency state, or download and execute packages. The document also attempts to establish precedence through statements such as “mandatory skill” and “ONLY option.” No direct bypass of operating-system access controls is present. The risk arises from redirecting commands that ...[truncated 1800 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove `always: true`; activate the skill only when a user explicitly requests `uv`-based package management. 2. Replace absolute policy language such as “MUST,” “NEVER,” and “ONLY” with scoped recommendations. 3. State that explicit user instructions, repository policies, lock files, and existing project tooling take precedence. 4. Do not automatically translate every Python command. Ask for confirmation when translation may download packages, alter dependencies, or change the execution environment. 5. Separate package installation from command execution and require explicit authorization before running `uv add`, `uv pip install`, or `uvx`. 6. Add a non-escalation rule stating that the skill must not override sandboxing, network restrictions, approval requirements, or higher-priority safety instructions. 7. Limit the activation scope to repositories that already contain trusted `uv` configuration or whose users have explicitly opted into migration. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:43
Finding
Unpinned Third-Party Tools Are Downloaded and Executed Through uvx<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 43-56 **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium ### Vulnerable Code Snippet ```markdown ### Use `uvx` for External Tools `uvx` creates a temporary, isolated environment. Use it for tools that: - Analyze code without importing project modules (linters, formatters, type checkers) - Are one-off utilities not tied to your project - Shouldn't pollute your project's dependencies ```bash uvx ruff check . uvx black . uvx mypy . uvx isort . uvx ruff@latest check . ``` ``` The same unsafe pattern is repeated later in the file for tools such as `pytest`, `flake8`, `pylint`, `poetry`, `pipenv`, `cookiecutter`, `httpie`, `mycli`, and `pgcli`. ### Technical Analysis The documented commands instruct the agent to retrieve and execute third-party Python packages without requiring a lock file, hash verification, trusted index configuration, or an immutable version. Commands such as `uvx black .` resolve whichever version satisfies the package resolver at execution time. The explicit `uvx ruff@latest` example intentionally selects a mutable latest release. Temporary environment isolation does not make package execution safe. Package installation and startup can execute attacker-controlled Python code with the permissions of the invoking process. If a package account, release pipeline, package index, DNS/proxy path, or dependency is compromised, the resolved tool can behave maliciously even though the reviewed skill remains unchanged. No specific listed package was shown to be malicious in the reviewed files. The confirmed issue is the unsafe, unpinned supply-chain execution pattern. ### Attack Path 1. The always-active skill directs the agent to invoke an external tool through an unpinned `uvx` command. 2. `uvx` contacts the configured package source and resolves the package and its transitive dependencies at runtime. 3. An attacker compromises a package release, d ...[truncated 1335 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove examples using `@latest`. 2. Pin every remotely resolved tool to a reviewed, immutable version, for example `uvx ruff==<approved-version>`, subject to the exact syntax supported by the deployed `uv` version. 3. Prefer project-managed development dependencies recorded in a reviewed `pyproject.toml` and committed `uv.lock` file. 4. Require frozen or locked resolution so package versions cannot silently change between runs. 5. Use a trusted internal package mirror or an explicitly allowlisted package index rather than accepting arbitrary environment-configured indexes. 6. Verify package provenance and hashes where supported, and review transitive dependencies before approval. 7. Require user confirmation before the first download or execution of any external tool. 8. Run third-party tools in a sandbox with minimal filesystem access, no unnecessary secrets, and restricted outbound networking. 9. Avoid installing dependency managers or other high-impact tools through one-off, unpinned `uvx` commands. 10. Establish an update process in which version changes are reviewed and tested before lock files or approved versions are updated. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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
Findings (30)

Vague Triggers

High
Confidence
97% confidence
Finding
The skill is marked effectively mandatory and activates on virtually any Python-related mention, forcing command rewrites across a very broad set of tasks. Overbroad always-on behavior can override safer task-specific instructions, trigger unnecessary package/tool execution, and increase the attack surface when combined with dynamic `uv`/`uvx` usage.

Vague Triggers

High
Confidence
95% confidence
Finding
The 'Use when' section covers nearly every Python-related activity without clear boundaries, making the skill applicable far beyond a narrow package-management helper. In context, this amplifies the risk of unsafe or inappropriate command substitution across unrelated workflows and reduces operator control.

Rp1

Medium
Category
MCP Rug Pull
Confidence
65% confidence
Finding
uvx/uv tool run commands without ==version create a rug-pull risk.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
The document includes mandatory instructional content in Portuguese such as 'Ferramenta do projeto' and 'precisa importar seus módulos' without offering a language choice. This can violate language policy expectations because users are not given an opt-in or alternative language selection.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding
The skill instructs use of `uvx ruff check .` without pinning a version. `uvx` resolves and executes packages from a registry at runtime, so unpinned usage can lead to supply-chain drift, unexpected behavior changes, or execution of a compromised latest release.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding
This line recommends unpinned `uvx ruff`, which fetches and runs the current package version. That creates a supply-chain risk because behavior can change over time or a malicious upstream release could be executed implicitly.

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
Several example comments are written in Portuguese, including explanations for ruff, black, mypy, and isort usage. Because these examples are part of the core guidance and no language preference is offered, the skill implicitly imposes a locale on users.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding
The example uses `uvx black .` without constraining the version. Running unpinned remote CLI packages increases exposure to compromised upstream releases and non-reproducible execution.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding
The skill directs use of unpinned `uvx mypy .`, which permits runtime retrieval of whichever version is latest or otherwise resolved. That can introduce supply-chain compromise risk and inconsistent analysis results across environments.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding
This unpinned `uvx isort .` example can execute an unreviewed upstream version at runtime. For security-sensitive agent behavior, that creates unnecessary dependence on mutable external state.

Rp1

Medium
Category
MCP Rug Pull
Confidence
65% confidence
Finding
uvx/uv tool run commands without ==version create a rug-pull risk.

Natural-Language Policy Violations

Medium
Confidence
87% confidence
Finding
The examples for pytest, application execution, and dbt include Portuguese-only explanatory text as part of the main operational instructions. This creates a language/locale constraint without documenting user choice or a justified region-specific requirement.

Rp1

Medium
Category
MCP Rug Pull
Confidence
89% confidence
Finding
The guidance allows `uvx pytest` as a one-off without version pinning. That means the agent may fetch and execute whatever pytest release resolves at runtime, creating reproducibility and supply-chain integrity concerns.

Rp1

Medium
Category
MCP Rug Pull
Confidence
89% confidence
Finding
This line repeats unpinned `uvx pytest tests/` guidance. Executing unpinned external packages increases the chance of malicious or breaking upstream changes affecting agent behavior.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding
The example recommends unpinned `uvx black .`, which can pull a mutable version from the package source at execution time. This weakens supply-chain control and reproducibility.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding
This line promotes unpinned `uvx ruff check .`, exposing users to mutable upstream package resolution. Even for developer tools, agent instructions should avoid implicit execution of latest remote code.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding
Using `uvx mypy .` without a fixed version introduces external mutable dependency execution. That can lead to compromised tool execution or inconsistent output between runs.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
The table suggests `uvx pytest` without version pinning. Because `uvx` resolves packages dynamically, this opens a supply-chain and reproducibility risk in agent-directed command execution.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding
The `uvx black .` example is unpinned and therefore executes a mutable external package version. This is a standard supply-chain hardening issue rather than an overtly malicious instruction.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding
The unpinned `uvx ruff check .` guidance can cause the agent to fetch and run a changing upstream release. In an always-on skill, repeated use amplifies the risk surface.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding
This `uvx mypy .` example lacks version pinning, allowing arbitrary future versions to be executed. That is dangerous because security and behavior now depend on external package state at runtime.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
The skill recommends unpinned `uvx flake8`, which is a remote package execution path without immutability. This can expose users to malicious or simply incompatible upstream changes.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
The unpinned `uvx pylint` command executes a mutable external dependency. In a mandatory skill, that behavior could be applied widely across sessions, increasing the blast radius of an upstream compromise.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
This `uvx isort .` example is unpinned and therefore subject to supply-chain drift. The risk is not from `isort` specifically, but from instructing dynamic execution of remote packages without version control.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
The line recommends `uvx poetry` without version pinning. That can result in execution of a mutable upstream tool version, which is unsafe for deterministic and trustworthy agent behavior.

Static analysis

No suspicious patterns detected.