Back to skill

Security audit

Capacitor App Development

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent Capacitor documentation, but some copyable CI and configuration examples handle deployment credentials and release settings in ways users should review before installing.

Review the CI/CD and app-configuration references before installing. Prefer pinned, lockfile-controlled CLI execution in CI, avoid passing deployment tokens as command-line arguments when the CLI supports safer auth, scope and rotate CI tokens, and do not copy debug WebView settings or signing passwords into production configuration.

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

T08 · Insecure Dependencies

Warning
Location
references/ci-cd.md:72
Finding

Unpinned Third-Party Package Execution in CI/CD

Content
View full analysis

Vulnerability Details

File Location: references/ci-cd.md, lines 72-78
Vulnerability Type: Supply-chain exposure through unpinned executable packages
Risk Level: Medium

Vulnerable Code

bash
npm ci
npm run build
npx @capawesome/cli login --token $CAPAWESOME_TOKEN
npx @capawesome/cli apps:bundles:create --app-id $APP_ID --path dist/

Technical Analysis

The instructions execute @capawesome/cli through npx without specifying an exact audited version or requiring an already installed, lockfile-controlled copy. If the package is absent locally, npx may retrieve and execute the version currently resolved from the configured package registry.

This creates a supply-chain boundary in a sensitive CI environment. A compromised package release, registry account, dependency tree, or package-resolution configuration could cause arbitrary package or lifecycle code to execute. The same CI job is expected to have access to CAPAWESOME_TOKEN, application identifiers, build outputs, and potentially mobile signing material.

Related unpinned executable guidance also appears at references/ci-cd.md:111-114:

bash
npx @trapezedev/configure run trapeze.yaml --diff

Attack Path

  1. An attacker compromises the publisher, registry entry, or dependency chain of an unpinned package.
  2. A malicious package version is published or returned by the configured package registry.
  3. The CI runner invokes the package through npx without enforcing an audited version.
  4. npx downloads and executes the malicious package in the CI job.
  5. The package reads available environment variables, build outputs, source files, signing assets, or CI credentials.
  6. The attacker exfiltrates those assets or modifies the generated mobile application or deployment bundle.

Impact Assessment

Successful exploitation provides code execution with the privileges of the developer account or CI runner. In CI, t ...[truncated 371 chars]

Remediation
View remediation

Remediation Suggestions

  1. Add required CLI packages to devDependencies using exact, reviewed versions.

  2. Commit the package lockfile and install dependencies using npm ci.

  3. Invoke only the lockfile-installed binary, such as:

    bash
    npx --no-install @capawesome/cli login
    npx --no-install @capawesome/cli apps:bundles:create --app-id "$APP_ID" --path dist/
    npx --no-install @trapezedev/configure run trapeze.yaml --diff
    
  4. Use automated dependency review, registry allowlists, integrity checks, and package provenance verification.

  5. Isolate build jobs from publishing jobs and expose deployment credentials only to the job that requires them.

  6. Use short-lived, least-privileged CI credentials and restrict outbound network access where practical.

T09 · Insecure Skill Coding Practices

Warning
Location
references/ci-cd.md:77
Finding

Cloud Authentication Token Exposed Through Process Arguments

Content
View full analysis

Vulnerability Details

File Location: references/ci-cd.md, line 77
Vulnerability Type: Sensitive credential passed as a command-line argument
Risk Level: Medium

Vulnerable Code

bash
npx @capawesome/cli login --token $CAPAWESOME_TOKEN

Technical Analysis

The shell expands CAPAWESOME_TOKEN before launching the CLI, placing the resulting secret in the child process argument vector. Depending on the operating system, runner configuration, and process isolation, command-line arguments can be visible through process inspection, diagnostic collection, audit telemetry, crash reports, or verbose shell tracing.

CI masking commonly protects recognized values in ordinary logs but does not guarantee protection in process listings, debug traces, third-party telemetry, or artifacts generated by other tools on the runner.

Attack Path

  1. The CI platform injects CAPAWESOME_TOKEN into the job environment.
  2. The shell expands the variable into the --token argument.
  3. The plaintext token appears in the process argument vector.
  4. A co-resident process, diagnostic tool, enabled shell trace, or improperly protected runner log records the argument.
  5. An attacker obtains the recorded token and reuses it against the associated cloud service.
  6. The attacker performs any action authorized to that token, subject to its configured permissions.

Impact Assessment

Exploitation may expose the Capawesome Cloud authentication token. An attacker could obtain the cloud permissions granted to that token, potentially including access to application records, bundle uploads, live-update resources, or related deployment operations.

This does not inherently grant operating-system privilege escalation. Its scope is limited to the cloud account permissions assigned to the leaked token and the lifetime of that credential.

Remediation
View remediation

Remediation Suggestions

  1. Prefer a CLI-supported environment-variable, standard input, credential file, workload identity, or short-lived token mechanism that does not place the secret in the argument vector.
  2. If command-line token use is unavoidable, use an isolated ephemeral runner and prevent untrusted processes from sharing the host.
  3. Disable shell tracing before handling secrets and verify that CI log masking is configured.
  4. Assign the token only the minimum permissions necessary for the specific job.
  5. Separate build and deployment stages so build tooling cannot access publishing credentials.
  6. Rotate tokens regularly and immediately revoke any token suspected of appearing in logs, diagnostics, or process telemetry.

T09 · Insecure Skill Coding Practices

Warning
Location
references/app-configuration.md:92
Finding

Production-Like Configuration Example Enables Debugging and Encourages Embedded Signing Credentials

Content
View full analysis

Vulnerability Details

File Location: references/app-configuration.md, lines 92-110
Vulnerability Type: Unsafe production configuration and credential-handling example
Risk Level: Medium

Vulnerable Code

typescript
const config: CapacitorConfig = {
  android: {
    path: 'android',                      // Path to the Android project
    buildOptions: {
      releaseType: 'AAB',                 // 'AAB' or 'APK'
      signingType: 'apksigner',
      keystorePath: '/path/to/keystore',
      keystorePassword: 'password',
      keystoreAlias: 'alias',
      keystoreAliasPassword: 'password',
    },
    flavor: 'production',                 // Default flavor
    allowMixedContent: false,             // Allow HTTP content in HTTPS WebView
    backgroundColor: '#ffffff',           // WebView background color
    loggingBehavior: 'debug',             // Logging level: 'none', 'debug', 'production'
    webContentsDebuggingEnabled: true,    // Enable Chrome DevTools for WebView (debug only)
  },
};

Technical Analysis

The password values are illustrative placeholders rather than exposed real credentials. However, the copyable example places signing-password fields directly in source configuration and combines a production flavor and release bundle type with debug logging and WebView debugging.

The comment states that WebView debugging is intended for debug builds, but the example does not enforce that restriction through an environment condition. A developer who copies the configuration and replaces the placeholders with real values may commit signing credentials to version control. A production build created from the example may also retain debugging capabilities or verbose logging.

WebView debugging can expose DOM content, JavaScript state, storage, network activity, and application behavior to an actor who has suitable access to the device and debugging interface. Verbose logging ...[truncated 1624 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove signing passwords from copyable source-code examples.

  2. Load signing credentials from protected CI secret storage or another secure runtime source that is excluded from version control.

  3. Use separate debug and production configurations with explicit secure production defaults.

  4. Enforce settings conditionally, for example:

    typescript
    const isDevelopment = process.env.NODE_ENV === 'development';
    
    const config: CapacitorConfig = {
      android: {
        flavor: isDevelopment ? 'development' : 'production',
        loggingBehavior: isDevelopment ? 'debug' : 'none',
        webContentsDebuggingEnabled: isDevelopment,
        allowMixedContent: false,
      },
    };
    
  5. Add a CI release check that rejects production builds when WebView debugging, cleartext traffic, mixed content, or debug logging is enabled.

  6. Scan repositories and build artifacts for keystore passwords and other signing secrets.

  7. Rotate any signing password that has previously been committed or exposed, and assess whether the associated keystore must also be replaced.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Rogue AgentSelf-Modification, Session Persistence
Findings (117)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/troubleshooting-android.md (reported line 17)May include surrounding context.

md
- Capacitor 8: JDK 21.
   Check: `java -version`. In Android Studio: File > Settings > Build, Execution, Deployment > Build Tools > Gradle > Gradle JDK.
2. Invalidate caches: File > Invalidate Caches in Android Studio.
3. Delete `.gradle` cache: `rm -rf ~/.gradle/caches && rm -rf android/.gradle`.
4. Check that `android/variables.gradle` has the correct SDK and tool versions.

### `compileSdkVersion` or `targetSdkVersion` Errors

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/troubleshooting-ios.md (reported line 62)May include surrounding context.

md
- Capacitor 8: JDK 21.
   Check: `java -version`. In Android Studio: File > Settings > Build, Execution, Deployment > Build Tools > Gradle > Gradle JDK.
2. Invalidate caches: File > Invalidate Caches in Android Studio.
3. Delete `.gradle` cache: `rm -rf ~/.gradle/caches && rm -rf android/.gradle`.
4. Check that `android/variables.gradle` has the correct SDK and tool versions.

### `compileSdkVersion` or `targetSdkVersion` Errors

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/troubleshooting-android.md (reported line 17)May include surrounding context.

md
- Capacitor 8: JDK 21.
   Check: `java -version`. In Android Studio: File > Settings > Build, Execution, Deployment > Build Tools > Gradle > Gradle JDK.
2. Invalidate caches: File > Invalidate Caches in Android Studio.
3. Delete `.gradle` cache: `rm -rf ~/.gradle/caches && rm -rf android/.gradle`.
4. Check that `android/variables.gradle` has the correct SDK and tool versions.

### `compileSdkVersion` or `targetSdkVersion` Errors

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/troubleshooting-android.md (reported line 17)May include surrounding context.

md
- Capacitor 8: JDK 21.
   Check: `java -version`. In Android Studio: File > Settings > Build, Execution, Deployment > Build Tools > Gradle > Gradle JDK.
2. Invalidate caches: File > Invalidate Caches in Android Studio.
3. Delete `.gradle` cache: `rm -rf ~/.gradle/caches && rm -rf android/.gradle`.
4. Check that `android/variables.gradle` has the correct SDK and tool versions.

### `compileSdkVersion` or `targetSdkVersion` Errors

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · references/troubleshooting-android.md (reported line 17)May include surrounding context.

Solutions:

  1. Delete Podfile.lock and Pods directory, then reinstall with repo update:
    bash
    cd ios/App && rm -rf Pods Podfile.lock && pod install --repo-update
    
  2. Update the CocoaPods spec repo: pod repo update.
  3. Ensure the correct Ruby and CocoaPods versions are installed: pod --version.

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · references/troubleshooting-ios.md (reported line 14)May include surrounding context.

Solutions:

  1. Delete Podfile.lock and Pods directory, then reinstall with repo update:
    bash
    cd ios/App && rm -rf Pods Podfile.lock && pod install --repo-update
    
  2. Update the CocoaPods spec repo: pod repo update.
  3. Ensure the correct Ruby and CocoaPods versions are installed: pod --version.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/troubleshooting-ios.md (reported line 62)May include surrounding context.

md
**Solutions**:
1. In Xcode: File > Packages > Reset Package Caches.
2. In Xcode: File > Packages > Resolve Package Versions.
3. Delete the SPM cache: `rm -rf ~/Library/Caches/org.swift.swiftpm` and `rm -rf ios/App/App.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/`.
4. Close Xcode, run `npx cap sync ios`, then reopen.

### `could not find module 'Capacitor' for target 'x86_64-apple-ios-simulator'`

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/troubleshooting-ios.md (reported line 62)May include surrounding context.

md
**Solutions**:
1. In Xcode: File > Packages > Reset Package Caches.
2. In Xcode: File > Packages > Resolve Package Versions.
3. Delete the SPM cache: `rm -rf ~/Library/Caches/org.swift.swiftpm` and `rm -rf ios/App/App.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/`.
4. Close Xcode, run `npx cap sync ios`, then reopen.

### `could not find module 'Capacitor' for target 'x86_64-apple-ios-simulator'`

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/troubleshooting-ios.md (reported line 62)May include surrounding context.

md
**Solutions**:
1. In Xcode: File > Packages > Reset Package Caches.
2. In Xcode: File > Packages > Resolve Package Versions.
3. Delete the SPM cache: `rm -rf ~/Library/Caches/org.swift.swiftpm` and `rm -rf ios/App/App.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/`.
4. Close Xcode, run `npx cap sync ios`, then reopen.

### `could not find module 'Capacitor' for target 'x86_64-apple-ios-simulator'`

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
80% confidence
Finding

Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

Content

Scanner excerpt · references/troubleshooting-ios.md (reported line 141)May include surrounding context.

md
5. If using CocoaPods: Verify the plugin pod is in `ios/App/Podfile` and run `cd ios/App && pod install`. Ensure no warnings appear during sync.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding

The documentation instructs users to run npx cap without pinning a specific package version. In CI/CD, unpinned npx execution can fetch whatever version is current at build time, which undermines build reproducibility and can expose pipelines to accidental breakage or a supply-chain compromise if the upstream package is tampered with.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding

The iOS build example uses npx cap without version pinning, which allows CI runners to resolve a potentially different CLI version over time. That creates both reproducibility risk and a supply-chain exposure if a malicious or compromised release is served from the package registry.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/ci-cd.md (reported line 61)May include surrounding context.

npm run build npx cap sync ios cd ios/App && xcodebuild -workspace App.xcworkspace -scheme App -configuration Release -archivePath build/App.xcarchive archive cd ios/App && xcodebuild -exportArchive -archivePath build/App.xcarchive -exportOptionsPlist ExportOptions.plist -exportPath build/output

text

iOS builds require:

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/ci-cd.md (reported line 61)May include surrounding context.

npm run build npx cap sync ios cd ios/App && xcodebuild -workspace App.xcworkspace -scheme App -configuration Release -archivePath build/App.xcarchive archive cd ios/App && xcodebuild -exportArchive -archivePath build/App.xcarchive -exportOptionsPlist ExportOptions.plist -exportPath build/output

text

iOS builds require:

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/ci-cd.md (reported line 68)May include surrounding context.

npm run build npx cap sync ios cd ios/App && xcodebuild -workspace App.xcworkspace -scheme App -configuration Release -archivePath build/App.xcarchive archive cd ios/App && xcodebuild -exportArchive -archivePath build/App.xcarchive -exportOptionsPlist ExportOptions.plist -exportPath build/output

text

iOS builds require:

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/deep-links.md (reported line 110)May include surrounding context.

npm run build npx cap sync ios cd ios/App && xcodebuild -workspace App.xcworkspace -scheme App -configuration Release -archivePath build/App.xcarchive archive cd ios/App && xcodebuild -exportArchive -archivePath build/App.xcarchive -exportOptionsPlist ExportOptions.plist -exportPath build/output

text

iOS builds require:

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/deep-links.md (reported line 111)May include surrounding context.

npm run build npx cap sync ios cd ios/App && xcodebuild -workspace App.xcworkspace -scheme App -configuration Release -archivePath build/App.xcarchive archive cd ios/App && xcodebuild -exportArchive -archivePath build/App.xcarchive -exportOptionsPlist ExportOptions.plist -exportPath build/output

text

iOS builds require:

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/deep-links.md (reported line 118)May include surrounding context.

npm run build npx cap sync ios cd ios/App && xcodebuild -workspace App.xcworkspace -scheme App -configuration Release -archivePath build/App.xcarchive archive cd ios/App && xcodebuild -exportArchive -archivePath build/App.xcarchive -exportOptionsPlist ExportOptions.plist -exportPath build/output

text

iOS builds require:

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/troubleshooting-ios.md (reported line 140)May include surrounding context.

npm run build npx cap sync ios cd ios/App && xcodebuild -workspace App.xcworkspace -scheme App -configuration Release -archivePath build/App.xcarchive archive cd ios/App && xcodebuild -exportArchive -archivePath build/App.xcarchive -exportOptionsPlist ExportOptions.plist -exportPath build/output

text

iOS builds require:

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/troubleshooting-ios.md (reported line 189)May include surrounding context.

npm run build npx cap sync ios cd ios/App && xcodebuild -workspace App.xcworkspace -scheme App -configuration Release -archivePath build/App.xcarchive archive cd ios/App && xcodebuild -exportArchive -archivePath build/App.xcarchive -exportOptionsPlist ExportOptions.plist -exportPath build/output

text

iOS builds require:

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

npx @capawesome/cli login --token $CAPAWESOME_TOKEN executes an unpinned package in a CI context where sensitive credentials are present. If a different version is resolved, or if the package supply chain is compromised, the token could be exposed or misused during pipeline execution.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The bundle upload step runs npx @capawesome/cli without an exact version, in a context that handles deployment artifacts and authentication material. Unpinned execution increases the chance of non-reproducible builds and elevates supply-chain risk because a compromised upstream package could access build outputs or secrets.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

The Trapeze configuration command uses npx @trapezedev/configure without version pinning while modifying native build configuration in CI. This can lead to inconsistent outputs and creates a supply-chain attack surface where a malicious package version could alter app identifiers, signing-related settings, or other release configuration.

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.

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.

Static analysis

No suspicious patterns detected.