Back to skill

Security audit

Capacitor

Security checks for vulnerabilities and agentic risk

Overview

This Capacitor reference skill is coherent, but it documents high-impact cloud deployment workflows with unpinned npx commands and command-line token handling that users should review carefully.

Install only if you are comfortable with a Capacitor/Capawesome workflow that can install packages, authenticate to cloud services, upload live updates, trigger native builds, and create deployments. Pin CLI versions where possible, use least-privileged short-lived tokens, avoid putting tokens directly on command lines, and run release commands only from isolated environments with explicit user approval.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:392
Finding
Execution of Unpinned Third-Party CLI Packages via npx## Vulnerability Details **File Location**: `SKILL.md`, lines 392-395 **Vulnerability Type**: Supply-chain exposure through unpinned executable dependencies **Risk Level**: Medium ### Vulnerable Code ```bash # Install and authenticate npx @capawesome/cli login # Create an app npx @capawesome/cli apps:create ``` Similar unpinned executions occur at lines 427, 436, 439, 448, 451, and 459-460. ### Technical Analysis The Skill instructs users to execute `@capawesome/cli` directly with `npx` without specifying an audited version or requiring installation through a committed lockfile. Depending on the local npm configuration and package availability, `npx` may download and execute the currently resolved package release from the npm registry. This creates a mutable execution path: the code executed when a user follows the Skill can differ from the code that existed when the Skill was audited. Compromise of the package publisher, npm account, package release process, or transitive dependency chain could therefore introduce arbitrary code into the workflow. The Capawesome Cloud operations are consistent with the Skill's declared functionality. However, dynamically resolving executable dependencies is not the minimum-risk implementation because reproducible, integrity-controlled installation is available. ### Attack Path 1. An attacker compromises the npm package publisher, release pipeline, or a dependency used by `@capawesome/cli`. 2. The attacker publishes a modified package version containing malicious lifecycle or runtime code. 3. A user follows the Skill and executes an unversioned `npx @capawesome/cli ...` command. 4. `npx` resolves and downloads the compromised release. 5. The package executes with the privileges of the invoking user or CI runner. 6. The malicious code reads accessible source files, environment variables, npm credentials, cloud tokens, signing material, or build artifacts and may transmit them ...[truncated 707 chars]
Remediation
## Remediation Suggestions 1. Pin the CLI to a reviewed exact version, for example `npx @capawesome/cli@X.Y.Z`, and document the approved version. 2. Prefer declaring the CLI in `devDependencies`, committing the package lockfile, and installing dependencies with `npm ci`. 3. Run package operations with lifecycle scripts disabled where compatible, then explicitly execute only required tooling. 4. Verify package provenance, checksums, signatures, and publisher identity before updating the approved version. 5. Use automated dependency scanning and require review for lockfile or CLI-version changes. 6. Execute cloud tooling in an isolated, least-privileged environment with access only to the files and secrets required for the selected operation. 7. Require explicit user confirmation before authentication, artifact upload, native builds, OTA updates, or store deployment.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:456
Finding
Cloud Authentication Token Passed Through Command-Line Arguments## Vulnerability Details **File Location**: `SKILL.md`, lines 456-460 **Vulnerability Type**: Sensitive credential exposure through command-line arguments **Risk Level**: Medium ### Vulnerable Code ```bash npx @capawesome/cli login --token <TOKEN> npx @capawesome/cli apps:builds:create --app-id <APP_ID> --platform ios --detached ``` ### Technical Analysis The documented CI/CD authentication workflow passes a cloud access token directly as a command-line argument. After placeholder substitution, the secret may become visible in shell history, CI command traces, process listings, diagnostic output, job metadata, or copied terminal logs. On systems where process arguments are visible to other users or monitoring agents, the token may be captured while the command is running. In CI systems, shell tracing or insufficient masking can preserve the expanded argument in retained logs. The network transmission itself is necessary for the declared Capawesome Cloud functionality and is directed to the disclosed service; the issue is the unsafe local handling of the credential before and during authentication. ### Attack Path 1. A user or CI job expands `<TOKEN>` into a valid Capawesome Cloud token. 2. The resulting command is recorded in shell history, echoed into CI logs, or exposed through process inspection. 3. Another local user, CI log reader, compromised monitoring integration, or attacker with access to retained logs obtains the token. 4. The attacker authenticates to Capawesome Cloud using the disclosed credential. 5. The attacker performs operations permitted by the token, potentially including inspecting applications, initiating builds, uploading live updates, or creating deployments. ### Impact Assessment The obtainable privileges are bounded by the token's assigned permissions and the affected Capawesome Cloud account. A broadly scoped token could expose application metadata and build workflows or ...[truncated 442 chars]
Remediation
## Remediation Suggestions 1. Replace command-line token arguments with the CLI's supported environment-variable, standard-input, credential-file, or secret-store authentication mechanism. 2. Inject the credential from a masked CI secret and prevent it from being written to generated scripts or configuration files. 3. Disable shell tracing, such as `set -x`, around authentication commands and verify that the CI platform masks transformed and encoded forms of the token. 4. Use short-lived, narrowly scoped tokens restricted to the required application, environment, and operation. 5. Separate build, OTA-update, and production-deployment credentials so compromise of one token does not grant all cloud privileges. 6. Restrict access to CI logs and job metadata, define short retention periods, and audit secret access. 7. Rotate any token suspected of appearing in command history, logs, process telemetry, or diagnostic output.
Vulnerability Patterns
  • 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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (63)

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.

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.

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.