Back to skill

Security audit

gamma-phase-associator

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly documentation, but its install step uses an unpinned mutable GitHub dependency from a repository whose relationship to the stated source is not explained.

Review and pin the GaMMA dependency before installing. Prefer a trusted release or a full reviewed commit hash, install in a virtual environment or container, and verify why the installed wayneweiqiang/GaMMA repository is the intended source despite the artifact naming AI4EPS/GaMMA as the derivative source.

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:20
Finding

Unpinned Git Dependency Allows Mutable Upstream Code Execution

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 20
Vulnerability Type: Unpinned dependency installed from a mutable Git repository
Risk Level: Medium

Vulnerable Code:

bash
pip install git+https://github.com/wayneweiqiang/GaMMA.git

Technical Analysis

The documented installation command directs pip to retrieve and install executable Python package content from the repository's mutable default branch. It does not specify an immutable commit hash, an exact reviewed release, a lockfile, or artifact hashes.

Consequently, the code installed by this command can change after the Skill has been reviewed without any modification to SKILL.md. Python package installation may invoke build backends or other package-controlled installation logic, while subsequent imports execute the installed library code.

The document states that the Skill is derived from AI4EPS/GaMMA, but the installation command references wayneweiqiang/GaMMA. Although this may be legitimate, the provenance relationship is not explained or verified in the reviewed file.

Attack Path

  1. An attacker compromises the referenced GitHub repository, a maintainer account, or the repository's dependency publication process.
  2. The attacker adds malicious code to the repository's default branch, including package build logic or runtime modules.
  3. A user follows the installation command in SKILL.md.
  4. Pip retrieves the current attacker-controlled revision rather than an immutable, previously audited revision.
  5. Malicious code executes during package installation or when the package is subsequently imported and used.

Impact Assessment

Successful exploitation can result in arbitrary code execution with the privileges of the account running pip or the resulting Python package. Depending on that account's access, the payload could read or modify user-accessible files, access environment variables and credentials, alter Python ...[truncated 443 chars]

Remediation
View remediation

Remediation Suggestions

  1. Verify the authoritative upstream repository and document why the selected repository is trusted, particularly because the stated derivative source and installation source differ.
  2. Pin installation to an immutable, reviewed full commit hash rather than the repository's default branch:
    bash
    pip install "git+https://github.com/wayneweiqiang/GaMMA.git@FULL_REVIEWED_COMMIT_HASH"
    
  3. Prefer an exact, verified release artifact from a trusted package registry when one is available.
  4. Record dependencies in a lockfile or requirements file and verify distribution hashes, for example by using pip's hash-checking mode for registry artifacts.
  5. Review the pinned package's build configuration, build backend, transitive dependencies, and installation hooks before approval.
  6. Install into an isolated virtual environment or container under an unprivileged account. Do not run the installation command as root.
  7. Establish a controlled update process in which dependency revisions are reviewed and tested before changing the pinned version.
Vulnerability Patterns
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • 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 (1)

YARA rule 'agent_skill_remote_bootstrap_execution': Remote script or code download followed by execution/bootstrap installation [agent_skills]

High
Category
YARA Match
Confidence
85% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

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

assumes P/S wave picks have already been extracted. We provide documentation of its core API.

Zhu, W., McBrearty, I. W., Mousavi, S. M., Ellsworth, W. L., & Beroza, G. C. (2022). Earthquake phase association using a Bayesian Gaussian mixture model. Journal of Geophysical Research: Solid Earth, 127(5).

The skill is a derivative of the repo https://github.com/AI4EPS/GaMMA

Installing GaMMA

pip install git+https://github.com/wayneweiqiang/GaMMA.git

GaMMA core API

association

Function Signature

python
def association(picks, stations, config, event_idx0=0, method="BGMM", **kwargs)

Purpose

Associates seismic phase picks (P and S waves) to earthquake events using Bayesian or standard Gaussian Mixture Models. It clusters picks based on arrival time and amplitude information, then fits GMMs to estimate earthquake locations, times, and magnitudes.

1. Input Parameters

ParameterTypeDefaultDescription