Back to skill

Security audit

Python 环境工具基础版

Security checks for vulnerabilities and agentic risk

Overview

The skill mainly matches a Python environment helper, but its trigger wording, privacy claims, and optional remote/API features are too inconsistent for automatic installation without review.

Review this skill before installing. It does not contain bundled malicious code, but allow it only in a workspace where you are comfortable with shell commands creating virtual environments, installing packages, and inspecting environment configuration. Avoid using callback URLs or API-key features unless you know exactly what will be sent, and do not rely on the local-only privacy claim without additional 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
Findings (1)

other

Warning
Location
SKILL.md:189
Finding

Unnecessary Enumeration of Credential-Related Environment Variables

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 189
Vulnerability Type: Environment reconnaissance
Risk Level: Medium

Complete Code Snippet:

bash
env | grep -E "API|KEY|TOKEN|SECRET" | sed "s/=.*/=***/"  # Linux/macOS

Technical Analysis

The command reads the process's entire environment and filters for variable names commonly associated with credentials, including API keys, tokens, and secrets. Although sed masks each value before displaying the result, the command still accesses the complete environment and reveals the names of sensitive variables.

This behavior exceeds the minimum access necessary for the Skill's stated purpose of creating Python virtual environments, installing dependencies, locating interpreters, and diagnosing Python configuration problems. Knowledge of credential-variable names can reveal which external services and authentication mechanisms are available to the Agent's process.

The issue is classified as other: Environment reconnaissance because it does not itself elevate privileges, expose credential values, or fit the listed attack categories precisely.

Attack Path

  1. A user asks the Skill to initialize or validate a Python project environment.
  2. The Agent follows the configuration-verification instructions in SKILL.md.
  3. The command invokes env, reading all environment variables available to the Agent process.
  4. Variables whose names contain API, KEY, TOKEN, or SECRET are selected.
  5. Their values are masked, but their names are returned in command output.
  6. A subsequent malicious instruction or compromised component could use this reconnaissance to target specific credentials.

Impact Assessment

The immediate scope is limited to the environment of the process executing the Skill. The command does not reveal credential values because its output masks them, and the reviewed Skill contains no instruction to transmit the results ...[truncated 313 chars]

Remediation
View remediation

Remediation Suggestions

Remove the broad environment-enumeration command. Validate only the exact environment variables required for a documented operation, and report only whether each variable is configured.

For example:

bash
if [ -n "${REQUIRED_APP_KEY:-}" ]; then
  echo "REQUIRED_APP_KEY is configured"
else
  echo "REQUIRED_APP_KEY is not configured"
fi

Additional hardening measures:

  1. Document every environment variable required by the Skill.
  2. Avoid invoking env, printenv, or equivalent commands without a narrowly defined need.
  3. Never include secret values in Agent output or logs.
  4. Do not cache configuration-check results containing sensitive metadata.
  5. Keep dependency installation isolated in a virtual environment and inspect project-controlled dependency metadata before installation.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (6)

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger condition says to use the skill for data analysis, reporting, statistics, and visualization, which is unrelated to Python environment setup. Overbroad and mismatched invocation criteria can cause agents to select this exec-capable skill in unintended contexts, increasing the chance of unnecessary shell execution or project modification.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The document claims all data remains local and is never uploaded, yet elsewhere states that some features require network access to external APIs. Contradictory privacy claims are dangerous because users may provide secrets, source code, or environment data under a false assumption that nothing leaves the machine.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The display name, summary, and the entire skill instructions are presented in Chinese, but there is no indication that the skill is region-specific or that users may choose another language. This can violate language/locale policy where skills should not impose a language without opt-in or documented justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill uses exec and includes commands that create virtual environments, install packages, and inspect environment variables, but it does not prominently warn that local shell commands may run and alter the project environment. Users and orchestration layers may therefore underestimate the modification risk and expose local state or secrets inadvertently.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill presents itself as a local Python environment helper, but its documented inputs include a callback URL and its guidance allows external API/network use. This scope expansion can cause users or invoking agents to trust the skill with local-only assumptions while it may transmit data or interact remotely, creating a misleading security boundary.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill is marketed as Python environment management, but the dependency section broadens execution scope to generic LLM APIs, curl, jq, Node.js, and external network usage. This mismatch can lead operators to approve a narrow local tool that actually enables wider data handling and command execution paths than expected.

Content

No source excerpt is available for this finding.