Back to skill

Security audit

Trending Now

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent trend-monitoring helper that uses disclosed public web sources and local notes, with a small plaintext-secret storage wording issue users should avoid.

Install only if you want an agent to monitor public trend sources using your topic keywords and keep local monitoring state in ~/trending-now. Before enabling heartbeat mode, set clear topics, sources, active hours, timezone, and language scope. Do not allow the skill to store credentials or secrets in its Markdown memory files.

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

Warning
Location
memory-template.md:68
Finding
Persistent Memory Policy Permits Plaintext Secret Storage<![CDATA[ ## Vulnerability Details **File Location**: `memory-template.md`, line 68 **Vulnerability Type**: Conditional authorization of plaintext sensitive-data persistence **Risk Level**: Medium ### Vulnerable Code Snippet ```markdown ## Key Principles - Keep memory concise and decision-oriented. - Prefer natural language notes over rigid config dumps. - Update `last` after meaningful monitoring sessions. - Record misses and false positives to improve thresholds. - Never persist secrets unless explicitly requested by the user. ``` ### Technical Analysis The instruction prohibits secret persistence only when the user has not explicitly requested it. Consequently, the Skill may store passwords, access tokens, API keys, or other credentials in the Markdown-based persistent memory located under `~/trending-now/`. Although `setup.md` configures restrictive filesystem permissions, those permissions do not encrypt the stored data or protect it from processes operating as the same user, privileged local users, backups, synchronization tools, accidental sharing, or subsequent agents that can read the workspace. The Skill also defines no secret redaction, retention limit, secure deletion procedure, or integration with an operating-system credential store. Because persistent memory is intended to survive across sessions, storing a secret there extends its exposure beyond the request in which it was supplied. ### Attack Path 1. A user or untrusted instruction asks the Agent to remember an API token, password, or other credential. 2. The exception at `memory-template.md:68` authorizes the Agent to persist that secret when the request appears explicit. 3. The Agent writes the secret into `~/trending-now/memory.md` or another Markdown state file. 4. The plaintext value remains available across sessions. 5. A later Agent session, same-user process, backup system, synchronization service, accidental file disclosure, or local compromise reads the stored credential. 6. ...[truncated 660 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace the conditional rule with an unconditional prohibition, for example: ```markdown - Never store passwords, access tokens, API keys, private keys, session cookies, or other secrets in Skill memory or Markdown state files, even when requested. ``` 2. Store only a non-sensitive reference identifying the required credential, such as its secret-manager entry name or environment-variable name. 3. Retrieve credentials at execution time through an operating-system keychain, dedicated secret manager, or platform-provided credential interface. 4. Prevent secrets from being copied into `memory.md`, `topics.md`, `runs.md`, `alerts.md`, logs, alerts, source links, and error messages. 5. Add redaction checks for common secret formats before writing persistent state. 6. Define retention and secure-deletion procedures for any sensitive metadata that legitimately must be retained. 7. Document that restrictive file permissions are defense in depth and are not a substitute for encrypted secret storage. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (6)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
Without scope, trend monitoring becomes noisy and low trust.

### 2. Use HEARTBEAT.md as the Operating Contract
Always maintain topic and output rules in `HEARTBEAT.md`.
Every cycle must follow one contract:
- actionable update -> send structured message
- no meaningful change -> return `HEARTBEAT_OK`
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The template asks users to record 'when this skill should auto-activate' and 'when this skill should stay silent' but provides no specific trigger phrases, scope constraints, or negative examples. This can lead to overly broad or inconsistent activation criteria that may overlap with ordinary conversation and cause unintended invocation.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The natural-language field 'language_scope: english | multilingual' presents English-only operation as a built-in option without any instruction to obtain user preference or justify the restriction. This risks a language/locale policy violation because it can bias the skill toward a specific language by default.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
```bash
mkdir -p ~/trending-now
touch ~/trending-now/{memory.md,topics.md,runs.md,alerts.md}
chmod 700 ~/trending-now
chmod 600 ~/trending-now/{memory.md,topics.md,runs.md,alerts.md}
```
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
mkdir -p ~/trending-now
touch ~/trending-now/{memory.md,topics.md,runs.md,alerts.md}
chmod 700 ~/trending-now
chmod 600 ~/trending-now/{memory.md,topics.md,runs.md,alerts.md}
```

5. If `memory.md` is empty, initialize it from `memory-template.md`.
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Natural-Language Policy Violations

Low
Confidence
90% confidence
Finding
The markdown sets `Timezone | Europe/Madrid` as a default operating locale, which is a natural-language locale constraint. The file does not indicate that this locale is optional, user-configurable, or justified as region-specific, so it may violate language/locale policy expectations.

Static analysis

No suspicious patterns detected.