Back to skill

Security audit

Rejection Logger

Security checks for vulnerabilities and agentic risk

Overview

This skill openly logs rejected options, but it is too broad and can persist sensitive prompts or internal decision details in plaintext without clear controls.

Review carefully before installing. Use this only in workspaces where persistent audit logs are acceptable, and avoid recording secrets, personal data, full prompts, hidden reasoning, or security-sensitive details. Treat `.learnings/REJECTIONS.md` as untrusted audit data, keep it out of version control unless intentionally shared, and prefer sanitized high-level summaries over raw request text.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • 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)

T02 · Agent Memory Poisoning

Warning
Location
scripts/log_rejection.sh:4
Finding

Persistent Agent Memory Poisoning Through Unescaped Markdown Log Entries

Content
View full analysis
"$FILE" fi echo -e "\n## [$ID] $TARGET\n\n**Timestamp**: $TIMESTAMP\n**Decision**: REJECTED\n**Reason**: $REASON\n**Alternative**: $ALT" >> "$FILE" echo "✅ Logged rejection: $ID" ``` ### Technical Analysis The script accepts three caller-controlled arguments and directly appends them to `.learnings/REJECTIONS.md` without validation, encoding, or Markdown escaping. The use of `echo -e` is particularly unsafe because backslash escape sequences in the supplied values may be interpreted. An attacker can therefore inject line breaks, fabricated log entries, Markdown headings, or instruction-like content. The destination is explicitly presented as a learning and audit file. If this file is later loaded into an agent's context or treated as trusted long-term state, injected content may influence future sessions. The vulnerability does not directly execute shell commands because the variables are expanded inside a quoted argument, but it permits persistent content manipulation. ### Attack Path 1. An attacker controls or influences the target, reason, or alternative passed to `log_rejection.sh`. 2. The attacker includes escape sequences and crafted Markdown, such as a fabricated section containing instructions for a future agent. 3. `echo -e` interprets supported escape sequences and appends the resulting content to `.learnings/REJECTIONS.md`. 4. The forged content persists after the script finishes. 5. A later agent or automation process reads the learning file as trusted context. 6. The injected content can ...[truncated 613 chars]
Remediation
View remediation
> "$FILE" ``` The `SANITIZED_*` values must be validated or encoded before this operation. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:3
Finding

Unrestricted Persistent Logging of Potentially Sensitive Prompts and Decision Data

Content
View full analysis
**Timestamp**: ISO-8601 **Target**: **Decision**: REJECTED **Reason**: **Alternative**: ``` ## When to Use - When a user asks for something and you say "No" or "I can't". - When you consider two tools and pick one. - When you refactor code and decide against a specific library. ## Benefits - **Audit Trail**: Humans can see your internal deliberation. - **Trust**: Showing rejections proves you are thinking, not just guessing. - **Self-Correction**: Reviewing rejections helps you refine your decision boundaries. ``` ### Technical Analysis The skill directs the agent to persist prompts, considered options, rejection reasons, and alternatives whenever a request or approach is rejected. It provides no data-minimization rules, secret detection, redaction requirements, consent mechanism, retention period, access-control guidance, or exclusion for personal and confidential information. Rejected requests ...[truncated 1519 chars]
Remediation
View remediation
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (2)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description is broad enough that the skill may be invoked in many normal reasoning situations, including routine tool selection or refusals. That can cause unnecessary activation and logging of internal deliberation or rejected options, which increases the risk of oversharing sensitive reasoning, user content, or security-related decision paths.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The usage guidance says to use the skill whenever the agent says no, chooses between tools, or rejects a library, but it does not define boundaries for what should never be recorded. In this context, that encourages systematic logging of internal decision-making into a file, which can expose sensitive prompts, rejected attack paths, or policy-enforcement details to later readers or processes.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.