Back to skill

Security audit

excel-split-by-column

Security checks for vulnerabilities and agentic risk

Overview

This is a straightforward Chinese-language Excel splitting skill that reads a local .xlsx file and writes split output files locally, with minor usability and dependency-hardening notes.

Install this if you are comfortable with a Chinese-language local Excel utility. Run it only on spreadsheets you intend to process, review the output directory before sharing generated files, and install dependencies in a virtual environment with pinned package versions if possible.

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
split_by_column.py:20
Finding

Unpinned Third-Party Dependency Installation Guidance

Content
View full analysis

Vulnerability Details

File Location: split_by_column.py, lines 20–24
Vulnerability Type: Unverified and unpinned third-party dependency installation
Risk Level: Medium

Vulnerable Code:

python
try:
    from openpyxl import load_workbook, Workbook
    from openpyxl.styles import Font, PatternFill, Alignment
    from openpyxl.utils import get_column_letter
except ImportError:
    print("Error: openpyxl is required. Install it first with: pip install openpyxl")
    sys.exit(1)

Technical Analysis

When the dependency import fails, the script directs the user to install openpyxl through an unpinned pip install command. The project does not provide a lockfile, exact reviewed version, artifact hashes, or an explicit trusted package index.

Consequently, dependency resolution is controlled by the user's active pip configuration and whichever package release is current at installation time. If the configured index, selected package release, or transitive dependency chain is compromised, installation may process attacker-controlled package content. Python packages can run build-related code during installation, particularly when pip builds a source distribution.

This is a supply-chain hardening weakness. The script does not itself download or execute a remote payload, and exploitation requires the user to follow the displayed installation instruction in an affected package-index environment.

Attack Path

  1. The user runs the script in an environment where openpyxl is unavailable.
  2. The import raises ImportError, causing the script to display the unpinned installation command.
  3. The user executes pip install openpyxl.
  4. Pip resolves the package and its dependencies using the environment's configured package indexes without project-supplied version or hash restrictions.
  5. A compromised index, malicious package release, or compromised dependency supplies an ...[truncated 745 chars]
Remediation
View remediation

Remediation Suggestions

  1. Add a reviewed dependency manifest that pins openpyxl and all transitive dependencies to exact versions.

  2. Generate and verify cryptographic hashes for every approved distribution artifact.

  3. Replace the generic installation guidance with a hash-enforcing command, for example:

    bash
    python -m pip install --require-hashes -r requirements.txt
    
  4. Configure installation to use an explicitly approved HTTPS package index or an internally controlled package mirror.

  5. Prefer pre-reviewed binary wheels where appropriate and prohibit unexpected source builds in automated environments.

  6. Run dependency installation in an isolated virtual environment under a non-privileged account.

  7. Add automated dependency vulnerability and integrity checks to the CI pipeline, and update pinned versions through a controlled review process.

Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The listed trigger words include very general phrases such as “拆分” and “分成多个文件”, which can match many ordinary user requests outside this specific Excel skill. The description does not provide exclusion conditions or tighter scope boundaries to distinguish Excel column-based splitting from other file or data-splitting tasks.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The module docstring, user-facing error messages, and argparse help text are all written exclusively in Chinese. This creates a language/locale restriction in natural-language interaction without opt-in or explanation that the skill is intended only for Chinese-speaking users or a China-specific context.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.