Back to skill

Security audit

Codepal

Security checks for vulnerabilities and agentic risk

Overview

This skill is marketed as AI code analysis, but its script mostly saves and exports whatever developer text is entered, which can retain sensitive code or notes locally.

Install only if you want a local activity logger, not an AI code analyzer. Avoid entering secrets, proprietary source, customer data, or sensitive vulnerability notes unless you are comfortable with them being stored under ~/.local/share/codepal and later searchable or exportable.

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
scripts/script.sh:68
Finding

Unescaped User-Controlled Data in JSON and CSV Exports

Content
View full analysis
> "$out" ``` ```bash echo "$name,$ts,$val" >> "$out" ``` The affected values are read from persisted log files and originate from command input handled by the logging branches, such as: ```bash local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/check.log" ``` Equivalent input handling is repeated for the other logging commands. ### Technical Analysis The export implementation directly interpolates log values into JSON and CSV output without applying format-specific encoding. For JSON exports, values containing double quotes, backslashes, newlines, carriage returns, or other control characters are written verbatim. This can produce invalid JSON or allow attacker-controlled data to alter the apparent structure of the exported document. For CSV exports, fields are not quoted and embedded quotes, commas, and line breaks are not escaped. More importantly, values beginning with spreadsheet formula indicators such as `=`, `+`, `-`, or `@` remain active formulas when the exported file is opened in compatible spreadsheet software. The vulnerability does not directly execute commands inside the CodePal Bash process. Formula evaluation occurs in the context of the application used to open the exported CSV and depends on that application's security behavior. The script also currently contains a separate correctness defect—use of `local` outside functions—that prevents normal argument-bearing command branches from working in standard Bash. Nevertheless, unsafe export remains present for existing, legacy, or otherwise populated log files and would become directly reachable through the intended input flow once that defect is corrected. ### ...[truncated 1683 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is presented as an AI-powered code analysis tool, but the documented behavior is largely persistent collection and management of user-supplied text. This mismatch is dangerous because users may submit sensitive source code, security notes, or proprietary prompts expecting analysis, while the skill instead stores and later exports that data to local logs, increasing the risk of unintended retention and leakage.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script branding and help text present it as a developer analysis toolkit, but the command handlers do not perform those actions and instead persist user-supplied content into files under the user's home directory. In a security-sensitive agent skill context, deceptive or misleading capability claims materially increase risk because they encourage users to submit sensitive repository data to a component that is functioning as a local data collector.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill advertises codebase analysis and quality-check functionality, but the implementation only records arbitrary user inputs to persistent local log files and replays them later. This mismatch is dangerous because users may provide sensitive source code, secrets, or proprietary snippets under the assumption they are being analyzed transiently, when in fact the data is silently retained on disk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest advertises codebase analysis, but the documented functionality is mainly a local logging system for user entries. This can mislead users into providing confidential code or review notes under false assumptions about processing, creating an avoidable privacy and data handling risk.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The description says to use the skill when 'understanding unfamiliar repos, checking quality, or generating summaries,' which are broad, common developer activities rather than narrowly scoped trigger conditions. Without clearer constraints or exclusions, this wording could cause unintended invocation across many ordinary coding conversations.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Commands such as check, lint, format, generate, and explain are described as if they perform substantive operations, while the documentation later states they only log input. This deceptive interface can cause users to disclose sensitive code, vulnerabilities, or internal architecture details without receiving the expected processing, leaving those details unnecessarily stored on disk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill explicitly logs user-provided code inputs and supports exporting the accumulated data, but it does not provide a clear privacy or sensitivity warning. In a code-analysis context, inputs may contain proprietary source, secrets, vulnerability notes, or customer data, so silent persistence materially increases exposure risk.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Persistent logging plus export of all user-provided inputs creates a direct data leakage path for natural-language prompts, code snippets, bug notes, and other sensitive development artifacts. Because the tool centralizes and serializes this information into searchable and exportable files, compromise of the local account, backups, or shared environment could expose a rich history of confidential material.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
88% confidence
Finding

The documented workflow relies on session persistence and historical logging across commands, which is risky in this context because the retained content may include sensitive code review findings, prompts, and debugging details. Persistence is not inherently malicious, but in a developer tool handling potentially confidential material it increases long-term exposure and secondary-use risk.

Content

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

md
## When to Use

1. **Code review tracking** — Use `check`, `lint`, and `validate` to log issues discovered during code review sessions, then `search` to find them later
2. **Learning unfamiliar codebases** — Use `explain` to document your understanding of code patterns, then `report` to create summaries
3. **Code generation and templating** — Use `generate` to log code generation prompts and `template` to track template usage
4. **Diffing and debugging** — Use `diff` to record code changes and `fix` to document bug fixes, creating an audit trail
5. **Team metrics and reporting** — Use `stats` for activity summaries, `export json` to feed into dashboards, and `recent` for quick status checks

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

User-provided inputs are written verbatim to persistent files for multiple commands without any privacy notice, redaction, retention policy, or access controls. In this skill's context, users are likely to paste code, diagnostics, stack traces, and potentially secrets, so silent persistence can expose confidential data to other local processes, backups, or later unintended disclosure through export/search features.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.