Back to skill

Security audit

Web To Apk Research

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent web-to-Android app build guide, with some normal supply-chain cautions around unpinned npm tooling.

Before installing, understand that this is guidance for creating PWA or APK builds. If you follow the Capacitor path, pin npm dependencies, commit a lockfile, use npm ci, avoid dynamic npx downloads where possible, and run CI with minimal permissions and secrets.

Vulnerability Patterns
  • 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
  • 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 (1)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:54
Finding

Unpinned npm Packages Are Executed During Android Project Setup

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:54; duplicated guidance in references/options-analysis.md:35-36
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: Medium

Vulnerable code in SKILL.md:

sh
npm init @capacitor/app

Related code in references/options-analysis.md:

sh
npm init @capacitor/app
npx cap add android

Technical Analysis

The skill directs users to execute npm-distributed command-line tools without specifying exact, reviewed package versions or requiring integrity verification. Package resolution can therefore change after the skill has been audited.

npm init @capacitor/app resolves and executes the initializer package selected by the npm registry. The subsequent npx cap add android command can also resolve executable code from the project dependencies or, depending on the project state and npm behavior, obtain a package through the configured registry. npm package installation and execution may run package code and lifecycle scripts with the invoking user's privileges.

This is a supply-chain weakness rather than evidence that the current Capacitor package is malicious. Exploitation requires compromise or substitution of a resolved package, one of its transitive dependencies, the package registry, or the user's registry configuration.

Attack Path

  1. An attacker compromises a package or transitive dependency resolved by the unpinned command, or causes the environment to use an attacker-controlled registry or package version.
  2. A user follows the skill and runs npm init @capacitor/app or npx cap add android.
  3. npm resolves the package at execution time without an exact reviewed version and integrity baseline.
  4. The malicious package code or lifecycle script executes under the user's account.
  5. The payload can inspect or modify files accessible to that account, alter generated Android sources, collect locally avai ...[truncated 766 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin the initializer and Capacitor CLI to exact versions that have been reviewed, rather than relying on the registry's current default version.
  2. Generate and commit package-lock.json, review dependency changes, and use npm ci for reproducible installation.
  3. Invoke the locally installed, lockfile-controlled Capacitor CLI instead of allowing npx to download an absent package dynamically. Use an option such as npx --no-install cap add android where supported.
  4. Configure npm to use an explicitly trusted registry and retain integrity hashes in the lockfile.
  5. Enable automated dependency scanning, package provenance checks, and lockfile review in pull requests.
  6. Run setup and build commands in an isolated, least-privileged environment without unrelated credentials.
  7. In CI, expose only the minimum required token permissions and secrets, and pin third-party GitHub Actions to immutable commit SHAs.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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
Findings (5)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger phrases are broad and include generic requests like 'PWA' or 'jadikan web jadi aplikasi' without exclusion criteria, which can cause the skill to activate in contexts where it is not the best or safest fit. In an agent environment, unintended invocation can lead to overconfident guidance, unnecessary CI/build actions, or bypass of more appropriate specialized skills.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

The skill instructs use of npx cap without pinning an exact package version, which can cause execution of whatever version is currently resolved from the registry at runtime. In an agent skill context, this creates a supply-chain risk: behavior can change unexpectedly, and a compromised or malicious upstream release could be pulled into the workflow without review.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The GitHub Actions workflow runs npx cap sync android without ensuring the CLI version is pinned and already present in the repository. In CI, this can fetch or resolve a mutable upstream tool version, making builds non-reproducible and exposing the workflow to supply-chain compromise if the package or a dependency is hijacked.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The document presents the 'Questions to Ask the User' in Indonesian even though the rest of the file is in English, which effectively imposes a language choice on the interaction. This can violate language/locale policy when no user opt-in or justification for the locale is provided.

Content

No source excerpt is available for this finding.