Credentials and security
StorePilot needs a Google Play service account to talk to the store. Connect Google Play shows how to create one. This page covers how StorePilot finds the key and how it keeps it out of logs.
How StorePilot finds the key
The first one that is set wins:
- The key's JSON content:
serviceAccountJsonin the Gradle DSL, thegoogle-play-service-account-jsonaction input, orSTOREPILOT_GOOGLE_PLAY_SERVICE_ACCOUNT_JSON. - A key file:
serviceAccountFilein the Gradle DSL orSTOREPILOT_GOOGLE_PLAY_SERVICE_ACCOUNT_FILE. - Application Default Credentials, for example from
gcloud auth application-default loginorgoogle-github-actions/auth.
Only service account keys are accepted as JSON or file. Other credential types, such as Workload Identity Federation, go through Application Default Credentials.
Where the key never appears
- Command-line arguments: the action passes the key to the CLI through the environment.
- Logs, the job summary, and
--output json. - Error messages: a key that cannot be read is reported by its source, not its content.
storepilot.ymland the output ofexportStorepilotConfig.- The Gradle build script:
serviceAccountJsononly accepts aProvider<String>, so a string literal does not compile.
In the action, lines of the key that are 16 characters or longer are also masked, in addition to GitHub's own masking of secrets.
Keyless authentication on GitHub Actions
With Workload Identity Federation, GitHub proves the workflow's identity to Google Cloud, and no key is stored at all. google-github-actions/auth sets Application Default Credentials for the steps after it, and StorePilot picks them up:
permissions:
contents: read
id-token: write
steps:
- uses: google-github-actions/auth@v3
with:
workload_identity_provider: projects/123456789/locations/global/workloadIdentityPools/github/providers/github
service_account: play-publisher@example-project.iam.gserviceaccount.com
- uses: muhammedelsami/storepilot@v0
with:
artifact: app/build/outputs/bundle/release/*.aab
track: internalThe service account still has to be invited into the Play Console.
Least privilege
Grant the service account only the Play Console permissions for the apps and actions you automate. A workflow that only checks listings in pull requests needs no key: listing-validate works offline. Pull requests from forks get no secrets on GitHub, so run store commands only for branches of your own repository.
The CLI download
The action downloads the CLI from the GitHub release of its version and compares it with the storepilot.jar.sha256 published next to it before running it.