Back to skill

Security audit

case.dev

Security checks for vulnerabilities and agentic risk

Overview

The skill appears purpose-built for case.dev legal workflows, but it includes unsafe installation guidance and under-warned handling of sensitive legal files and credentials.

Review before installing. Prefer the Homebrew install path and avoid running the curl-to-sh installer unless you independently verify the script and trust the source. Only upload legal documents, directories, recordings, or document URLs when you have authority to send them to case.dev and have checked privacy, retention, and client-confidentiality requirements. Prefer environment variables or a managed secret store over saving API keys in a local config file on shared machines.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (2)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:37
Finding
Unverified Remote Installation Script Executed Directly by a Shell<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:37` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```bash curl -fsSL https://raw.githubusercontent.com/CaseMark/homebrew-casedev/main/install.sh | sh ``` ### Technical Analysis The installation instructions retrieve `install.sh` from the current state of a remotely controlled GitHub repository and immediately pipe its contents into `sh`. The script is not pinned to an immutable commit or versioned artifact, and the instructions provide no checksum or cryptographic signature verification. This design means that the code executed by a user or agent can change after the Skill package has been reviewed. Compromise of the repository, maintainer account, referenced branch, or upstream delivery mechanism could cause attacker-controlled commands to be returned and executed. The remote script is not included in this project, so its contents and behavior could not be audited. This finding concerns the unsafe execution mechanism and does not assert that the current remote script is itself malicious. ### Attack Path 1. An agent or user follows the installation instructions in `SKILL.md`. 2. `curl` requests the current contents of the remote `install.sh`. 3. An attacker who has compromised or gained control of the remote source changes the script to include malicious commands. 4. The response body is passed directly to `sh` without local inspection or integrity verification. 5. The malicious commands execute with the privileges of the account running the installation command. ### Impact Assessment Successful exploitation provides arbitrary shell-command execution under the invoking user's account. The resulting access could permit reading or modifying files available to that account, accessing environment variables and locally stored credentials, installing additional software, or downloading further payloads. If the command is run from a p ...[truncated 401 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the direct `curl | sh` installation command. 2. Prefer installation through a trusted package manager or a signed, versioned release artifact. 3. If a shell installer is unavoidable: - Pin the download URL to an immutable, reviewed release or commit. - Download the script to a local file instead of piping it directly into a shell. - Publish and verify a SHA-256 checksum or cryptographic signature. - Require inspection of the downloaded script before execution. - Execute it with the least-privileged account required for installation. 4. Document the files, directories, network destinations, and configuration changes made by the installer. 5. Avoid requesting administrative privileges unless a specific installation operation requires them. ]]>

T03 · Remote Payload Retrieval and Execution

Error
Location
setup/SKILL.md:19
Finding
Setup Skill Executes a Mutable Remote Installer Without Integrity Verification<![CDATA[ ## Vulnerability Details **File Location**: `setup/SKILL.md:19` **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```bash curl -fsSL https://raw.githubusercontent.com/CaseMark/homebrew-casedev/main/install.sh | sh ``` ### Technical Analysis The setup Skill instructs the agent or user to fetch a shell script from a mutable GitHub repository location and execute the response immediately. No immutable version, checksum, signature, or review step establishes that the received script is the intended installer. Because execution occurs directly from the network response, the effective payload is controlled outside the audited Skill package and may change at any time. Repository or maintainer compromise could therefore transform a legitimate-looking installation step into arbitrary local code execution. The remote installer was not present in the audited project and its current contents were not assessed. The vulnerability is the trust and execution pattern itself. ### Attack Path 1. A user invokes the setup workflow to install the case.dev CLI. 2. The shell executes the documented `curl` pipeline. 3. `curl` retrieves the latest content from the referenced repository path. 4. A compromised remote source supplies a modified installer containing attacker-selected commands. 5. The pipeline sends those commands directly to `sh`. 6. The payload executes locally with the invoking user's permissions before the user can inspect it. ### Impact Assessment Exploitation can yield arbitrary command execution within the invoking account's privilege boundary. Potentially exposed resources include readable local files, case documents, configuration data, environment-based `CASE_API_KEY` credentials, and other secrets accessible to that account. The payload could also modify user-owned executables or configuration and retrieve additional code. Administrative impact would require the command to be run with el ...[truncated 284 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Delete the direct remote-script execution example from the setup instructions. 2. Make the package-manager installation route the recommended default. 3. If Linux support requires a standalone installer, distribute a versioned release artifact from a controlled release channel. 4. Pin the artifact to a specific version and provide a published checksum or cryptographic signature. 5. Replace the pipeline with separate download, verification, inspection, and execution steps. 6. State the installer's required permissions and prohibit elevated execution unless it is demonstrably necessary. 7. Add release provenance or software-bill-of-materials information so users can validate the installer and resulting binary. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (13)

Chaining Abuse

High
Category
Tool Misuse
Content
brew install casemark/casedev/casedev

# Or via shell script
curl -fsSL https://raw.githubusercontent.com/CaseMark/homebrew-casedev/main/install.sh | sh

# Authenticate
export CASE_API_KEY=sk_case_YOUR_KEY
Confidence
98% confidence
Finding
Piping downloaded content directly into sh creates a classic command-execution chain with no opportunity for review or validation. In the context of a setup skill that users are likely to copy-paste, this materially increases the chance of silent compromise if the upstream script is ever malicious or tampered with.

Chaining Abuse

High
Category
Tool Misuse
Content
brew install casemark/casedev/casedev

# macOS + Linux (shell script)
curl -fsSL https://raw.githubusercontent.com/CaseMark/homebrew-casedev/main/install.sh | sh
```

Verify: `casedev --version`
Confidence
99% confidence
Finding
The '| sh' chain causes unreviewed remote content to be executed immediately, removing any opportunity for inspection or policy enforcement. In this skill's setup context, users are explicitly encouraged to run installation commands, which makes the chaining pattern more dangerous because it is likely to be copied verbatim on systems holding API keys and legal data.

Vague Triggers

Medium
Confidence
89% confidence
Finding
The description says to use the skill when the user 'mentions case.dev, casedev, or needs legal AI tools for document processing, transcription, or research.' The latter condition is broad and overlaps with many generic legal-assistance requests, without clear boundaries or exclusion conditions, which could cause unintended invocation.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The quick start instructs users to execute a remote shell script directly via curl piped to sh, without any integrity verification, pinning, or warning. This is dangerous because a compromised GitHub repository, network path, or modified install script would result in immediate arbitrary code execution on the user's system.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill instructs users to submit document URLs to an external OCR service but does not warn that document contents may be transmitted to and processed by a third-party platform. In a legal-document context, this omission is significant because files may contain privileged, confidential, or regulated data, and users may not realize they are initiating remote processing.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The vault workflow explicitly uploads a local file and notes automatic ingestion plus OCR, but it does not disclose the security and privacy consequence that the file is stored remotely and processed outside the local environment. Because this skill targets legal workflows, the missing warning increases the risk of accidental disclosure of privileged case materials, PII, or client records.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The trigger description is unusually broad and includes generic terms like "search", "webfetch", and "legal skills", which can cause the skill to activate in contexts unrelated to case.dev or legal research. In an agent system, unintended activation can route user data or actions to this skill unnecessarily, increasing the chance of inappropriate external lookups, confusing behavior, or privacy-impacting requests.

Missing User Warnings

Medium
Confidence
99% confidence
Finding
The installation instructions tell users to pipe a remotely fetched script directly into sh, which executes network-delivered code without inspection, signature verification, or checksum validation. If the source repository, transport, or dependency chain is compromised, this becomes an immediate remote code execution path on the user's machine or agent host.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill recommends persisting an API key in a local config file without warning about long-lived credential storage, file permissions, shared hosts, or shell history exposure. In an agent setting, this increases the chance that sensitive credentials remain on disk and are later read by other local users, processes, backups, or logs.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The workflow instructs users to upload deposition or hearing audio to a remote case.dev vault and process it through a cloud transcription service, but it does not warn that potentially sensitive legal recordings will leave the local environment. In the legal context, these files may contain privileged, confidential, or regulated information, so omission of an explicit external-transmission notice can cause users to disclose sensitive data without informed consent or appropriate authorization.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill instructs users to upload files and directories to a remote case.dev vault service but does not clearly warn that potentially sensitive legal documents will leave the local environment and be transmitted to an external system. In a legal workflow context, this omission is significant because users may upload privileged, confidential, or regulated material without informed consent or proper authorization checks.

External Script Fetching

Low
Category
Supply Chain
Content
brew install casemark/casedev/casedev

# Or via shell script
curl -fsSL https://raw.githubusercontent.com/CaseMark/homebrew-casedev/main/install.sh | sh

# Authenticate
export CASE_API_KEY=sk_case_YOUR_KEY
Confidence
95% confidence
Finding
This line fetches executable content from an external URL at runtime, creating a trust boundary violation. Because the fetched content is not authenticated beyond transport and is not verified for integrity, an attacker who can alter the source or delivery path can supply malicious code for execution.

External Script Fetching

Low
Category
Supply Chain
Content
brew install casemark/casedev/casedev

# macOS + Linux (shell script)
curl -fsSL https://raw.githubusercontent.com/CaseMark/homebrew-casedev/main/install.sh | sh
```

Verify: `casedev --version`
Confidence
97% confidence
Finding
The skill fetches an external script from GitHub at runtime, introducing trust in mutable third-party content outside the local package. Even if the author intended a standard installer flow, external script fetching increases supply-chain risk because the fetched content can change independently of the skill.

Static analysis

No suspicious patterns detected.