Back to skill

Security audit

Data Analysis

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent data-analysis guidance skill with no executable payload, persistence, hidden commands, or unexpected data handling.

Before installing optional Python packages, use a virtual environment and prefer pinned, reviewed dependency versions. Be careful with sensitive datasets or database credentials because the skill is meant to analyze user-provided data, even though the artifact itself does not show hidden collection or persistence.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (1)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:144
Finding

Unpinned Third-Party Python Dependencies

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 144–148
Vulnerability Type: Unpinned and integrity-unverified third-party dependencies
Risk Level: Medium

Vulnerable Code

markdown
### Python 核心依赖
```bash
pip install pandas numpy scipy matplotlib seaborn
text

### Technical Analysis

The documented installation command resolves mutable package versions from the Python package index configured in the user's environment. It does not specify reviewed versions, use a lockfile, verify package hashes, or identify a trusted index.

Consequently, the installed dependency set is neither reproducible nor integrity-verified. Package installation can also execute package build hooks when source distributions are selected. A compromised package release, malicious package-index configuration, or future unsafe version could therefore introduce attacker-controlled code during installation or subsequent import.

There is also a dependency declaration mismatch: the skill metadata declares only `pandas` and `numpy`, while the installation command additionally introduces `scipy`, `matplotlib`, and `seaborn`. This weakens dependency review and inventory controls.

### Attack Path

1. A user follows the installation instructions in `SKILL.md`.
2. `pip` queries the package index configured in the user's environment and resolves unspecified package versions.
3. An attacker compromises an upstream release or influences the configured index or mirror.
4. `pip` downloads the attacker-controlled distribution without hash verification.
5. Malicious code executes through package build hooks during installation or when the package is later imported.
6. The payload runs with the privileges of the user or service account performing the installation or analysis.

### Impact Assessment

Successful exploitation could execute arbitrary code with the privileges of the installing user. Depending on that account's access, the attacker could read or modify local files, 
...[truncated 402 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace the direct installation command with a reviewed, version-pinned dependency file.
  2. Generate and retain hashes for every direct and transitive dependency, then install with pip install --require-hashes -r requirements.txt.
  3. Use a lockfile or constraints file to make dependency resolution reproducible.
  4. Explicitly configure and document the trusted package index; avoid untrusted extra indexes and mirrors.
  5. Prefer reviewed binary wheels and restrict source builds where operationally practical.
  6. Scan dependencies for known vulnerabilities and automate controlled update review.
  7. Synchronize SKILL.md, package metadata, and any dependency manifest so all direct dependencies—including scipy, matplotlib, and seaborn—are declared consistently.
  8. Perform installation in an isolated virtual environment or container under a least-privileged account.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (2)

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 1)May include surrounding context.

md
---
name: data-analysis
slug: data-analysis
version: 1.1.0

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The 'When to Use' section describes very broad conditions such as when a user needs to 'analyze, explain, or visualize data' and to prefer the skill over generic coding or spreadsheet help whenever 'the hard part is analytical judgment.' This lacks clear trigger boundaries or exclusion conditions, so the skill could be invoked for many ordinary requests that are not specifically scoped to this skill.

Content

No source excerpt is available for this finding.