Back to skill

Security audit

Maxwell Fea Simulation

Security checks for vulnerabilities and agentic risk

Overview

This Maxwell simulation helper is mostly guidance and demo analysis code, with no hidden data theft, persistence, or destructive behavior found.

Install only if a Chinese-language Maxwell FEA reference and demo post-processing helper fits your workflow. Use a virtual environment and pinned dependency versions if running the Python scripts, and verify or implement real CSV loading before using the post-processor on production simulation results.

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

Note
Location
scripts/maxwell_post_processor.py:7
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: scripts/maxwell_post_processor.py:7
Vulnerability Type: Unpinned third-party dependencies
Risk Level: Low

Complete Code Snippet:

python
依赖:
  pip install numpy matplotlib pandas scipy
  (无需 Maxwell 软件,仅用于结果后处理)

Technical Analysis

The script instructs users to install four third-party packages without version constraints, cryptographic hashes, a lockfile, or an explicitly trusted package index. Consequently, package resolution depends on mutable content supplied by the user's configured Python package repository.

If an upstream package release, maintainer account, package index, or local pip index configuration is compromised, installation could introduce malicious package code. Python packages may execute build or installation logic during installation. The listed pandas dependency is not imported by this script, so it unnecessarily expands the dependency and supply-chain attack surface.

This finding does not demonstrate that any named package is currently malicious. The risk arises from installing mutable, unverified dependency versions.

Attack Path

  1. An attacker compromises an upstream package release, maintainer account, configured package index, or dependency resolved by one of the listed packages.
  2. A user follows the installation instruction:
    bash
    pip install numpy matplotlib pandas scipy
    
  3. Pip resolves and downloads the attacker-controlled or compromised package without enforcing an audited version or expected hash.
  4. Malicious build or installation code executes under the privileges of the user running pip.
  5. The installed package may execute again when imported by the post-processing script.

Impact Assessment

Successful exploitation could execute arbitrary code with the privileges of the user performing the installation or running the script. This may permit access to that us ...[truncated 436 chars]

Remediation
View remediation

Remediation Suggestions

  1. Define only the dependencies actually required by the script and remove unused pandas.
  2. Pin dependencies to reviewed versions in a requirements or lock file.
  3. Generate and enforce cryptographic hashes, for example:
    bash
    pip install --require-hashes -r requirements.txt
    
  4. Use a controlled, trusted package index and explicitly configure the expected index URL in deployment documentation.
  5. Install dependencies in an isolated virtual environment without administrator or root privileges.
  6. Add automated dependency vulnerability and integrity scanning to the release process.
  7. Periodically update pinned versions through a reviewed and tested dependency-update workflow.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The description presents a broad Maxwell 2D simulation assistant covering modeling, excitation, boundary conditions, parameterized sweeps, solving, and result extraction. The supplied code only implements post-processing/analysis routines for result waveforms and derived characteristics. It performs FFT/statistical analysis and plotting for cogging torque, back-EMF, air-gap flux density, and torque-speed characteristics, and its main function generates demo data rather than interfacing with Maxwell or controlling simulations. While result extraction/analysis is partially aligned with the description, the primary declared purpose is significantly broader and materially different from the actual code behavior.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest description and the main body present the skill entirely in Chinese, indicating a locale/language constraint without any explicit opt-in or alternative language option. Under the policy, forcing a specific language without user choice is a natural-language policy violation unless clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The document title and all instructional content are written exclusively in Chinese, with no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking context. Under the policy, a forced language or locale without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This Python file contains natural-language docstrings and CLI/help context entirely in Chinese, including the top-level description and usage guidance. Under the policy, forcing a specific language without user opt-in is a locale/language policy violation unless the tool is explicitly documented as region-specific, which is not stated here.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The module docstring presents the script as a post-processing tool that operates on user-supplied result files, with usage examples passing CSV inputs. However, the actual CLI paths in main() never read args.file or related column arguments and instead synthesize demonstration datasets for every mode, so the documented behavior contradicts the implemented behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The argparse description and help strings are all written in Chinese, which means command-line guidance is only available in one language. Because no language selection or justification for a Chinese-only interface is provided, this violates the language/locale policy for natural-language content in code.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code file contains user-facing natural-language content and generated output exclusively in Chinese, including the module description, docstrings, checklist text, and labels. Under the policy rule, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This markdown file is written entirely in Chinese and provides no indication that users may choose another language or locale. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The header documentation states the script is for Maxwell result post-processing and requires no Maxwell installation because it only processes exported results. In practice, the implemented CLI performs self-contained synthetic signal generation rather than consuming exported Maxwell results, which contradicts that stated intent.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.