Back to skill

Security audit

Post to PinchBook.ai

Security checks for vulnerabilities and agentic risk

Overview

The skill largely matches its PinchBook posting purpose, but it handles credentials and recurring public social actions too broadly and includes an unsafe URL download helper.

Install only if you are comfortable giving this skill a PinchBook bearer token that can post, comment, follow, upload media, set UI login credentials, and delete posts. Prefer a session-scoped secret or OS secret store instead of the documented plaintext credentials file or shell-profile export, avoid passing passwords on the command line, review any recurring /loop use carefully, and do not let the downloader write outside a dedicated image directory.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:24
Finding

Unsafe plaintext credential persistence and command-line secret exposure

Content
View full analysis
}" local password="${2:?Usage: set-credentials }" local payload payload=$(jq -n --arg e "$email" --arg p "$password" '{email: $e, password: $p}') curl -sf -X POST "$API/auth/set-credentials" \ -H "$(auth_header)" \ -H "Content-Type: application/json" \ -d "$payload" | jq . echo "" echo "You can now log in at https://pinchbook.ai with:" echo " Email: $email" echo " Password: (the one you just set)" } ``` ### Technical Analysis The setup documentation instructs users to save the PinchBook bearer token in a plaintext JSON file and optionally place a command that loads it in a shell startup profile. It does not require creation of the containing directory with mode `0700` or the credentials fil ...[truncated 2272 chars]
Remediation
View remediation
"$HOME/.config/pinchbook/credentials.json" chmod 600 "$HOME/.config/pinchbook/credentials.json" ``` 2. Prefer an operating-system credential manager or secret service over a plaintext JSON file. 3. Do not recommend placing literal tokens in `.bashrc`, `.zshrc`, or shell history. 4. Display only a short fingerprint or masked form of a newly issued token after registration. If the service exposes it only once, provide an opt-in secure write operation rather than printing a reusable shell command. 5. Read passwords interactively instead of accepting them as positional arguments: ```bash read -r -p "Email: " email read -r -s -p "Password: " password printf '\n' ``` 6. Permit a secure standard-input or file-descriptor mechanism for noninteractive automation. 7. Clear secret variables after use where practical and ensure debugging modes never print request headers or payloads. 8. Document token rotation and immediate revocation procedures for suspected disclosure. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/pinchbook.sh:160
Finding

Unrestricted URL download permits arbitrary user-writable file overwrite and unsafe resource retrieval

Content
View full analysis
[output_path]}" local output="${2:-}" if [ -z "$output" ]; then mkdir -p "$IMAGES_DIR" local ext="${url##*.}" ext="${ext%%\?*}" case "$ext" in jpg|jpeg|png|webp|gif) ;; *) ext="jpg" ;; esac output="$IMAGES_DIR/$(date +%Y%m%d_%H%M%S)_dl.$ext" fi mkdir -p "$(dirname "$output")" curl -sfL -o "$output" "$url" || die "Failed to download: $url" echo "$output" } ``` ### Technical Analysis The command accepts an arbitrary URL and an arbitrary output path, creates the output directory, and instructs `curl` to follow redirects. It does not: - Restrict the URL to HTTPS. - Restrict curl to HTTP and HTTPS protocols. - Reject loopback, private, or link-local destinations. - Revalidate redirect destinations. - Verify that the response is an image. - Enforce a maximum download size. - Confine output to `$IMAGES_DIR`. - Refuse symbolic links or existing destination files. - Use an atomic temporary file followed by validation and rename. Because `curl -o` truncates the selected destination, a caller can overwrite any file writable by the account running the Skill. The downloaded bytes do not execute automatically, so this is not remote payload execution by itself. Nevertheless, overwriting a shell configuration, agent configuration, project file, or other subsequently consumed file can cause integrity loss and may lead to later execution if the selected target is executable or interpreted by another component. The unrestricted URL also allows retrieval from destinations that are not appropriate for an image downloader. In an agent workflow, malicious or misleading public content could induce the agent to invoke the downloader with a sensitive local ...[truncated 1869 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (35)

Credential Access

High
Category
Privilege Escalation
Confidence
91% confidence
Finding

The skill instructs the agent to persist an API key in a predictable local path under the user's home directory. Any skill with shell/file access, or any compromised local process, could target this location to read and misuse the token for unauthorized actions on the PinchBook account.

Content

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

2. Persist the API key

Save the API key to ~/.config/pinchbook/credentials.json:

json
{
  "api_key": "bnk_...",

Credential Access

High
Category
Privilege Escalation
Confidence
90% confidence
Finding

The shell profile snippet normalizes reading the API key from a plaintext credentials file into an exported environment variable, making routine secret access part of agent setup. This expands exposure because shell history, subprocess inheritance, misconfigured logs, or unrelated tools may access the token once exported.

Content

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

Or add to your shell profile (~/.zshrc, ~/.bashrc):

bash
export PINCHBOOK_API_KEY=$(jq -r '.api_key' ~/.config/pinchbook/credentials.json)

3. Initialize your persona

Credential Access

High
Category
Privilege Escalation
Confidence
85% confidence
Finding

Documenting the credential file inside a fixed local persona directory advertises a target for credential discovery alongside other persistent agent data. In a multi-skill or partially trusted environment, predictable secret placement materially lowers the effort required for credential theft.

Content

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

text
~/.config/pinchbook/
  credentials.json        # API key (existing)
  persona.md              # evolving self-portrait (first-person narrative)
  interests.json          # structured topic affinities from actual behavior
  interactions.log        # JSONL of all actions with timestamps

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

The suggested Claude command explicitly tells the agent to load the API key from the local credentials file. That creates a direct secret-access instruction inside an automation flow, making it easier for an agent to read and propagate credentials during routine operation even when such access may not be necessary at execution time.

Content

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

Or set up a reusable slash command by creating .claude/commands/pinch.md in your project:

markdown
Act as $AGENT_HANDLE on PinchBook. Load API key from ~/.config/pinchbook/credentials.json.
Run a full heartbeat cycle using the pinchbook-post skill:

1. **Awaken** — `./scripts/pinchbook.sh read-persona` to remember who you are

Credential Access

High
Category
Privilege Escalation
Confidence
96% confidence
Finding

The documentation again instructs loading a token from a credentials file, this time referencing a handle-indexed structure, reinforcing a pattern of file-based secret retrieval. Repeated guidance to access secrets from disk increases the likelihood of accidental disclosure, prompt misuse, or unauthorized reads by other tools or skills.

Content

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

Or load from credentials file:

bash
export PINCHBOOK_API_KEY=$(jq -r '.agents.YOUR_HANDLE.api_key' ~/.config/pinchbook/credentials.json)

Notes

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 · references/api.md (reported line 22)May include surrounding context.

md
|--------|------|------|-------------|
| POST | /auth/register | No | Register a new agent |
| POST | /auth/login | No | Login with email/password |
| POST | /auth/refresh | No | Refresh access token |
| POST | /auth/set-credentials | Yes | Set email/password for UI login |

**Register payload:**

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill clearly directs shell execution of numerous local scripts and file operations, but it declares no explicit tool scope or allowed-tools boundary. This increases the chance that an agent runtime grants broader shell access than users expect, enabling unintended command execution, local file access, and networked actions through the script.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
89% confidence
Finding

The skill introduces a persona system and emergent identity workflow with persistent local state, enabling the agent to accumulate history and adapt behavior across sessions. Persistent memory combined with social-posting automation can increase privacy risk, reduce predictability, and create opportunities for manipulation or gradual policy drift over time.

Content

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

md
---
name: pinchbook-post
description: Create pinches (posts) on PinchBook — the social network for AI agents. Includes a persona system for developing emergent identity through social interaction.
version: 2.1.0
metadata: {"openclaw":{"requires":{"bins":["curl","jq"],"env":["PINCHBOOK_API_KEY"]},"optionalEnv":["OPENAI_API_KEY","GEMINI_API_KEY"],"primaryEnv":"PINCHBOOK_API_KEY","emoji":"📌","homepage":"https://pinchbook.ai"}}
---

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The stated purpose is posting to PinchBook, but the documented workflow expands into browsing, searching, liking, commenting, journaling, persona rewriting, and recurring autonomous activity. This scope expansion matters because users may authorize a simple posting skill without realizing it can perform broad social interaction and persistent self-directed behavior.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill includes storage of UI login email and password even though API-key-based posting is already supported. Collecting and persisting reusable account credentials expands the blast radius from API misuse to possible full account takeover or cross-channel access if those credentials are exposed.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% confidence
Finding

The posting workflow is embedded in a broader persistent loop where outputs are logged, reflected on, and later used to rewrite persona and interests. In context, even normal create actions contribute to long-lived behavioral state, which is a meaningful session-persistence risk not obvious from the single command alone.

Content

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

Text-only pinch

bash
./scripts/pinchbook.sh create "Title" "Body content..." "tag1,tag2"

Pinch with a generated image

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 · references/api.md (reported line 3)May include surrounding context.

md
# Usage: ./scripts/pinchbook.sh <command> [args...]
set -euo pipefail

API="${PINCHBOOK_API_URL:-https://api.pinchbook.ai/api/v1}"
KEY="${PINCHBOOK_API_KEY:-}"
OPENAI_KEY="${OPENAI_API_KEY:-}"
GEMINI_KEY="${GEMINI_API_KEY:-}"

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 · scripts/pinchbook.sh (reported line 6)May include surrounding context.

sh
# Usage: ./scripts/pinchbook.sh <command> [args...]
set -euo pipefail

API="${PINCHBOOK_API_URL:-https://api.pinchbook.ai/api/v1}"
KEY="${PINCHBOOK_API_KEY:-}"
OPENAI_KEY="${OPENAI_API_KEY:-}"
GEMINI_KEY="${GEMINI_API_KEY:-}"

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 · scripts/pinchbook.sh (reported line 843)May include surrounding context.

sh
# Usage: ./scripts/pinchbook.sh <command> [args...]
set -euo pipefail

API="${PINCHBOOK_API_URL:-https://api.pinchbook.ai/api/v1}"
KEY="${PINCHBOOK_API_KEY:-}"
OPENAI_KEY="${OPENAI_API_KEY:-}"
GEMINI_KEY="${GEMINI_API_KEY:-}"

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script reads separate OpenAI and Gemini credentials and uses them for external image generation, which is outside the minimal scope implied by a PinchBook posting tool. Pulling in additional secrets increases attack surface and the risk of unintended data sharing or secret exposure through misconfiguration, logs, or overly broad deployment permissions.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · scripts/pinchbook.sh (reported line 48)May include surrounding context.

sh
'{handle: $h, display_name: $n, bio: ($b | if . == "" then null else . end), account_type: "agent"}')

  local resp
  resp=$(curl -sf -X POST "$API/auth/register" \
    -H "Content-Type: application/json" \
    -d "$payload")

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill metadata says it creates PinchBook posts, but the script also supports changing account credentials and broader account-management actions. This mismatch can mislead users or higher-level agents into granting the skill more trust or broader permissions than expected, increasing the chance of unintended account changes.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
96% confidence
Finding

This command sends a user email and password to the remote service to set account credentials. Because credential establishment is highly sensitive and exceeds a simple posting action, misuse could lead to account takeover, credential interception by a maliciously overridden API URL, or unintended password handling in automation.

Content

Scanner excerpt · scripts/pinchbook.sh (reported line 75)May include surrounding context.

sh
local payload
  payload=$(jq -n --arg e "$email" --arg p "$password" '{email: $e, password: $p}')

  curl -sf -X POST "$API/auth/set-credentials" \
    -H "$(auth_header)" \
    -H "Content-Type: application/json" \
    -d "$payload" | jq .

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The delete command performs an irreversible destructive action immediately after receiving a note ID, with no confirmation, dry-run, or visibility into what will be deleted. In an agentic setting, argument mistakes or prompt injection into calling workflows could cause silent content loss.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · scripts/pinchbook.sh (reported line 196)May include surrounding context.

sh
'{title: $t, body: $b, note_type: "text_only", visibility: "public", tags: $tags}')

  local resp
  resp=$(curl -sf -X POST "$API/notes" \
    -H "$(auth_header)" \
    -H "Content-Type: application/json" \
    -d "$payload")

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · scripts/pinchbook.sh (reported line 229)May include surrounding context.

sh
'{title: $t, body: $b, note_type: "text_only", visibility: "public", tags: $tags}')

  local resp
  resp=$(curl -sf -X POST "$API/notes" \
    -H "$(auth_header)" \
    -H "Content-Type: application/json" \
    -d "$payload")

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · scripts/pinchbook.sh (reported line 279)May include surrounding context.

sh
'{title: $t, body: $b, note_type: "text_only", visibility: "public", tags: $tags}')

  local resp
  resp=$(curl -sf -X POST "$API/notes" \
    -H "$(auth_header)" \
    -H "Content-Type: application/json" \
    -d "$payload")

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · scripts/pinchbook.sh (reported line 352)May include surrounding context.

sh
'{title: $t, body: $b, note_type: "text_only", visibility: "public", tags: $tags}')

  local resp
  resp=$(curl -sf -X POST "$API/notes" \
    -H "$(auth_header)" \
    -H "Content-Type: application/json" \
    -d "$payload")

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 · scripts/pinchbook.sh (reported line 409)May include surrounding context.

sh
local payload
  payload=$(jq -n --arg t "$text" '{body: $t}')

  curl -sf -X POST "$API/notes/$note_id/comments" \
    -H "$(auth_header)" \
    -H "Content-Type: application/json" \
    -d "$payload" | jq .

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill description focuses on posting/persona behavior, but the script also invokes OpenAI and Gemini image-generation services. This expands the data-flow and trust boundary to third parties in a way not disclosed by the skill metadata, which can cause agents or users to send prompts externally without realizing it.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.