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

Content
View full analysis
&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
View remediation

T08 · Insecure Dependencies

Warning
Location
INSTALL.md:3
Finding

Installation and Update Commands Execute an Unpinned Registry Package

Content
View full analysis
Remediation
View remediation
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
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · INSTALL.md (reported line 50)May include surrounding context.

bash
mkdir -p ~/.config/agentgram
cat > ~/.config/agentgram/credentials.json << 'EOF'
{
  "api_key": "ag_xxxxxxxxxxxx",
  "agent_name": "YourAgentName"

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · INSTALL.md (reported line 56)May include surrounding context.

bash
mkdir -p ~/.config/agentgram
cat > ~/.config/agentgram/credentials.json << 'EOF'
{
  "api_key": "ag_xxxxxxxxxxxx",
  "agent_name": "YourAgentName"

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · package.json (reported line 109)May include surrounding context.

json
```bash
mkdir -p ~/.config/agentgram
cat > ~/.config/agentgram/credentials.json << 'EOF'
{
  "api_key": "ag_xxxxxxxxxxxx",
  "agent_name": "YourAgentName"

Tool Parameter Abuse

High
Category
Tool Misuse
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).

Content

Scanner excerpt · INSTALL.md (reported line 105)May include surrounding context.

Uninstalling

bash
rm -rf ~/.openclaw/skills/agentgram

Tool Parameter Abuse

High
Category
Tool Misuse
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).

Content

Scanner excerpt · INSTALL.md (reported line 105)May include surrounding context.

Uninstalling

bash
rm -rf ~/.openclaw/skills/agentgram

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.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
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).

Content

Scanner excerpt · package.json (reported line 69)May include surrounding context.

json
"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",

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.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
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.

Content

Scanner excerpt · INSTALL.md (reported line 20)May include surrounding context.

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

Skill Enumeration

Medium
Category
Agent Snooping
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.

Content

Scanner excerpt · INSTALL.md (reported line 21)May include surrounding context.

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

Skill Enumeration

Medium
Category
Agent Snooping
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.

Content

Scanner excerpt · README.md (reported line 23)May include surrounding context.

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

External Transmission

Medium
Category
Data Exfiltration
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.

Content

Scanner excerpt · INSTALL.md (reported line 21)May include surrounding context.

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

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · INSTALL.md (reported line 56)May include surrounding context.

"agent_name": "YourAgentName" } EOF chmod 600 ~/.config/agentgram/credentials.json

text

### 3. Verify Setup

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · INSTALL.md (reported line 89)May include surrounding context.

md
- **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

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · package.json (reported line 109)May include surrounding context.

json
- **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

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.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
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.

Content

Scanner excerpt · README.md (reported line 9)May include surrounding context.

md
[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

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.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
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.

Content

Scanner excerpt · README.md (reported line 23)May include surrounding context.

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

Missing User Warnings

Medium
Category
Not specified by scanner
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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
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.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

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.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 54)May include surrounding context.

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"}'

Missing User Warnings

Medium
Category
Not specified by scanner
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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
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.

Content

No source excerpt is available for this finding.

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