Back to skill

Security audit

LeSecure Cloud

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed cloud encryption helper, but it handles secrets in ways that can expose API keys, plaintext, and lock values.

Review before installing. Use this only when you intentionally want LESecure Cloud to process the data, avoid entering highly sensitive plaintext or lock factors into chat, prefer LESecureLocal for private files or secrets, and store the API key in a real secret manager rather than a shell profile or dotenv file.

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

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:153
Finding

Bearer Token Exposed Through the curl Process Argument Vector

Content
View full analysis
","-1","","--PlainText"]} EOF ``` The same Authorization-header pattern is repeated in the examples at lines 163-168 and 173-178. ### Technical Analysis The shell expands `$LESECURE_API_KEY` before starting `curl`. Consequently, the resulting Authorization header, including the literal bearer token, becomes part of the `curl` process argument vector. This contradicts the Skill's assertion that referencing the environment variable inside the curl command prevents the key from appearing on the command line. Although the JSON request body is supplied through standard input, the Authorization header remains an ordinary command-line argument. Depending on the operating system's process-inspection restrictions, the expanded token may be visible through process-monitoring interfaces, diagnostic tooling, endpoint monitoring, process accounting, crash reports, or logs that record command arguments. ### Attack Path 1. A user invokes an encryption or decryption workflow described by the Skill. 2. The shell expands `$LESECURE_API_KEY` into the Authorization-header argument. 3. `curl` starts with the complete bearer token in its process argument vector. 4. A local user, compromised monitoring agent, or process-inspection tool captures the argument while `curl` is running. 5. The attacker extracts the bearer token. 6. The attacker reuses the token to submit requests to the LESecure API until the token is revoked or expires. ### Impact Assessment Successful exploitation discloses the API bearer token. An attacker may obtain the same LESecure API authorization granted to that token, potentially ...[truncated 334 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:185
Finding

Sensitive Plaintext and Lock Values Are Collected Through the Chat Interface

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:73
Finding

Documentation Recommends Plaintext Persistence of the API Key

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (17)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger description is broad enough to activate on generic encryption-related requests, which can route users toward a cloud skill that transmits sensitive plaintext and secrets to a third-party API. In this context, unintended invocation increases the chance of unnecessary external data disclosure, especially when a local-only alternative exists.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
86% confidence
Finding

The skill is designed around a third-party API endpoint, which means use of the skill necessarily involves sending user-controlled data off-device. In a security/encryption workflow, external transmission is particularly sensitive because users may assume encryption tooling operates locally unless clearly and narrowly scoped.

Content

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

md
| Resource | URL |
|---|---|
| Source code & documentation | <https://github.com/SPAlgorithm/LE> |
| API endpoint | `https://api.lesecure.ai/exec` |
| Local/on-prem alternative | LESecureLocal skill (no data leaves your machine) |

If you cannot verify the LESecure service or its privacy practices, use the **LESecureLocal** skill instead — it runs entirely on your device with no network calls.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

This section openly states that plaintext/ciphertext, lock values, and the bearer token are sent to a third-party endpoint. The transparency is good, but from a security standpoint it confirms a real data-exposure pathway involving highly sensitive material.

Content

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

md
This skill sends data to a **third-party remote endpoint** over the network. Users must understand what is transmitted before proceeding.

- **Where:** All requests go to `https://api.lesecure.ai/exec` over TLS (HTTPS). See [source & docs](https://github.com/SPAlgorithm/LE) for the service's privacy practices.
- **What is sent:** The plaintext data to encrypt (or the ciphertext to decrypt), plus any lock values (PINs, passwords, phone numbers, time-window dates), and the API bearer token.
- **What is NOT sent:** No local files, no OS credentials, no browser data, no environment variables other than the bearer token.
- **Caution:** Do not send highly sensitive personal data (SSNs, financial account numbers, medical records) unless you have verified the service's data handling and privacy policies.

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

The API basics define a remote POST interface authenticated with a bearer token, confirming that secrets and protected data are transmitted to an external service for processing. This is a genuine security concern because bearer-token misuse or service compromise could expose user content and access to the API.

Content

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

md
## API Basics

- **Endpoint**: `https://api.lesecure.ai/exec`
- **Method**: POST
- **Auth**: Bearer token in the `Authorization` header, sourced from `$LESECURE_API_KEY`
- **Content-Type**: `application/json`

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

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

md
1. **The key must come from the `LESECURE_API_KEY` environment variable.** The skill references `$LESECURE_API_KEY` inside the `curl` argument so the shell does the substitution — the literal key is never written on the command line.
2. **Never interpolate the literal key into a command string.** Args on the command line are visible in shell history and to other local users via `ps`.
3. **If `LESECURE_API_KEY` is unset**, stop and instruct the user to set it (see the one-time setup below). Do not ask the user to paste the key into chat.
4. **Never echo, print, log, or summarize the key.** Do not include it in error messages, response quotes, or any output shown to the user. Do not write it to disk.
5. **If the user pastes a key into chat anyway**, do not save it. Treat the chat message as one-time input: `export` it into the current shell session only, use it for this request, then tell the user to rotate the key (paste-in-chat is a key-exposure event).

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

md
1. **The key must come from the `LESECURE_API_KEY` environment variable.** The skill references `$LESECURE_API_KEY` inside the `curl` argument so the shell does the substitution — the literal key is never written on the command line.
2. **Never interpolate the literal key into a command string.** Args on the command line are visible in shell history and to other local users via `ps`.
3. **If `LESECURE_API_KEY` is unset**, stop and instruct the user to set it (see the one-time setup below). Do not ask the user to paste the key into chat.
4. **Never echo, print, log, or summarize the key.** Do not include it in error messages, response quotes, or any output shown to the user. Do not write it to disk.
5. **If the user pastes a key into chat anyway**, do not save it. Treat the chat message as one-time input: `export` it into the current shell session only, use it for this request, then tell the user to rotate the key (paste-in-chat is a key-exposure event).

### One-time setup (run once per shell)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
To persist across shells (in order of preference):
1. **Secret manager** (recommended): use `1Password CLI`, `aws ssm`, `doppler`, or similar to inject the key at shell startup.
2. **Shell profile**: add `export LESECURE_API_KEY='…'` to `~/.zshrc` / `~/.bashrc` (ensure the file is chmod 600).
3. **Dotenv file**: store in a `.env` file excluded from version control and source it.

**If the user ever pastes the key into chat**, remind them: "Your API key was exposed in chat history. Rotate it immediately at your LESecure dashboard."

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The instructions require that all date/time handling always use EST/EDT and explicitly say there is no need for the user to restate them. This imposes a specific locale/timezone behavior without user opt-in, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

This section instructs the agent to construct and send encryption/decryption requests containing plaintext, ciphertext, lock values, and an API bearer token to a third-party remote endpoint. Even though the skill discloses the network transmission, it still operationalizes exfiltration of sensitive user material off-device, which is inherently risky in a security-sensitive skill.

Content

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

md
- **Always pipe the body via stdin using `-d @-`.** This keeps all sensitive values out of the process argument list.
- Use a heredoc (`<<'EOF'`) to build the JSON body and pipe it into `curl`.

## Building the curl Command

Construct the args array by mapping user requirements to flags. Order within the array doesn't matter, but group related flags and their values together for readability.

External Transmission

Medium
Category
Data Exfiltration
Confidence
96% confidence
Finding

This repeated endpoint reference is part of an executable example that sends plaintext and a PIN to the cloud API. The context is not merely documentation of a URL; it is an instruction to transmit sensitive user data externally.

Content

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

Encrypt with pin lock only:

bash
cat <<'EOF' | curl -s https://api.lesecure.ai/exec \
  -H "Authorization: Bearer $LESECURE_API_KEY" \
  -H "Content-Type: application/json" \
  -d @-

External Transmission

Medium
Category
Data Exfiltration
Confidence
96% confidence
Finding

This repeated endpoint reference is part of an executable example that sends plaintext and a PIN to the cloud API. The context is not merely documentation of a URL; it is an instruction to transmit sensitive user data externally.

Content

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

Encrypt with pin lock only:

bash
cat <<'EOF' | curl -s https://api.lesecure.ai/exec \
  -H "Authorization: Bearer $LESECURE_API_KEY" \
  -H "Content-Type: application/json" \
  -d @-

External Transmission

Medium
Category
Data Exfiltration
Confidence
98% confidence
Finding

This repeated endpoint reference accompanies the all-locks example, which centralizes several secret factors in one third-party request. That materially elevates confidentiality and privacy risk beyond a normal API integration.

Content

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

Encrypt with all locks:

bash
cat <<'EOF' | curl -s https://api.lesecure.ai/exec \
  -H "Authorization: Bearer $LESECURE_API_KEY" \
  -H "Content-Type: application/json" \
  -d @-

External Transmission

Medium
Category
Data Exfiltration
Confidence
98% confidence
Finding

This repeated endpoint reference accompanies the all-locks example, which centralizes several secret factors in one third-party request. That materially elevates confidentiality and privacy risk beyond a normal API integration.

Content

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

Encrypt with all locks:

bash
cat <<'EOF' | curl -s https://api.lesecure.ai/exec \
  -H "Authorization: Bearer $LESECURE_API_KEY" \
  -H "Content-Type: application/json" \
  -d @-

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

This repeated endpoint reference is tied to cloud decryption, where the user must transmit the encrypted blob and corresponding lock values to regain plaintext. That creates a real exposure path for decryption secrets and recovered sensitive content.

Content

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

Decrypt:

bash
cat <<'EOF' | curl -s https://api.lesecure.ai/exec \
  -H "Authorization: Bearer $LESECURE_API_KEY" \
  -H "Content-Type: application/json" \
  -d @-

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

This repeated endpoint reference is tied to cloud decryption, where the user must transmit the encrypted blob and corresponding lock values to regain plaintext. That creates a real exposure path for decryption secrets and recovered sensitive content.

Content

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

Decrypt:

bash
cat <<'EOF' | curl -s https://api.lesecure.ai/exec \
  -H "Authorization: Bearer $LESECURE_API_KEY" \
  -H "Content-Type: application/json" \
  -d @-

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

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

md
## Workflow

1. **Preflight the requirements** from the Requirements section above. Specifically, confirm `$LESECURE_API_KEY` is set. If it is not set, show the user the one-time setup block and stop — do not proceed, do not ask the user to paste the key into chat.
2. **Data-transmission disclosure (first use only).** On the first encrypt/decrypt in a session, inform the user: "This will send your data to api.lesecure.ai over HTTPS for encryption/decryption." Proceed only after acknowledgment.
3. **Gather non-secret inputs from the user:**
   - The data to encrypt or decrypt

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

The workflow explicitly directs execution of a curl request that transmits sensitive data to an external endpoint. The skill context makes this more sensitive than ordinary web access because the transmitted material includes plaintext secrets and unlocking credentials, not just public data.

Content

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

md
- Always include `--PlainText`
   (Do NOT ask for the API key — it comes from the environment.)
4. **Build the args array** with the appropriate flags and values.
5. **Execute the curl command** via Bash using the `cat <<'EOF' | curl ... -d @-` pattern. Never use inline `-d '...'`. This keeps all sensitive data (plaintext, PINs, passwords) out of `ps` output and shell history.
6. **If decrypting**, remind the user they need the same lock values that were used during encryption.

## Important Notes

Static analysis

No suspicious patterns detected.