Back to skill

Security audit

glr-adapter-builder

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed GLR adapter scaffolding and validation helper with expected file generation, command use, and game-runtime integration guidance, but users should treat generated dependency installation as normal supply-chain risk.

Install only if you intend to generate GLR adapter projects. Run generated setup commands in an isolated development environment, review or pin dependencies and lockfiles before serious use, and only use loader or live-runtime paths for games and systems you are explicitly authorized to instrument.

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
scripts/scaffold_adapter.py:184
Finding
Generated Projects Install Dependencies Before Enforcing a Reviewed Lockfile<![CDATA[ ## Vulnerability Details **File Location**: `scripts/scaffold_adapter.py:184-195` and `scripts/scaffold_adapter.py:240-244` **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium ### Vulnerable Code The generated `pyproject.toml` uses mutable dependency ranges: ```python def _pyproject(package: str) -> str: project = package.replace("_", "-") runtime_dependency = f"game-learning-runtime~={PYTHON_API_COMPATIBLE_RELEASE}.0" return f'''[build-system] requires = ["editables>=0.5", "hatchling>=1.27"] build-backend = "hatchling.build" [project] name = "{project}" version = "0.1.0" requires-python = ">=3.10" dependencies = [ "{runtime_dependency}", ] [dependency-groups] dev = ["editables>=0.5", "hatchling>=1.27", "mypy>=1.15", "pytest>=8.3", "ruff>=0.11"] ``` The generated setup procedure resolves and installs those dependencies before checking the lock state: ```python def _justfile() -> str: windows_shell = ( 'set windows-shell := ["powershell.exe", "-NoLogo", "-NoProfile", ' '"-NonInteractive", "-ExecutionPolicy", "Bypass", "-Command"]' ) return f"""set shell := ["bash", "-eu", "-o", "pipefail", "-c"] {windows_shell} export UV_PROJECT_ENVIRONMENT := ".venv-glr" default: check setup: vx uv sync --python 3.12.13 --all-groups --no-install-project vx uv sync --python 3.12.13 --all-groups --no-build-isolation lock-check: vx uv lock --check ``` ### Technical Analysis The scaffold does not emit a pre-reviewed `uv.lock`, while the generated dependency declarations permit multiple future versions through compatible-release and lower-bound constraints. The `setup` target invokes `uv sync`, which may resolve and download the currently available versions matching those constraints. The lock validation occurs only afterward through the separate `lock-check` target. Consequently, the first installation is not constrained by a previously reviewed immutable dependency graph. This crea ...[truncated 1841 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Generate and distribute a reviewed `uv.lock` with every scaffolded project. 2. Pin direct and build-system dependencies to exact reviewed versions rather than open lower-bound ranges. 3. Run lock validation before any dependency installation. 4. Replace the generated setup commands with frozen synchronization, for example: ```make lock-check: vx uv lock --check setup: lock-check vx uv sync --frozen --python 3.12.13 --all-groups --no-install-project vx uv sync --frozen --python 3.12.13 --all-groups --no-build-isolation ``` 5. Configure an explicit, approved Python package index and disable untrusted supplemental indexes to reduce dependency-confusion exposure. 6. Review and update the lockfile through a controlled dependency-update process with provenance verification, vulnerability scanning, and test execution. 7. Where supported, require artifact hashes and reject packages whose hashes do not match the reviewed lock data. 8. Perform initial dependency installation in a sandboxed environment without developer credentials or access to sensitive repositories. ]]>
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • 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 (3)

Ae1

High
Category
analysis-evasion
Content
`SKILL.md`; all `scripts/`, `assets/`, and `references/` paths below are
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Lp3

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding
The skill describes operations that can read/write files, invoke shell commands, inspect environment context, and access network resources, but it does not declare an explicit tool scope such as `permissions` or `allowed-tools`. That creates an overly broad and ambiguous execution boundary, increasing the chance that an agent may invoke powerful capabilities beyond what is strictly necessary for adapter scaffolding and validation.

Missing User Warnings

Low
Confidence
83% confidence
Finding
This code creates directories and writes many files into the user-supplied output path, which is a safety-relevant file mutation operation. Although it prevents use of a non-empty directory, there is no confirmation prompt or explicit user-facing disclosure at the point of generation that the scaffold will populate the directory with a full project tree.

Static analysis

No suspicious patterns detected.