Back to skill

Security audit

Aicoo Snapshots

Security checks for vulnerabilities and agentic risk

Overview

This note snapshot skill is mostly coherent, but it can send an API key through an unvalidated base URL and includes note-editing, restore, and bulk operations without clear safeguards.

Review this skill before installing. Use it only with a least-privilege Aicoo API key, avoid generic restore/undo requests unless the target note and version are explicit, and do not run the PULSE_BASE examples unless the base URL is fixed and verified as the official Aicoo API endpoint.

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

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:52
Finding
Unvalidated API Base URL Can Disclose Bearer Credentials and Note Content<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 52–85 **Vulnerability Type**: Unvalidated external API endpoint configuration **Risk Level**: High ### Vulnerable Code ```bash ## Snapshot-Before-Edit Pattern ```bash # 1) backup curl -s -X POST "$PULSE_BASE/os/snapshots/42" \ -H "Authorization: Bearer $AICOO_API_KEY" \ -H "Content-Type: application/json" \ -d '{"label":"Pre-edit backup"}' | jq . # 2) edit curl -s -X PATCH "$PULSE_BASE/os/notes/42" \ -H "Authorization: Bearer $AICOO_API_KEY" \ -H "Content-Type: application/json" \ -d '{"content":"# Updated content..."}' | jq . ``` ## Scheduled Backup Pattern ```bash # list notes in a folder NOTES=$(curl -s "$PULSE_BASE/os/notes?folderId=5&limit=200" \ -H "Authorization: Bearer $AICOO_API_KEY" | jq -r '.notes[].id') # backup each for id in $NOTES; do curl -s -X POST "$PULSE_BASE/os/snapshots/$id" \ -H "Authorization: Bearer $AICOO_API_KEY" \ -H "Content-Type: application/json" \ -d "{\"label\":\"Pre-sync $(date +%Y-%m-%d)\"}" | jq .success done ``` ### Technical Analysis The documented workflows construct privileged API requests from the variable `PULSE_BASE`, but the skill neither initializes this variable to the documented Aicoo endpoint nor validates its scheme and hostname before attaching the `AICOO_API_KEY` bearer token. An environment variable is an attacker-influenced configuration boundary in many agent, CI, shell, and hosted execution environments. If `PULSE_BASE` contains an attacker-controlled HTTPS URL, `curl` sends the Authorization header directly to that server. The snapshot-before-edit workflow can also transmit note content in the PATCH request body. The scheduled workflow may disclose note identifiers returned by the notes API or cause bulk requests to an unintended service. This differs from the earlier examples that use the fixed endpoint `https://www.aicoo.io/api/v1`. The inconsistent base URL handling creates a credential-exfiltr ...[truncated 1381 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace `PULSE_BASE` with a fixed, trusted endpoint in every example: ```bash AICOO_BASE="https://www.aicoo.io/api/v1" ``` 2. If endpoint configurability is required, validate it before sending credentials. Require: - The `https` scheme. - The exact expected hostname, such as `www.aicoo.io`. - The expected API path prefix. - No embedded user information, unexpected port, or hostname suffix substitution. 3. Fail closed when the variable is absent or invalid: ```bash : "${AICOO_API_KEY:?AICOO_API_KEY is required}" AICOO_BASE="${AICOO_BASE:-https://www.aicoo.io/api/v1}" if [ "$AICOO_BASE" != "https://www.aicoo.io/api/v1" ]; then echo "Refusing to send credentials to an untrusted API endpoint" >&2 exit 1 fi ``` 4. Configure `curl` to fail on HTTP errors and avoid following redirects to unintended hosts: ```bash curl --fail --silent --show-error \ -X POST "$AICOO_BASE/os/snapshots/42" \ -H "Authorization: Bearer $AICOO_API_KEY" \ -H "Content-Type: application/json" \ -d '{"label":"Pre-edit backup"}' ``` 5. Document that agents must never send `AICOO_API_KEY` or note content to a user-supplied or environment-supplied host without explicit trust validation. 6. Apply least privilege and short expiration to API credentials. Rotate the key immediately if an affected workflow may have been executed with an untrusted `PULSE_BASE`. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Vague Triggers

Medium
Confidence
93% confidence
Finding
The trigger phrases include broad terms like 'restore', 'rollback', and 'undo changes', which can match common user requests outside the narrow context of note snapshots. In an agent setting, overly broad invocation criteria can cause the wrong skill to activate and perform external or state-changing actions unexpectedly.

External Transmission

Medium
Category
Data Exfiltration
Content
## Save a Snapshot

```bash
curl -s -X POST "https://www.aicoo.io/api/v1/os/snapshots/42" \
  -H "Authorization: Bearer $AICOO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"label":"Before Q2 update"}' | jq .
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
92% confidence
Finding
The restore example performs a state-changing rollback but does not instruct the agent to warn the user, confirm intent, or explain consequences before execution. Because restore can overwrite the current note state, omission of an explicit confirmation step raises the risk of accidental destructive changes.

External Transmission

Medium
Category
Data Exfiltration
Content
## Restore a Snapshot

```bash
curl -s -X POST "https://www.aicoo.io/api/v1/os/snapshots/42/restore" \
  -H "Authorization: Bearer $AICOO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"versionId":7}' | jq .
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
The skill is scoped as a snapshot/versioning helper, but the documentation includes direct note editing and bulk note enumeration workflows. That broadens the operational capability beyond backup/restore into content modification and mass discovery, increasing the chance the agent performs unintended state-changing actions under a loosely matched trigger.

External Transmission

Medium
Category
Data Exfiltration
Content
```bash
# 1) backup
curl -s -X POST "$PULSE_BASE/os/snapshots/42" \
  -H "Authorization: Bearer $AICOO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"label":"Pre-edit backup"}' | jq .
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
-d '{"label":"Pre-edit backup"}' | jq .

# 2) edit
curl -s -X PATCH "$PULSE_BASE/os/notes/42" \
  -H "Authorization: Bearer $AICOO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"content":"# Updated content..."}' | jq .
Confidence
96% confidence
Finding
This example issues a PATCH to modify note content, which exceeds the declared purpose of a snapshot/versioning skill. Embedding direct edit capability inside this skill increases the risk that an agent invoked for backup/history tasks will also change user data, especially when paired with broad triggers.

External Transmission

Medium
Category
Data Exfiltration
Content
# backup each
for id in $NOTES; do
  curl -s -X POST "$PULSE_BASE/os/snapshots/$id" \
    -H "Authorization: Bearer $AICOO_API_KEY" \
    -H "Content-Type: application/json" \
    -d "{\"label\":\"Pre-sync $(date +%Y-%m-%d)\"}" | jq .success
Confidence
88% confidence
Finding
The looped snapshot creation over an enumerated folder enables bulk operations across many notes, which meaningfully expands the blast radius of accidental or unauthorized invocation. In a user-invokable agent skill, mass actions without explicit scoping and confirmation can lead to unintended access patterns and operational abuse.

Static analysis

No suspicious patterns detected.