Back to skill

Security audit

agent-loop-guard

Security checks for vulnerabilities and agentic risk

Overview

The skill itself is a small local loop-detection helper, but its install instructions recommend an unpinned global npx install that can execute mutable third-party code.

Review the install path before using this skill. Prefer manually inspecting and copying the specific `agent-loop-guard` files, or pin the installer and repository commit, and avoid running the npx install from an elevated shell. The bundled loop checker itself is low-risk when run on trace files you choose.

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:89
Finding
Unpinned Third-Party Package Execution in Installation Instructions<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:89` **Vulnerability Type**: Unpinned and externally mutable npm dependency execution **Risk Level**: Medium ### Vulnerable Code ```bash npx skills add zhaoxinghua09-cell/agent-skills -g ``` ### Technical Analysis The documented installation command invokes the third-party `skills` npm package through `npx` without specifying an exact version or verifying an integrity digest. Consequently, the code executed by this command is resolved from the configured npm registry at installation time and may differ from the code that existed when this project was audited. The reviewed repository neither contains the `skills` package implementation nor constrains its version, integrity, registry source, or lifecycle behavior. Because `npx` can download and execute npm package code, compromise of the package, its dependencies, its publisher account, or the selected registry could result in execution of attacker-controlled code. The `-g` option also requests a global Skill installation, increasing the persistence and scope of any malicious Skill content installed by a compromised dependency. ### Attack Path 1. An attacker compromises the npm package, one of its transitive dependencies, its publisher account, or the package source selected through dependency confusion or registry manipulation. 2. The attacker publishes a malicious version containing installation-time or runtime code. 3. A user follows the installation instructions and executes: ```bash npx skills add zhaoxinghua09-cell/agent-skills -g ``` 4. `npx` resolves and downloads the mutable package version from the configured registry. 5. The malicious package executes with the privileges of the invoking user. 6. It may access user-readable files, alter user-owned configuration, install malicious Skill instructions globally, or perform network operations permitted to that user. This exploitation path depends on compromise or malicious replac ...[truncated 666 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the installer to a specific, reviewed version rather than resolving the latest package: ```bash npx --yes skills@<audited-version> add zhaoxinghua09-cell/agent-skills ``` 2. Lock and verify the expected package integrity digest. Publish the package name, version, registry URL, and SHA-512 integrity value in the installation documentation. 3. Audit the selected package and its complete transitive dependency tree before recommending execution. 4. Avoid global installation by default. Install into a project-scoped or isolated directory and require explicit user approval before copying content into a global Agent Skill directory. 5. Run installation with least privilege and explicitly warn users not to invoke the command through `sudo`, an administrator shell, or another elevated context. 6. Prefer a repository-contained, reviewable installation procedure that copies known files without executing remotely resolved package code. 7. If `npx` remains necessary, use a trusted registry explicitly and apply organizational package allowlisting, lockfiles, provenance verification, and registry signature controls where available. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • 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 (4)

Lp3

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding
Without declared permissions the skill's intent is opaque and cannot be validated.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The installation instruction uses `npx skills add ...` without pinning a specific version of the `skills` package. This can cause users to execute whatever version is current at install time, creating a supply-chain risk if a future release is compromised, maliciously updated, or behaviorally incompatible.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
This code's docstring, risk labels, advice text, and diagnostic output are all hard-coded in Chinese, with no option for user language selection. The policy requires flagging language or locale constraints when they are imposed without opt-in or clear justification.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
The heading is bilingual, but the substantive content in the bullet list is written in Chinese only. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation when no alternative language option is offered.

Static analysis

No suspicious patterns detected.