capacitor-security
БесплатноБез исполняемых скриптовНе проверенApp-level security audit and hardening for Capacitor apps. Use when the user wants a security review, OWASP MASVS check, or pentest fixes; runs the Capgo…
от Cap-go★ 79 звёзд на GitHubОб этом скилле
Capacitor Security
Audit and harden the app layer of a Capacitor app: secrets in the bundle, on-device storage, network transport, WebView and native bridge exposure, and platform manifests.
When to Use
TRIGGER when:
- The user asks for a security audit, OWASP Mobile Top 10 / MASVS review, or wants to fix pentest findings.
- The user wants to run or interpret
@capgo/capgo-sec(capsec) results, rule IDs such asSEC001,STO002,NET003,CAP004,AND004,IOS001. - API keys, service-role keys, or
.envvalues appear insrc/,dist/,www/, orcapacitor.config.*. - Auth tokens are stored with
Preferences.set,localStorage, IndexedDB, or plain SQLite. capacitor.config.*containsserver.cleartext: true,server.url, broadserver.allowNavigation,android.allowMixedContent, orwebContentsDebuggingEnabled: true.- Native files contain
NSAllowsArbitraryLoads,android:usesCleartextTraffic="true",android:allowBackup="true",android:debuggable, or exported components without permissions. - The user needs certificate pinning, a Content Security Policy, screenshot protection, or root/jailbreak detection.
Do not use:
- Xcode build settings, Enhanced Security, pointer authentication, stack/heap hardening ->
capacitor-ios-security-hardening. - Universal Links / App Links setup ->
capacitor-deep-linking(this skill only covers validating incoming URLs). - Privacy manifests, App Review rejections ->
capacitor-apple-review-preflight; store listing ->capacitor-app-store. - Pipeline structure and signing secrets in CI ->
capacitor-ci-cd. - Live update installation and channels ->
capgo-live-updates(this skill covers only bundle encryption). - Runtime crashes and WebView inspection ->
debugging-capacitor.
Workflow
- Inspect before editing. Read
capacitor.config.ts|json,package.json(Capacitor major, installed plugins),android/app/src/main/AndroidManifest.xml,android/app/src/main/res/xml/network_security_config.xml(if any),ios/App/App/Info.plist,*.entitlements, andindex.html. - Scan. Run the Capgo scanner from the project root (Node 18+):
The npm package isnpx @capgo/capgo-sec@latest scan --severity medium@capgo/capgo-sec; it installs acapsecbinary.npx capsecdoes not work because no package namedcapsecexists on npm. - Grep for what scanners miss (see Verification). Build the web app first and also grep
dist/orwww/: bundlers inlineimport.meta.env.*andprocess.env.*values. - Triage and report before invasive changes. Group findings by Critical/High/Medium/Low with file and line. Ask the user before changes that alter behavior: certificate pinning (can lock out users when certs rotate), blocking rooted devices, removing
allowNavigationhosts, a strict CSP. - Fix by area, loading the matching reference below.
- Re-run the scan and Verification checks, then
npx cap syncand test a release build on a device.
Capacitor-specific traps
- Nothing in the bundle is secret. Web assets ship inside the IPA/APK and
capacitor.config.jsonis copied into native assets. Values inplugins.*config (including@capgo/capacitor-env) are extractable. Move secret-bearing calls to a backend. allowNavigationgrants bridge access. On Android, everyallowNavigationentry is added to the bridge's allowed origin rules, so pages from those hosts can call your native plugins. Only list hosts you control. Open third-party pages with@capacitor/browseror@capgo/inappbrowserinstead.server.urlandserver.cleartextare dev-only. Capacitor documents both as "not intended for use in production." A committed LAN IP ships a WebView that loads remote code over HTTP.- Debuggable WebView in release.
ios.webContentsDebuggingEnabled/android.webContentsDebuggingEnableddefault to on only in debug builds. A hardcodedtrueexposes the WebView to Safari /chrome://inspecton any release build. - CapacitorHttp is not pinning.
plugins.CapacitorHttp.enabledonly routesfetch/XHR through native networking. Pinning requires@capgo/capacitor-ssl-pinning, which hooks into CapacitorHttp. - Biometric prompt is not authentication.
verifyIdentity()can be hooked on rooted/jailbroken devices. Keep secrets behindaccessControl(hardware-bound Keychain/Keystore item) and validate sessions server-side. - OAuth via custom schemes needs PKCE. Any app can register
myapp://. Use PKCE and prefer Universal/App Links for redirects. - Live update bundles are public unless encrypted. Private channels limit who receives a bundle. They do not make it confidential.
References
Only load a reference when its topic is in play.
| Reference | Load when |
|---|---|
| references/capsec-scanner.md | Running the scanner, reading rule IDs, CI gating, JSON/HTML reports |
| [references/secrets-and-storag |
Установить capacitor-security в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл capacitor-security?
App-level security audit and hardening for Capacitor apps. Use when the user wants a security review, OWASP MASVS check, or pentest fixes; runs the Capgo scanner (`npx @capgo/capgo-sec scan`, `capsec`, rule IDs like SEC001, NET003, CAP004); finds API keys or `.env` values in the web bundle; stores tokens in `@capacitor/preferences` or `localStorage`; needs Keychain/Keystore storage, certificate pinning, CSP, or root/jailbreak detection; or sees `server.cleartext`, `allowNavigation`, `webContentsDebuggingEnabled`, `NSAllowsArbitraryLoads`, `android:usesCleartextTraffic`, `android:allowBackup`, `net::ERR_CLEARTEXT_NOT_PERMITTED`, or ATS "requires the use of a secure connection" errors. Do not use for Xcode build-setting hardening (use capacitor-ios-security-hardening), deep link setup (capacitor-deep-linking), App Store review (capacitor-apple-review-preflight), CI design (capacitor-ci-cd), or live update setup (capgo-live-updates).
Как установить скилл capacitor-security?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл capacitor-security запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic