gpc-preflight
GPC Preflight Scanner
When to use
Use this skill when the task involves:
- Scanning an AAB or APK file before uploading to Google Play
- Checking target SDK version compliance
- Auditing permissions against Google Play policies
- Verifying 64-bit native library support
- Scanning source code for hardcoded secrets or credentials
- Detecting non-Play billing SDKs
- Checking store listing metadata compliance
- CI/CD quality gates based on policy compliance
Quick reference
# Full scan (AAB or APK)
gpc preflight app.aab
gpc preflight app.apk
# With metadata and source scanning
gpc preflight app.aab --metadata fastlane/metadata/android --source app/src
# Specific scanners only
gpc preflight manifest app.aab
gpc preflight permissions app.aab
gpc preflight metadata ./metadata
gpc preflight codescan ./src
# CI mode
gpc preflight app.aab --fail-on error --json
9 scanners
| Scanner | Checks | Severity |
|---|---|---|
| manifest | targetSdk >= 35, debuggable, testOnly, cleartext, missing exported, FGS types, geofencing foreground service (v0.9.65+) | critical/error/warning |
| permissions | 18 restricted permissions, contacts broad-access, Health Connect granular (v0.9.65+), Data Safety reminders | critical/error/warning/info |
| native-libs | 64-bit ARM compliance, ABI detection | critical/warning |
| metadata | Listing character limits, screenshots, privacy policy URL | error/warning |
| secrets | AWS keys, Google API keys, Stripe keys, private keys | critical/warning |
| billing | Stripe, Braintree, PayPal, Razorpay SDK detection | warning |
| privacy | Tracking SDKs, Advertising ID, data collection cross-reference | warning/info |
| policy | Families/COPPA, financial, health, UGC, overlay | warning/info |
| size | Download size, large native libs, large assets | warning/info |
Configuration (.preflightrc.json)
{
"failOn": "error",
"targetSdkMinimum": 35,
"maxDownloadSizeMb": 150,
"allowedPermissions": ["android.permission.READ_SMS"],
"disabledRules": ["cleartext-traffic"],
"severityOverrides": { "billing-stripe-sdk": "info" }
}
Exit codes
0— all checks passed1— runtime error6— findings at or above--fail-onseverity
Key rules
| Rule ID | Severity | What |
|---|---|---|
| targetSdk-below-minimum | critical | targetSdkVersion < 35 |
| debuggable-true | critical | android:debuggable="true" |
| testOnly-true | critical | android:testOnly="true" |
| missing-arm64 | critical | 32-bit ARM without 64-bit |
| missing-exported | error | Component with intent-filter but no exported attr |
| foreground-service-type-missing | error | Service without foregroundServiceType (API 34+) |
| secret-aws-key | critical | AWS access key in source |
| secret-stripe-key | critical | Stripe secret key in source |
| contacts-permission-broad | warning | READ_CONTACTS / WRITE_CONTACTS (v0.9.65+, April 2026 policy) |
| geofencing-foreground-service | warning | Location FGS + ACCESS_BACKGROUND_LOCATION (v0.9.65+, April 2026 policy) |
| health-connect-granular | warning/info | READ_ALL_HEALTH_DATA; warning on targetSdk >= 36, info otherwise (v0.9.65+, April 2026 policy) |
Procedures
Running a full preflight scan
- Build your AAB or APK:
./gradlew bundleRelease(orassembleReleasefor APK) - Run:
gpc preflight app/build/outputs/bundle/release/app-release.aabOr for APK:gpc preflight app/build/outputs/apk/release/app-release.apk - Fix any critical/error findings
- Add a
.preflightrc.jsonto allow approved permissions or disable false positives - Re-run until clean
Note: After the scan, GPC shows a reminder about Android developer verification requirements (September 30, 2026 enforcement for BR, ID, SG, TH). Run gpc verify for details.
Signing key consistency (v0.9.66+)
gpc preflight signing # Check cert consistency across two most recent bundles
gpc preflight signing --json # JSON output for CI
gpc preflight signing --app com.example.app # Override package name
Compares signing certificates across your two most recent bundle versions via the Play API (generatedApks.list). Requires auth (service account or OAuth). Exit code 6 on mismatch (same as other preflight threshold breaches). Exit code 4 on API errors.
This is NOT an offline scan. It calls the Play API to create an edit, list bundles, fetch generated APKs for the top two version codes, compare certificateSha256Fingerprint, then delete the edit.
April 2026 policy rules (v0.9.65+)
Three rules added for Google Play's April 15, 2026 policy batch. Compliance deadline: May 15, 2026.
-
Contacts broad access (
contacts-permission-broad): Flags READ_CONTACTS / WRITE_CONTACTS. Google now requires the Android Contact Picker instead of broad access. Emits a single finding even when both permissions are present. Suppress viaallowedPermissionsfor dialer/messaging apps. -
Geofencing foreground service (
geofencing-foreground-service): Fires when a service hasforegroundServiceTypecontaining "location" AND the app declaresACCESS_BACKGROUND_LOCATION. Google removed geofencing as an approved foreground service use case. For legitimate background location tracking (navigation, fitness), suppress via"disabledRules": ["geofencing-foreground-service"]. -
Health Connect granular permissions (
health-connect-granular): FlagsREAD_ALL_HEALTH_DATA. Severity iswarningwhentargetSdk >= 36(Android 16 requirement),infootherwise. Replace with granular permissions likehealth.READ_STEPS,health.READ_HEART_RATE, etc.
Adding to CI
# GitHub Actions
- name: Preflight
run: gpc preflight app.aab --fail-on error --json > preflight.json
- name: Upload report
if: always()
uses: actions/upload-artifact@v4
with:
name: preflight-report
path: preflight.json
Related skills
gpc-release-flow— uploading and releasing after preflight passesgpc-ci-integration— CI/CD patterns including preflight gatesgpc-troubleshooting— exit code 6 handlinggpc-security— credential handling and key rotation
More from yasserstudio/gpc-skills
gpc-sdk-usage
Use when building applications that programmatically interact with the Google Play Developer API using GPC's TypeScript SDK packages. Make sure to use this skill whenever the user mentions @gpc-cli/api, @gpc-cli/auth, PlayApiClient, createApiClient, resolveAuth, Google Play API client, TypeScript SDK, programmatic access, API client, HTTP client, rate limiter, pagination, edit lifecycle in code, Node.js Google Play, server-side Play Store, backend integration — even if they don't explicitly say 'SDK.' Also trigger when someone wants to build a backend service, custom dashboard, automation script, or any TypeScript/JavaScript application that interacts with Google Play programmatically rather than through the CLI. For CLI usage, see other gpc-* skills. For building plugins, see gpc-plugin-development.
12gpc-release-flow
Use when uploading, releasing, promoting, or managing rollouts on Google Play. Make sure to use this skill whenever the user mentions gpc releases, upload AAB, upload APK, staged rollout, promote to production, halt rollout, gpc publish, release notes, track management, internal testing, beta release, production rollout, version code, rollout percentage, gpc bundles, bundle list, bundle wait, wait for bundle processing, in-app update priority, retain version codes, versioned changelogs, or wants to ship an Android app to any Play Store track. Also trigger when someone asks about the Google Play edit lifecycle, release validation, or how to do a phased rollout — even if they don't mention GPC by name. For metadata and listings, see gpc-metadata-sync. For CI/CD integration, see gpc-ci-integration.
12gpc-security
Use when dealing with GPC credential security, secret management, audit logging, or access control. Make sure to use this skill whenever the user mentions credentials, service account key, secret rotation, key rotation, credential storage, audit log, audit trail, security best practices, .gpcrc.json security, secrets in CI, GPC_SERVICE_ACCOUNT safety, keychain, token cache, credential leak, key compromise, secure deployment — even if they don't explicitly say 'security.' Also trigger when someone asks about where GPC stores credentials, how to rotate service account keys, how to audit who did what with GPC, how to securely pass credentials in CI/CD, or how to handle a compromised service account key. For auth setup, see gpc-setup. For CI configuration, see gpc-ci-integration.
12gpc-multi-app
Use when managing multiple Google Play apps with GPC. Make sure to use this skill whenever the user mentions multiple apps, multi-app, monorepo, white-label, batch operations, bulk upload, several apps, --app flag, app switching, profiles for different apps, fleet management, app portfolio, multiple package names — even if they don't explicitly say 'multi-app.' Also trigger when someone has more than one Android app and wants to manage them efficiently, when they need different configurations per app, when they're running the same command across multiple apps, or when they have a monorepo with multiple Android modules. For single-app setup, see gpc-setup. For CI automation, see gpc-ci-integration.
11gpc-setup
Use when setting up GPC (Google Play Console CLI): authentication with service accounts, OAuth, or Application Default Credentials; configuration files (.gpcrc.json, env vars, XDG paths); auth profiles; running gpc doctor; troubleshooting auth errors. Make sure to use this skill whenever the user mentions gpc auth, service account setup, gpc config, gpc doctor, GPC_SERVICE_ACCOUNT, gpc auth login, Google Play API credentials, Play Console authentication, gpc setup, gpc setup wizard, one-command onboarding, or wants to install/configure GPC — even if they don't explicitly say 'setup.' Also trigger when someone is troubleshooting auth failures, token expiration, keychain issues, or proxy/network configuration for GPC.
11gpc-monetization
Use when managing in-app purchases, subscriptions, pricing, or Real-Time Developer Notifications in Google Play. Make sure to use this skill whenever the user mentions gpc subscriptions, gpc iap, gpc purchases, gpc pricing, gpc rtdn, in-app products, base plans, subscription offers, one-time products, consumable products, purchase verification, purchase acknowledgement, purchase token, subscription cancellation, subscription deferral, voided purchases, refunds, regional pricing, currency conversion, price migration, SKU management, monetization, revenue, billing, subscription analytics, churn, trial conversion, subscriber count, RTDN, Real-Time Developer Notifications, Pub/Sub notifications, subscription events, purchase events — even if they don't explicitly say 'monetization.' Also trigger when someone wants to create or update subscriptions, manage base plan lifecycle (activate/deactivate), set up introductory offers, verify server-side purchases, handle refunds, convert prices across regions, sync IAP products from files, migrate subscribers to new prices, view subscription analytics, decode Pub/Sub notification payloads, or check RTDN topic configuration. For release management, see gpc-release-flow. For CI automation, see gpc-ci-integration.
11