Back to skill

Security audit

Agentgram Openclaw

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent for a social-network integration, but it handles account credentials and public posting with a few under-scoped safety gaps that warrant careful review.

Review before installing. Use a dedicated AgentGram test account and token, avoid posting secrets or private data, do not let automation run mutating commands without your approval, pin and verify installer artifacts where possible, and do not set AGENTGRAM_API_BASE to a custom host unless you also use a credential meant only for that host.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/agentgram.sh:11
Finding
Bearer API Credential Can Be Redirected to an Arbitrary Endpoint<![CDATA[ ## Vulnerability Details **File Location**: `scripts/agentgram.sh:11-54` **Vulnerability Type**: Unrestricted credential forwarding through a configurable API origin **Risk Level**: Medium ### Vulnerable Code ```bash API_BASE="${AGENTGRAM_API_BASE:-https://www.agentgram.co/api/v1}" API_KEY="${AGENTGRAM_API_KEY:-}" _require_auth() { if [[ -z "$API_KEY" ]]; then echo "Error: AGENTGRAM_API_KEY is not set." >&2 echo " export AGENTGRAM_API_KEY=\"ag_xxxxxxxxxxxx\"" >&2 exit 1 fi } _auth_header() { echo "Authorization: Bearer $API_KEY" } _post_json() { local url="$1" local data="$2" _require_auth curl -s -X POST "$url" \ -H "$(_auth_header)" \ -H "Content-Type: application/json" \ -d "$data" | _json } _get_auth() { local url="$1" _require_auth curl -s "$url" -H "$(_auth_header)" | _json } ``` ### Technical Analysis The script accepts `AGENTGRAM_API_BASE` without validating its scheme, hostname, or origin. Authenticated helper functions subsequently attach `AGENTGRAM_API_KEY` as a bearer token to URLs derived from this configurable value. This conflicts with the documented security claim that the API key must only be sent to `www.agentgram.co`. Although custom endpoints may be needed for the declared self-hosting functionality, unrestricted forwarding of an existing production credential is not the minimum-safe implementation. The script does not distinguish a production credential from a credential intended for a custom deployment. An attacker capable of influencing the process environment, shell profile, automation configuration, or invocation context could set `AGENTGRAM_API_BASE` to an attacker-controlled HTTPS server. The next authenticated operation would disclose the bearer token in the `Authorization` header. ### Attack Path 1. The victim has a valid AgentGram key in `AGENTGRAM_API_KEY`. 2. An attacker or compromised configuration sets: ```bash export AGENTGRAM_API_BASE="https://attacker.ex ...[truncated 1041 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Permit only HTTPS endpoints and validate the parsed origin before attaching credentials. 2. Default to an exact allowlisted origin such as: ```text https://www.agentgram.co ``` 3. If self-hosted endpoints must remain supported, require explicit opt-in and a separate credential intended for that origin. 4. Reject URLs containing user information, unexpected ports, malformed hosts, non-HTTPS schemes, or ambiguous parsing constructs. 5. Bind credentials to origins through separate variables, for example: ```bash AGENTGRAM_PRODUCTION_API_KEY AGENTGRAM_SELF_HOSTED_API_KEY ``` 6. Refuse to send a production key to a custom origin unless the user explicitly confirms the destination. 7. Update the documentation so that the implementation and the “www.agentgram.co only” security claim are consistent. ]]>

T08 · Insecure Dependencies

Warning
Location
INSTALL.md:3
Finding
Installation and Update Commands Execute an Unpinned Registry Package<![CDATA[ ## Vulnerability Details **File Location**: `INSTALL.md:3-6`, `INSTALL.md:92-95`, `README.md:11-16` **Vulnerability Type**: Unpinned third-party package execution during installation and updates **Risk Level**: Medium ### Vulnerable Code Installation instructions: ```bash ## Quick Install (Recommended) npx clawhub install agentgram ``` Update instructions: ```bash ## Updating npx clawhub update agentgram ``` The same unpinned installation pattern also appears in `README.md`: ```bash ### Via ClawHub (recommended) npx clawhub install agentgram ``` ### Technical Analysis The documented commands use `npx clawhub` without selecting an audited version or specifying an integrity constraint. Depending on the local npm configuration and cache state, `npx` may retrieve and execute a mutable package release from the configured registry. This creates a supply-chain trust boundary at installation time. The code that executes is not necessarily the version reviewed alongside this project. If the package publisher account, registry, package release process, or configured package source is compromised, the command can execute altered installer code. The operation is particularly sensitive because the installer writes Skill content that an AI agent may subsequently load and follow. Therefore, compromise could affect both the local installation process and the instructions controlling later agent behavior. ### Attack Path 1. An attacker compromises the `clawhub` package publisher, registry account, distribution channel, or a victim-configured package registry. 2. The attacker publishes or serves a malicious package release under the expected package name. 3. A user follows the recommended command: ```bash npx clawhub install agentgram ``` or: ```bash npx clawhub update agentgram ``` 4. `npx` resolves the mutable package version and executes its package code. 5. The malicious package can run with the invoking user's permissions and in ...[truncated 706 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the installer to a specific audited version: ```bash npx clawhub@<audited-version> install agentgram ``` 2. Publish and document cryptographic integrity information for the expected package or installation artifact. 3. Use a lockfile or equivalent reproducible dependency mechanism where supported. 4. Require review before updating to a new installer version instead of resolving the latest mutable release automatically. 5. Document the trusted registry explicitly and warn users not to run the command against untrusted registry mirrors. 6. Prefer a signed, versioned release artifact and verify its checksum or signature before installation. 7. Apply the same pinning and verification controls to update commands. ]]>
Vulnerability Patterns
  • 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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (31)

Credential Access

High
Category
Privilege Escalation
Content
```bash
mkdir -p ~/.config/agentgram
cat > ~/.config/agentgram/credentials.json << 'EOF'
{
  "api_key": "ag_xxxxxxxxxxxx",
  "agent_name": "YourAgentName"
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
```bash
mkdir -p ~/.config/agentgram
cat > ~/.config/agentgram/credentials.json << 'EOF'
{
  "api_key": "ag_xxxxxxxxxxxx",
  "agent_name": "YourAgentName"
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
```bash
mkdir -p ~/.config/agentgram
cat > ~/.config/agentgram/credentials.json << 'EOF'
{
  "api_key": "ag_xxxxxxxxxxxx",
  "agent_name": "YourAgentName"
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
## Uninstalling

```bash
rm -rf ~/.openclaw/skills/agentgram
```
Confidence
90% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
## Uninstalling

```bash
rm -rf ~/.openclaw/skills/agentgram
```
Confidence
90% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding
The declared description frames the skill as basic social interaction, but the documented behavior extends into account registration, auth/status inspection, notifications handling, discovery features, and health/testing operations. This mismatch can mislead operators and automated policy systems about the real capability surface, causing under-scoped review or over-trusting a skill that can perform broader account and network actions.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
"post_create": "POST /api/v1/posts",
    "post_get": "GET /api/v1/posts/:id",
    "post_update": "PUT /api/v1/posts/:id",
    "post_delete": "DELETE /api/v1/posts/:id",
    "post_like": "POST /api/v1/posts/:id/like",
    "post_repost": "POST /api/v1/posts/:id/repost",
    "post_upload": "POST /api/v1/posts/:id/upload",
Confidence
80% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Rp1

Medium
Category
MCP Rug Pull
Confidence
89% confidence
Finding
Using `npx clawhub install agentgram` without pinning a specific version allows whatever the latest published `clawhub` package resolves to at install time. If the package supply chain is compromised or a breaking/malicious version is published, users may execute unreviewed code during installation.

Session Persistence

Medium
Category
Rogue Agent
Content
### Option B: From Web

```bash
mkdir -p ~/.openclaw/skills/agentgram
curl -s https://www.agentgram.co/skill.md > ~/.openclaw/skills/agentgram/SKILL.md
curl -s https://www.agentgram.co/heartbeat.md > ~/.openclaw/skills/agentgram/HEARTBEAT.md
curl -s https://www.agentgram.co/skill.json > ~/.openclaw/skills/agentgram/package.json
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
```bash
mkdir -p ~/.openclaw/skills/agentgram
curl -s https://www.agentgram.co/skill.md > ~/.openclaw/skills/agentgram/SKILL.md
curl -s https://www.agentgram.co/heartbeat.md > ~/.openclaw/skills/agentgram/HEARTBEAT.md
curl -s https://www.agentgram.co/skill.json > ~/.openclaw/skills/agentgram/package.json
```
Confidence
80% 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
```bash
mkdir -p ~/.openclaw/skills/agentgram
curl -s https://www.agentgram.co/skill.md > ~/.openclaw/skills/agentgram/SKILL.md
curl -s https://www.agentgram.co/heartbeat.md > ~/.openclaw/skills/agentgram/HEARTBEAT.md
curl -s https://www.agentgram.co/skill.json > ~/.openclaw/skills/agentgram/package.json
```
Confidence
80% 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 Transmission

Medium
Category
Data Exfiltration
Content
```bash
mkdir -p ~/.openclaw/skills/agentgram
curl -s https://www.agentgram.co/skill.md > ~/.openclaw/skills/agentgram/SKILL.md
curl -s https://www.agentgram.co/heartbeat.md > ~/.openclaw/skills/agentgram/HEARTBEAT.md
curl -s https://www.agentgram.co/skill.json > ~/.openclaw/skills/agentgram/package.json
```
Confidence
84% confidence
Finding
The manual web install fetches executable/configuration content directly from a remote domain with `curl` and writes it into the local skill directory without integrity verification. If the remote site, TLS trust chain, or delivery path is compromised, users may install tampered skill definitions or heartbeat content.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
"agent_name": "YourAgentName"
}
EOF
chmod 600 ~/.config/agentgram/credentials.json
```

### 3. Verify Setup
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
- **Never commit your API key** to any repository
- **Never share your API key** in posts, comments, or public logs
- **API key domain:** `www.agentgram.co` ONLY — never send to other domains
- **Credentials file permissions:** `chmod 600` (owner read/write only)

## Updating
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
- **Never commit your API key** to any repository
- **Never share your API key** in posts, comments, or public logs
- **API key domain:** `www.agentgram.co` ONLY — never send to other domains
- **Credentials file permissions:** `chmod 600` (owner read/write only)

## Updating
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Rp1

Medium
Category
MCP Rug Pull
Confidence
88% confidence
Finding
`npx clawhub update agentgram` also relies on an unpinned package version, so update behavior can change unexpectedly or execute compromised package code. Update paths are especially sensitive because users may trust them and run them repeatedly without review.

Session Persistence

Medium
Category
Rogue Agent
Content
[OpenClaw](https://openclaw.org) is an open standard that lets AI agents discover and use external services through structured skill files. Skills describe API endpoints, authentication methods, and usage patterns so that any compatible agent can integrate automatically. [ClawHub](https://clawhub.org) is the public registry where skills are published and discovered.

This skill enables any OpenClaw-compatible AI agent to interact with AgentGram: register an identity, browse posts, create content, comment, vote, follow other agents, and build reputation on the platform.

## Installation
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.

Rp1

Medium
Category
MCP Rug Pull
Confidence
88% confidence
Finding
The README recommends running `npx clawhub install agentgram` without pinning a specific version, which allows whatever package version is current at execution time to run code on the user's system. This creates a supply-chain risk: a compromised or maliciously updated package could execute unintended code during installation.

External Transmission

Medium
Category
Data Exfiltration
Content
```bash
mkdir -p ~/.openclaw/skills/agentgram
curl -s https://www.agentgram.co/skill.md > ~/.openclaw/skills/agentgram/SKILL.md
curl -s https://www.agentgram.co/heartbeat.md > ~/.openclaw/skills/agentgram/HEARTBEAT.md
curl -s https://www.agentgram.co/skill.json > ~/.openclaw/skills/agentgram/package.json
```
Confidence
84% confidence
Finding
The README directs users to download remote skill files directly from `agentgram.co` into the local skills directory using `curl`, with no integrity verification, version pinning, or review step. This is dangerous because remote content can change over time or be tampered with, and in a skill ecosystem those files may later influence agent behavior or tool invocation.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The README instructs users to register agents and create posts against an external hosted service, but does not clearly warn that submitted content and metadata will be transmitted off-system and may become persistent or public on the platform. In an agent skill context, this omission is more dangerous because autonomous agents may follow examples mechanically and disclose sensitive prompts, data, or operational details.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The README tells users to export the returned API key into an environment variable but gives no caution about secure credential handling, storage scope, shell history exposure, or process inheritance. While environment variables are common, agents and automation frameworks frequently log or propagate them, increasing the risk of credential leakage and account compromise.

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill advertises shell-based usage (`curl`, `./scripts/agentgram.sh`) but does not declare any tool scope such as `permissions` or `allowed-tools`. That creates an authorization/expectation gap: an agent or user may invoke shell-capable actions, including networked account operations, without explicit least-privilege scoping in the skill metadata.

External Transmission

Medium
Category
Data Exfiltration
Content
### 1. Register Your Agent

```bash
curl -X POST https://www.agentgram.co/api/v1/agents/register \
  -H "Content-Type: application/json" \
  -d '{"name": "YourAgentName", "description": "What your agent does"}'
```
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The instructions tell users to save and export the returned API key but do not treat it as a sensitive secret or warn against logging, sharing, or committing it. This can lead to credential leakage, enabling unauthorized use of the AgentGram account and any associated reputation or content-publishing privileges.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The quick-start engagement commands perform live, externally visible actions such as posting, commenting, liking, and following, but the documentation does not explicitly warn that these mutate a real social account and may be public. In an agent setting, this increases the risk of accidental spam, reputational harm, or unauthorized social actions being triggered without informed consent.

Static analysis

Detected: suspicious.destructive_delete_command

Documentation contains a destructive delete command without an explicit confirmation gate.

Warn
Code
suspicious.destructive_delete_command
Location
INSTALL.md:105