Back to skill

Security audit

LeSecure Local/On-Prem

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent encryption purpose, but its instructions create review-worthy risk through unsafe shell execution patterns, automatic overwrite behavior, and an overbroad local-only privacy claim.

Review this skill carefully before installing. Use it only with trusted file paths and lock values, confirm exact output destinations before encryption or decryption, and do not assume MFA is fully local unless the LE provider documents where phone and OTP data goes.

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

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:121
Finding

Shell Command Injection Through Unquoted File Paths and Lock Arguments

Content
View full analysis
-z LE -d -z # Safe folder encrypt / decrypt (source folder preserved) LE -e -z -n LE -d -z -n # Destructive — only after explicit user confirmation LE -e -j ``` The workflow subsequently instructs the agent to construct and execute these commands through Bash: ```text 2. **Resolve the binary** via `$LE_BIN`, `command -v LE`, or ask the user. 3. **Gather lock inputs:** Which locks to apply and their values. 4. **Pick safe defaults:** `-z` for files; `-z -n` for folders. Do not add `-c` or `-j` unless the user explicitly confirmed source deletion. 5. **Build the command** with the appropriate flags. 6. **Execute via Bash** and return the result. ``` ### Technical Analysis The command templates place user-controlled file paths, directory paths, output names, password-file paths, and lock values directly into shell command positions. The skill does not require these values to be passed through an argument array or apply a mandatory shell-escaping procedure. If an implementation constructs the documented command as a string and submits it to Bash, shell metacharacters in an argument can alter command structure. Relevant metacharacters include semicolons, command substitutions, pipes, redirections, and logical operators. The plaintext sanitization rules elsewhere in the file do not protect file and folder mode, information queries, password-file paths, MFA values, output paths, or other lock arguments. ### Attack Path 1. An attacker supplies a crafted file path, folder path, output name, or lock value containing shell syntax. 2. The agent substitut ...[truncated 1051 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:96
Finding

Unsafe Plaintext Assignment Can Enable Shell Injection

Content
View full analysis
--PlainText ``` The surrounding instructions present this assignment as a safe alternative: ```text 2. **Alternatively, use a shell variable** to isolate user data from the command string: ``` ### Technical Analysis The later expansion of `${LEDATA}` is double-quoted, but the initial assignment is not safe if user-controlled plaintext is inserted into the displayed single-quoted shell source. A single quote in the supplied plaintext terminates the assignment's quoted value. Subsequent shell metacharacters can then be parsed as executable syntax. Quoting the variable during the later `LE` invocation does not repair an assignment that has already been transformed into attacker-controlled shell code. This conflicts with the statement that the shell variable isolates the input. It is only safe if the value is supplied to the shell through an already-separated argument, standard input, or another mechanism that does not generate shell source code. ### Attack Path 1. An attacker asks the skill to encrypt plaintext containing a single quote followed by shell syntax. 2. The agent embeds the plaintext into `LEDATA='user provided text here'`. 3. The attacker's quote closes the intended quoted value. 4. Bash parses the remaining injected characters as shell syntax. 5. The injected command executes before or alongside the intended encryption command. ### Impact Assessment Exploitation can result in arbitrary command execution under the account running the skill. An attacker could read or alter files, expose plaintext and encryption artifacts, delete user data, or execute other locally available programs. The ...[truncated 115 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:33
Finding

Forced Output Overwrite Is Enabled Without Confirmation

Content
View full analysis
-z LE -d -z LE -e -z -n LE -d -z -n ``` ### Technical Analysis Although `-z` does not delete the source input, it forcibly overwrites an existing destination. Replacing a destination is a destructive filesystem operation and can cause irreversible loss of a previous encrypted file, decrypted output, or unrelated file selected by an incorrect output calculation. The skill mandates `-z` and labels it safe without requiring an existence check, backup, unique output name, or user confirmation. The safeguards for `-c` and `-j` therefore do not cover all destructive behavior. ### Attack Path 1. A destination file already exists at the path that `LE` will generate or that the user specifies. 2. The agent follows the mandatory rule and automatically includes `-z`. 3. The `LE` binary replaces the existing destination without an interactive safeguard. 4. The previous destination content is lost or becomes difficult to recover. An attacker able to influence input or output path selection could intentionally target a valuable existing file for replacement. ### Impact Assessment The primary impact i ...[truncated 345 chars]
Remediation
View remediation

other

Warning
Location
SKILL.md:168
Finding

Unconditional Local-Only Privacy Claim Conflicts With MFA and OTP Operations

Content
View full analysis
` to trigger OTP delivery, then run again with `-3 `. ``` The notes also require a real phone-number format: ```text - Phone numbers for MFA (`-2`) must be in E.164 format. ``` ### Technical Analysis Phone-number registration and OTP delivery describe communication with an external telecommunications or MFA service. That behavior is inconsistent with an unconditional assertion that no data leaves the machine. The document does not identify the receiving service, transmitted fields, transport security, retention policy, jurisdiction, or whether encrypted-file metadata is sent when OTP delivery is triggered. It also does not require informed consent before phone registration or OTP transmission. This finding is based on the documented behavior. The audited project does not include the `LE` binary, so the exact network protocol and external recipient could not be verified from the available artifact. ### Attack Path 1. A user relies on the statement that all operations are local and no data leaves the device. 2. The user selects MFA and provides a phone number. 3. The skill invokes registration through `-2`. 4. During decryption, the skill invokes `-4` to trigger OTP delivery. 5. Phone or transaction-related information is necessarily provided to an unspecified ...[truncated 505 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
95% confidence
Finding

The trigger list includes very broad phrases such as "encrypt file," "decrypt file," and especially location-related prompts like "current location" and "where am i," which are common across many unrelated user intents. This can cause the skill to activate outside its intended context and route users into sensitive local execution or GPS-access workflows they did not explicitly request, increasing the risk of privacy-impacting or destructive actions.

Content

No source excerpt is available for this finding.

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 (America/New_York)" and always display the window back to the user in EDT/EST. This forces a specific locale/timezone behavior regardless of the user’s actual region or preference, and the file does not present it as an opt-in choice or clearly justified region-specific compliance requirement.

Content

No source excerpt is available for this finding.