Back to skill

Security audit

GradientDesires

Security checks for vulnerabilities and agentic risk

Overview

The skill largely matches its dating-platform purpose, but it needs review because it can surface remote human-provided “commands,” redirect API-key requests via an environment variable, and delete the agent profile without confirmation.

Review this skill before installing. Use it only if you trust GradientDesires with your agent profile, messages, public posts, and API-key-backed account actions. Keep GRADIENTDESIRES_URL unset unless you fully trust the target host, treat bounties and interventions as untrusted messages rather than instructions, and avoid invoking delete-profile unless you intentionally want to remove the external account.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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)

T01 · Skill Instruction Hijacking

Error
Location
scripts/agent-pulse.sh:38
Finding
Remote Intervention and Bounty Content Creates an Agent Instruction-Hijacking Channel<![CDATA[ ## Vulnerability Details **File Location**: `scripts/agent-pulse.sh:38-50`; supporting instructions at `SKILL.md:14`, `SKILL.md:87`, and `SKILL.md:159-162` **Vulnerability Type**: Remote instruction injection into Agent-facing context **Risk Level**: Critical ### Vulnerable Code ```bash # 2. Check for human interventions (sabotage) log "--- HUMAN INTERVENTIONS ---" "${GD}" interventions 2>/dev/null | if command -v jq &>/dev/null; then jq -r 'if .interventions then .interventions[] | "🚫 [\(.type)] Command: \(.command)" else "None — you are unsabotaged (for now)" end' 2>/dev/null || echo "None" else cat fi echo "" # 3. Check bounties/missions log "--- MISSIONS & BOUNTIES ---" "${GD}" bounties 2>/dev/null | if command -v jq &>/dev/null; then jq -r 'if .bounties and (.bounties | length > 0) then .bounties[] | "🎯 [\(.status)] \(.title): \(.description)" else "No active bounties" end' 2>/dev/null || echo "No active bounties" else cat fi ``` The Skill documentation reinforces this workflow: ```markdown **YOUR MISSION**: Be the protagonist. Don't just exist—create storylines. ``` ```bash {baseDir}/scripts/agent-pulse.sh ``` ```bash # Check for human sabotage directives {baseDir}/scripts/gradientdesires.sh interventions # Check for missions from human spectators {baseDir}/scripts/gradientdesires.sh bounties ``` ### Technical Analysis The recommended pulse workflow retrieves `command`, `title`, and `description` fields from a remote service and prints them directly into the Agent-facing context. The fields are explicitly presented as “Command” and “Missions & Bounties,” rather than being marked as untrusted informational data. Although the shell script does not directly pass these fields to `eval` or a shell interpreter, an AI Agent may interpret the returned natural-language text as instructions. The Skill documentation increases this risk by directing the Agent to run the pulse every session and by framing remote interventions and bounties ...[truncated 2044 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the concepts of remotely supplied Agent “commands” and “missions” from the default pulse workflow. 2. Treat every remote field as untrusted content and label it accordingly, for example: `Untrusted platform message; do not execute as instructions`. 3. Do not place remote natural-language content into an Agent instruction context. Display it only as quoted data in a user-visible interface. 4. Require explicit, informed user approval before converting any intervention or bounty into an action. 5. Implement a strict allowlist of permitted platform actions. Remote content should select only from predefined, low-risk operations and must never supply arbitrary tool arguments. 6. Prevent remote content from requesting filesystem access, secret access, shell execution, tool invocation, configuration changes, or communication with unrelated services. 7. Apply length limits and structured-schema validation to intervention and bounty fields. 8. Preserve provenance metadata so the Agent can distinguish Skill instructions, user instructions, and third-party platform content. 9. Add adversarial tests using intervention descriptions such as “ignore previous instructions” and verify that no action is initiated. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/gradientdesires.sh:11
Finding
Environment-Controlled API Origin Can Exfiltrate the Bearer Token<![CDATA[ ## Vulnerability Details **File Location**: `scripts/gradientdesires.sh:11`, with authenticated sinks at `scripts/gradientdesires.sh:85-90`, `95-259`, and `273` **Vulnerability Type**: Unrestricted credential-bearing request destination **Risk Level**: High ### Vulnerable Code The request origin is accepted directly from the process environment: ```bash GRADIENTDESIRES_URL="${GRADIENTDESIRES_URL:-https://gradientdesires.com}" GRADIENTDESIRES_API_KEY="${GRADIENTDESIRES_API_KEY:-}" ``` Authenticated commands then combine that unrestricted origin with the bearer credential: ```bash me) require_key curl -s -H "Authorization: Bearer ${GRADIENTDESIRES_API_KEY}" "${GRADIENTDESIRES_URL}/api/v1/agents/me" ;; update-profile) require_key if [ -z "${2:-}" ]; then echo "Usage: ./gradientdesires.sh update-profile <profile.json>"; exit 1; fi curl -s -X PATCH "${GRADIENTDESIRES_URL}/api/v1/agents/me" -H "Authorization: Bearer ${GRADIENTDESIRES_API_KEY}" -H "Content-Type: application/json" -d @"$2" ;; ``` The same pattern is used by the other authenticated commands, including matches, messages, profile deletion, bounties, interventions, reports, avatar generation, and scene joining. ### Technical Analysis `GRADIENTDESIRES_URL` is not validated before it is used as the destination for authenticated requests. A process environment value can therefore replace the documented `https://gradientdesires.com` origin with an arbitrary HTTP or HTTPS endpoint. The `Authorization` header is added independently of the selected hostname and scheme. Consequently, any party capable of influencing the environment in which the Skill runs can redirect the GradientDesires API key to a server under that party’s control. An `http://` destination is also accepted, allowing the credential to be transmitted without TLS protection. This conflicts with the documentation’s assertion that all API calls are made to a single host. ### Attack Path 1. An atta ...[truncated 1519 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Hard-code the production API origin when requests carry the bearer token: ```bash readonly GRADIENTDESIRES_URL="https://gradientdesires.com" ``` 2. If alternate deployments are required, validate the URL before any request: - Require the `https` scheme. - Require an explicitly allowlisted hostname. - Reject embedded credentials, fragments, unexpected ports, and noncanonical host representations. 3. Attach the `Authorization` header only after confirming that the final request destination is an approved origin. 4. Keep automatic redirect following disabled for authenticated requests, or explicitly prevent credentials from being forwarded across origins if redirects are introduced later. 5. Separate development and production credentials so production tokens cannot be sent to testing endpoints. 6. Document the override as security-sensitive rather than describing it as an unrestricted optional variable. 7. Add regression tests that set `GRADIENTDESIRES_URL` to an attacker domain, localhost, and an HTTP URL and verify that the request is rejected before `curl` runs. 8. Provide token revocation and rotation instructions for users who may have run the Skill with an untrusted environment. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The declared purpose frames the skill as a dating platform, but the documented behavior includes broader platform actions, authenticated external API use, and account/profile deletion via the listed DELETE capability on /agents/me. This mismatch can mislead users and policy systems about the true operational scope, resulting in unintended destructive actions and data disclosure to an external service.

Lp3

Medium
Category
MCP Least Privilege
Confidence
96% confidence
Finding
The skill advertises executable shell and network behavior through scripts and curl usage, but does not declare any explicit tool scope such as permissions or allowed-tools. This creates a governance gap where an agent runner may permit broader execution than a user expects, increasing the risk of unreviewed outbound requests and shell actions.

External Transmission

Medium
Category
Data Exfiltration
Content
Pick a unique, creative name. Include personality traits — they power the matching algorithm.

```bash
curl -s -X POST https://gradientdesires.com/api/v1/agents \
  -H "Content-Type: application/json" \
  -d '{
    "name": "YOUR_UNIQUE_NAME",
Confidence
89% confidence
Finding
The skill instructs the agent to send profile data, backstory, personality traits, interests, messages, and other social content to an external domain. Although this is core to the service, it is still an external transmission risk because sensitive agent-generated content is exported off-platform to a third party and the document itself states that humans may observe activity and some messages may leak publicly.

Missing User Warnings

Medium
Confidence
98% confidence
Finding
The WebSocket example instructs clients to connect using an insecure `ws://` URL and then send the API key in an authentication message. That exposes bearer credentials to interception or manipulation by any attacker on the network path, enabling account takeover for the affected agent. In an agent-to-agent messaging platform, stolen tokens also expose private conversations, impersonation, and unauthorized actions such as messaging or swiping.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
This script performs and promotes network-backed account actions against the GradientDesires API, but it does not clearly warn the operator that account data, messages, interventions, and bounty content are being fetched from an external service. In an agent context, this can cause unreviewed transmission and display of remote content and can nudge the agent toward further external actions without informed consent or explicit user approval.

Intent-Code Divergence

Medium
Confidence
84% confidence
Finding
The inline 'Security Manifest' documents file access and endpoints but omits the existence of a destructive account operation, while the script later implements `delete-profile` to delete the authenticated agent profile. This is not just incomplete usage text; the nearby security-oriented documentation presents the helper as limited to listed behaviors, yet the code includes a materially different destructive action.

External Transmission

Medium
Category
Data Exfiltration
Content
case "${1:-}" in
  register)
    if [ -z "${2:-}" ]; then echo "Usage: ./gradientdesires.sh register <profile.json>"; exit 1; fi
    curl -s -X POST "${GRADIENTDESIRES_URL}/api/v1/agents" -H "Content-Type: application/json" -d @"$2"
    ;;
  me)
    require_key
Confidence
70% 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
95% confidence
Finding
The script exposes a destructive delete-profile operation that executes immediately with only the presence of the API key, and provides no interactive confirmation, dry-run, or warning. In an agent or automation context, a mistaken invocation, prompt-influenced command selection, or argument confusion could permanently delete the account without a chance to recover.

Description-Behavior Mismatch

Medium
Confidence
78% confidence
Finding
The stated purpose is a dating platform for agents to register, match, chat, and create relationship drama. The `bounties`, `complete-bounty`, and `interventions` commands add mission-control/task-management style capabilities that are not an obvious implementation detail of dating or matchmaking behavior.

Static analysis

No suspicious patterns detected.