Back to skill

Security audit

Cypress Agent Skill

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly Cypress testing guidance, but its install docs include unverified remote code execution and unpinned CLI execution that users should review before installing.

Review the install instructions before use. Prefer ClawHub or a reviewed git clone over the curl-to-bash installer, avoid unpinned npx -y commands, and only copy database reset, secret, payment, and CI artifact examples into isolated test environments with explicit non-production checks.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T03 · Remote Payload Retrieval and Execution

Error
Location
README.md:59
Finding
Mutable Remote Shell Script Is Downloaded and Executed Without Verification<![CDATA[ ## Vulnerability Details **File Location**: `README.md`, lines 59–66 **Vulnerability Type**: Remote payload retrieval and execution **Risk Level**: Critical ### Vulnerable Code ```bash ### One-liner bash installer ```bash # Detects platform automatically bash <(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/cypress-agent-skill/main/install.sh) # Or with explicit agent bash <(curl -fsSL https://raw.githubusercontent.com/YOUR_USERNAME/cypress-agent-skill/main/install.sh) --agent open-claw ``` ``` ### Technical Analysis The documented installation commands use shell process substitution to retrieve content from an external URL and pass it directly to `bash`. The payload is taken from a mutable `main` branch, is not pinned to an immutable commit, and is not protected by a checksum or cryptographic signature. The referenced `install.sh` is not present in the audited artifact, despite being listed in the README repository structure. Consequently, its behavior cannot be statically reviewed. The effective payload may also change after this Skill has been reviewed. The `YOUR_USERNAME` placeholder does not remove the vulnerability. If users replace it as instructed, or if a distributed version contains a valid account, whoever controls that repository can alter the script subsequently. Direct repository-cloning instructions are already provided, so immediate execution of a remotely hosted installer is not necessary for the Skill’s stated Cypress documentation functionality. ### Attack Path 1. A user substitutes a repository owner for `YOUR_USERNAME` and runs the documented command. 2. `curl` retrieves the current `install.sh` from the mutable `main` branch. 3. Shell process substitution supplies the downloaded content directly to `bash`. 4. A malicious repository owner, compromised account, or attacker with repository write access modifies `install.sh`. 5. The modified script executes under the installing user’s account without prior inspect ...[truncated 910 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the `bash <(curl ...)` installation method and retain the documented `git clone` or trusted registry installation methods. 2. Add `install.sh` to the audited repository if an installer is genuinely required. 3. Instruct users to download and inspect the script before running it rather than executing network content directly. 4. Pin downloads to an immutable reviewed commit instead of `main`. 5. Publish a SHA-256 digest or cryptographic signature through an independent trusted channel and verify it before execution. 6. Ensure the installer operates without elevated privileges and limits writes to the selected Skill directory. 7. Add automated release controls that verify the installer included in a release is byte-for-byte identical to the reviewed source. A safer pattern would be: ```bash curl -fL -o install.sh \ https://raw.githubusercontent.com/OWNER/cypress-agent-skill/IMMUTABLE_COMMIT/install.sh echo "EXPECTED_SHA256 install.sh" | sha256sum --check - less install.sh bash install.sh --agent open-claw ``` The immutable commit and expected digest must be replaced with reviewed, trusted values. ]]>

T08 · Insecure Dependencies

Warning
Location
README.md:69
Finding
Unpinned Third-Party CLI Is Automatically Downloaded and Executed<![CDATA[ ## Vulnerability Details **File Location**: `README.md`, lines 69–71 **Vulnerability Type**: Insecure third-party dependency execution **Risk Level**: Medium ### Vulnerable Code ```bash ### LobeHub CLI ```bash npx -y @lobehub/market-cli register --name "YourAgent" --source open-claw npx -y @lobehub/market-cli skills install cypress-expert --agent open-claw ``` ``` ### Technical Analysis The commands invoke `npx` with an unpinned package name and the `-y` option. This allows npm to resolve and download the current package version and execute its code automatically without interactive confirmation. Because no exact version, lockfile, or integrity value is supplied, the code executed by users can differ from the version originally reviewed. Relevant compromise scenarios include a malicious future release, package-owner account compromise, package ownership transfer, or registry compromise. The CLI registration workflow is optional distribution functionality rather than a minimum requirement for providing Cypress testing guidance. It therefore expands the Skill’s supply-chain exposure beyond what is necessary for its core declared purpose. ### Attack Path 1. An attacker obtains permission to publish a new release of `@lobehub/market-cli`, or otherwise compromises its distribution channel. 2. The attacker publishes a release containing malicious CLI or lifecycle code. 3. A user runs one of the unpinned `npx -y` commands from the README. 4. npm resolves the compromised release because no exact version is specified. 5. `npx` downloads and executes the package without asking the user to approve the resolved version. 6. The malicious package operates with the invoking user’s permissions and can access local developer resources available to that account. ### Impact Assessment Successful exploitation could result in arbitrary code execution under the current user account. Potentially exposed resources include: - Project source code and configuration. - ...[truncated 388 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the CLI to an exact reviewed version, such as `@lobehub/market-cli@X.Y.Z`. 2. Remove `-y` so users can review package-resolution and installation prompts. 3. Prefer adding the CLI as a development dependency governed by a committed lockfile and then invoking the locally installed binary. 4. Verify the package’s registry provenance, maintainers, release signatures, and published integrity metadata. 5. Use dependency scanning and automated update review before changing the pinned version. 6. Clearly label the LobeHub workflow as optional and direct users to a trusted native registry installation method where possible. 7. Avoid running package-manager commands with administrative privileges. A safer project-managed approach is: ```bash npm install --save-dev --save-exact @lobehub/market-cli@X.Y.Z npx --no-install market-cli register --name "YourAgent" --source open-claw npx --no-install market-cli skills install cypress-expert --agent open-claw ``` The version must be replaced with a specifically reviewed release, and the generated lockfile should be committed and integrity-checked. ]]>
Vulnerability Patterns
  • 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
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (56)

Memory Manipulation

High
Category
Memory Poisoning
Content
cy.wait('@getResults')
cy.get('[data-testid="result"]').should('have.length.greaterThan', 0)

// Test isolation — reset state between tests
beforeEach(() => {
  cy.clearAllCookies()
  cy.clearAllLocalStorage()
Confidence
80% confidence
Finding
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Ae1

High
Category
analysis-evasion
Content
- `custom-commands.js` — Custom command library
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Missing User Warnings

High
Confidence
96% confidence
Finding
The examples include `resetDatabase()` and truncation/seeding operations with no cautionary language, making destructive database actions appear routine and safe to copy. In an agent skill, that is especially risky because automation may apply the pattern in the wrong environment, causing irreversible data loss in shared or production databases.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The README promotes `bash <(curl -fsSL ...)`, which downloads and immediately executes a remote shell script with no warning, review step, or integrity verification. This is dangerous because any compromise of the GitHub account, repository, branch, DNS/TLS trust chain, or the script itself results in arbitrary code execution on the user's machine.

Rp1

Medium
Category
MCP Rug Pull
Confidence
88% confidence
Finding
The README instructs users to run `npx -y @lobehub/market-cli` without pinning a specific version, which causes execution of whatever package version is current at install time. If the package is compromised, unpublished/replaced, or a malicious update is released, users may execute attacker-controlled code during skill installation.

Rp1

Medium
Category
MCP Rug Pull
Confidence
88% confidence
Finding
This second `npx -y @lobehub/market-cli` invocation has the same supply-chain risk: it fetches and runs an unpinned package directly from the registry. In a skill README, such copy-paste commands are especially risky because users and agents may execute them verbatim with little scrutiny.

Lp3

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding
Without declared permissions the skill's intent is opaque and cannot be validated.

Intent-Code Divergence

Medium
Confidence
95% confidence
Finding
This section presents non-standard or incorrect Cypress APIs such as `cy.env()` and `Cypress.expose()` as required replacements for `Cypress.env()`, which can mislead users into breaking authentication and secret-handling logic. In a security-sensitive area like credentials and environment variables, inaccurate guidance can cause teams to implement unsafe workarounds, leak secrets into browser state, or disable expected controls while troubleshooting.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The `cypress.env.json` example contains realistic secret placeholders and only briefly says to gitignore the file, without strongly warning against committing real secrets or demonstrating safer secret injection patterns. In practice, users often copy documentation verbatim, so this can lead to plaintext credentials being stored in repos, shared in forks, or exposed in CI artifacts.

Intent-Code Divergence

Medium
Confidence
93% confidence
Finding
The skill describes `cy.prompt()` and self-healing natural-language execution as if they are standard Cypress features, which can cause users or downstream agents to rely on nonexistent behavior for test generation or interaction. In an agent context, fabricated capabilities are risky because they can prompt unsafe automation assumptions, conceal failures, or encourage blind trust in intent-based execution rather than explicit selectors and assertions.

Missing User Warnings

Medium
Confidence
87% confidence
Finding
This code accesses a sensitive environment variable, `TEST_SECRET`, and sends it over HTTP in the `x-test-secret` header for both seed and reset operations. Although the operations are commented as API seeding/reset helpers, there is no visible confirmation, logging, or explicit warning in this file that a credential is being used and transmitted.

Missing User Warnings

Medium
Confidence
84% confidence
Finding
`resetDatabase` triggers a `/test/reset` API call, which is a destructive and potentially irreversible action. The brief comment identifies the action but does not provide a real safety warning, confirmation step, or user-facing disclosure about impact or environment constraints.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
This code file handles payment card number and CVV inputs directly, but unlike the password field earlier in the file, it provides no masking option, user-facing notice, or comment explaining that sensitive payment data is being entered. For code-file warning checks, access to sensitive data should have some visible disclosure unless clearly documented as expected behaviour, and this section lacks that context.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The CI examples automatically upload Cypress screenshots and videos as artifacts without warning that these files can contain sensitive information such as user data, tokens shown in the UI, internal URLs, or test-environment business data. In a production-grade testing skill, this omission is more dangerous because users are likely to copy the workflow directly into real CI systems where artifacts may be broadly accessible or retained for long periods.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding
Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Static analysis

No suspicious patterns detected.