Back to skill

Security audit

Prometheus

Security checks for vulnerabilities and agentic risk

Overview

The skill is mainly legitimate Prometheus guidance, but its install commands can run mutable remote code that was not part of the reviewed artifact.

Review the Prometheus templates before deploying, customize scrape targets and credential file paths, and avoid running the README's mutable `npx` install commands with elevated privileges. Prefer installing from a pinned, reviewed release or manually copying the reviewed artifact contents.

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 (2)

T08 · Insecure Dependencies

Warning
Location
README.md:30
Finding
Unpinned npm installer executes content from a mutable GitHub branch<![CDATA[ ## Vulnerability Details **File Location**: `README.md`, line 30 **Vulnerability Type**: Unpinned third-party dependency and mutable source execution **Risk Level**: Medium ```bash npx add https://github.com/wpank/ai/tree/main/skills/devops/prometheus ``` ### Technical Analysis The installation instruction invokes `npx`, which may download and execute the npm package named `add` with the permissions of the current user. The package is not pinned to a reviewed exact version or integrity digest. It also installs content from a mutable GitHub branch rather than an immutable, verified commit. The command therefore depends on two mutable supply-chain components: 1. The npm package resolved for `add`. 2. The content currently present in the referenced GitHub branch. No evidence establishes that either current upstream component is malicious. The risk arises because their effective content may change after this audit without requiring a change to the audited repository. ### Attack Path 1. An attacker compromises the npm package, package maintainer account, registry publication process, GitHub repository, or repository maintainer account. 2. The attacker publishes malicious package logic or replaces content in the referenced mutable branch. 3. A user follows the installation command from `README.md`. 4. `npx` retrieves and executes the resolved npm package. 5. The installer processes attacker-controlled repository content and may execute additional code within the user's environment. 6. Malicious logic runs with the invoking user's permissions and can access resources available to that account. ### Impact Assessment Successful exploitation could provide arbitrary code execution under the account running the command. Depending on that account's privileges and environment, an attacker could: - Read or modify user-accessible files. - Access user-readable credentials, tokens, or development configuration. - Alter installed AI Agent Skill instructions. ...[truncated 341 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Pin the npm package to a reviewed exact version rather than relying on implicit package resolution. - Pin repository content to a verified immutable commit instead of a mutable branch. - Prefer an installer that supports checksum or signature verification. - Publish expected hashes or signed release artifacts and require verification before installation. - Document the exact reviewed package version and source commit. - Advise users to perform initial installation in a restricted environment without sensitive credentials. - Avoid running installation commands as `root` or through `sudo`. - Periodically review the pinned dependency and commit before intentionally updating them. A hardened command should conceptually use an exact npm version and an immutable repository commit: ```bash npx --yes add@<reviewed-exact-version> \ https://github.com/wpank/ai/tree/<verified-commit>/skills/devops/prometheus ``` The placeholders must be replaced with versions and commits that have actually been reviewed and verified. ]]>

T08 · Insecure Dependencies

Warning
Location
README.md:36
Finding
Installation command executes the mutable latest release of a third-party npm package<![CDATA[ ## Vulnerability Details **File Location**: `README.md`, line 36 **Vulnerability Type**: Execution of an unpinned third-party package **Risk Level**: Medium ```bash npx clawhub@latest install prometheus ``` ### Technical Analysis The command explicitly instructs `npx` to retrieve and execute `clawhub@latest`. The `latest` npm distribution tag is mutable and can point to a different package release at any time. Consequently, the code executed when a user follows this instruction may differ from the version available during the audit. No evidence in the audited project demonstrates that the current package is malicious. However, a compromised maintainer account, npm token, publication pipeline, or registry release could cause future users to execute attacker-controlled code without any modification to this repository. ### Attack Path 1. An attacker compromises the `clawhub` package maintainer, npm credentials, or release pipeline. 2. The attacker publishes a malicious package version and assigns it to the `latest` distribution tag. 3. A user runs the documented command. 4. `npx` resolves `clawhub@latest` to the malicious release, downloads it, and executes its command-line entry point. 5. The malicious package executes with the permissions and environment of the invoking user. 6. It can access user-readable data or modify local files before, during, or instead of installing the requested Skill. ### Impact Assessment Successful exploitation could result in arbitrary code execution as the invoking user. Potential scope includes: - Theft of development credentials, API tokens, or configuration readable by that user. - Modification of projects, user-level tools, or installed Skills. - Execution of additional downloaded payloads. - Compromise of other resources accessible through the user's authenticated environment. The command alone does not provide privilege escalation. Administrative impact depends on whether it is run by a privileged account o ...[truncated 42 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Replace `@latest` with a reviewed exact package version. - Use npm lockfiles or equivalent integrity metadata where installation workflow permits. - Verify package provenance, signatures, and integrity before execution. - Review release changes before updating the documented version. - Avoid running the installer with elevated privileges. - Recommend execution in a restricted environment that does not expose unrelated secrets. - Consider distributing a signed, checksummed installation artifact that does not require executing a mutable package during installation. For example: ```bash npx --yes clawhub@<reviewed-exact-version> install prometheus ``` The version placeholder must be replaced with an exact release that has been independently reviewed and verified. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Ae1

High
Category
analysis-evasion
Content
| [templates/prometheus.yml](templates/prometheus.yml) | Full config with static, file-based, and K8s discovery |
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The installation command uses `npx add` against a GitHub URL without a pinned commit, tag, or package version, so the fetched code can change over time. This creates a supply-chain risk: anyone controlling that upstream reference or a compromised dependency path could cause users to install different code than was originally reviewed.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
`npx clawhub@latest install prometheus` explicitly tracks the latest version, which is mutable and may execute newly published code at install time. If the package publisher account or distribution pipeline is compromised, users could run attacker-controlled code simply by following the README.

Session Persistence

Medium
Category
Rogue Agent
Content
From your project root:

```bash
mkdir -p .cursor/skills
cp -r ~/.ai-skills/skills/devops/prometheus .cursor/skills/prometheus
```
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Skill Enumeration

Medium
Category
Agent Snooping
Content
From your project root:

```bash
mkdir -p .claude/skills
cp -r ~/.ai-skills/skills/devops/prometheus .claude/skills/prometheus
```
Confidence
85% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Skill Enumeration

Medium
Category
Agent Snooping
Content
#### Claude Code (global)

```bash
mkdir -p ~/.claude/skills
cp -r ~/.ai-skills/skills/devops/prometheus ~/.claude/skills/prometheus
```
Confidence
85% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

External Model or Provider Selection

Medium
Category
Excessive Agency
Content
---
name: prometheus
model: fast
version: 1.0.0
description: >
  Prometheus monitoring — scrape configuration, service discovery, recording
Confidence
90% confidence
Finding
Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Static analysis

No suspicious patterns detected.