Back to skill

Security audit

GPU Keepalive with KeepGPU

Security checks for vulnerabilities and agentic risk

Overview

This skill gives coherent KeepGPU installation and operation instructions, with expected but resource-impacting background GPU usage that users should manage carefully.

Install only from sources you trust, preferably in a virtual environment with pinned versions or reviewed commits. Before using non-blocking service mode or nohup, confirm you are allowed to reserve GPU resources on that machine, choose the smallest useful VRAM setting, and verify cleanup with keep-gpu status, keep-gpu stop, and keep-gpu service-stop.

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 Third-Party Packages and Mutable Git Dependencies## Vulnerability Details **File Location**: `SKILL.md`, lines 20–60 **Vulnerability Type**: Untrusted and mutable software supply chain **Risk Level**: Medium The Skill directs users or agents to install KeepGPU and its dependencies without pinning package versions, verifying hashes, or fixing Git installations to an immutable commit. ```bash # CUDA example (change cu121 to your CUDA version) pip install --index-url https://download.pytorch.org/whl/cu121 torch pip install keep-gpu ``` ```bash # ROCm example (change rocm6.1 to your ROCm version) pip install --index-url https://download.pytorch.org/whl/rocm6.1 torch pip install keep-gpu[rocm] ``` ```bash pip install "git+https://github.com/Wangmerlyn/KeepGPU.git" ``` If SSH access is configured: ```bash pip install "git+ssh://git@github.com/Wangmerlyn/KeepGPU.git" ``` ROCm variant from Git URL: ```bash pip install "keep_gpu[rocm] @ git+https://github.com/Wangmerlyn/KeepGPU.git" ``` ### Option C: Install from a local source checkout (explicit path) ```bash git clone https://github.com/Wangmerlyn/KeepGPU.git cd KeepGPU pip install -e . ``` If the checkout already exists somewhere else, install by absolute path: ```bash pip install -e /absolute/path/to/KeepGPU ``` For ROCm users from local checkout: ```bash pip install -e ".[rocm]" ``` ### Technical Analysis The package-index commands resolve the latest versions available at installation time rather than a previously reviewed release. They also omit cryptographic package hashes. Consequently, later executions can install code that differs from the code originally assessed. The Git-based commands fetch the repository's mutable default branch because no tag or full commit SHA is specified. A force-push, compromised maintainer account, malicious upstream change, or repository transfer could therefore alter the effective payload without modifying this Skill. Python packag ...[truncated 1907 chars]
Remediation
## Remediation Suggestions 1. Pin KeepGPU and PyTorch to explicitly reviewed versions instead of resolving their latest releases. 2. Generate a locked requirements file containing all transitive dependencies and cryptographic hashes, then install it with `pip install --require-hashes -r requirements.txt`. 3. For Git installations, append a reviewed full commit SHA, for example: ```bash pip install "git+https://github.com/Wangmerlyn/KeepGPU.git@<full-reviewed-commit-sha>" ``` 4. Verify the selected commit against an authenticated release, signed tag, or trusted upstream publication process. 5. Avoid editable installations for routine operation. Build an immutable wheel from reviewed source and install that artifact instead. 6. Perform installation inside a dedicated virtual environment or container under a non-privileged account. 7. Review package metadata, build configuration, installation hooks, and dependency changes before updating pinned versions. 8. Use an organization-controlled package mirror or artifact repository to retain and distribute verified packages.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill explicitly recommends non-blocking background GPU keepalive sessions and a local service, but it does not clearly warn that these processes can continue consuming VRAM and affecting GPU availability after the immediate task ends. In shared or policy-restricted environments, this can cause resource starvation, interfere with other users' workloads, or violate operational rules even though the commands are framed as normal usage.

Session Persistence

Medium
Category
Rogue Agent
Content
Fallback when `tmux` is unavailable:

```bash
nohup keep-gpu --gpu-ids 0 --vram 1GiB --interval 300 > keepgpu.log 2>&1 &
echo $! > keepgpu.pid
# Monitor: tail -f keepgpu.log
# Stop: kill "$(cat keepgpu.pid)"
Confidence
91% confidence
Finding
The nohup example creates a detached persistent process that survives terminal disconnects, which can leave GPU memory allocation and keepalive behavior running unnoticed. In the context of a GPU keepalive tool, persistence materially increases the chance of hidden resource consumption, stale processes, and prolonged impact on shared systems.

Missing User Warnings

Low
Confidence
84% confidence
Finding
The installation section instructs users to run pip installs and Git-based package retrieval from external sources, which modifies the Python environment and executes package installation logic without an explicit caution. While common for setup documentation, this is still risky in agent contexts because users may not realize it changes the system state and trusts remote code from package indexes or GitHub.

Static analysis

No suspicious patterns detected.