Embed keystore and credentials directly in workflow#4
Conversation
No GitHub Secrets needed — keystore (RSA 2048, valid 10 000 days) and credentials are inlined as workflow env vars so the release build works out of the box without any manual repository setup. https://claude.ai/code/session_01DtmpGJDVZKqy18Yzm3D45j
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR updates the Android release GitHub Actions workflow to embed the signing keystore and credentials directly as workflow environment variables and makes minor logging/message adjustments (mostly to Spanish), so releases can be built without configuring GitHub Secrets. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 29665732 | Triggered | Generic Password | cbb97ce | .github/workflows/release.yml | View secret |
| 29665732 | Triggered | Generic Password | cbb97ce | .github/workflows/release.yml | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- Embedding the keystore and its passwords directly in the workflow
envis a severe secret exposure risk (they become part of the repo history and visible to anyone with read access); please revert to using GitHub Secrets or another secure secret store and remove/rotate this key material. - Defining the keystore values at the top-level
envexposes them to all jobs/steps, which increases accidental leakage risk in logs or future steps; scope any sensitive values only to the specific job/step that actually needs them.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Embedding the keystore and its passwords directly in the workflow `env` is a severe secret exposure risk (they become part of the repo history and visible to anyone with read access); please revert to using GitHub Secrets or another secure secret store and remove/rotate this key material.
- Defining the keystore values at the top-level `env` exposes them to all jobs/steps, which increases accidental leakage risk in logs or future steps; scope any sensitive values only to the specific job/step that actually needs them.
## Individual Comments
### Comment 1
<location path=".github/workflows/release.yml" line_range="14-19" />
<code_context>
- name: Build release APK
env:
KEYSTORE_PATH: ${{ github.workspace }}/release.jks
- STORE_PASSWORD: ${{ secrets.STORE_PASSWORD }}
- KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
- KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
VERSION_NAME: ${{ steps.version.outputs.name }}
VERSION_CODE: ${{ steps.version.outputs.code }}
run: ./gradlew assembleRelease --no-daemon
</code_context>
<issue_to_address>
**🚨 issue (security):** Avoid hardcoding keystore and passwords in the workflow; use GitHub Actions secrets instead.
Embedding the keystore and its passwords directly in the workflow makes them part of the repo history and visible to anyone with read access, and also bypasses GitHub’s secret-scanning and masking. Please move `KEYSTORE_B64`, `KEY_ALIAS`, `KEY_PASSWORD`, and `STORE_PASSWORD` back into `secrets.*` and reference them from there.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
… improve keystore decoding command
No GitHub Secrets needed — keystore (RSA 2048, valid 10 000 days) and credentials are inlined as workflow env vars so the release build works out of the box without any manual repository setup.
https://claude.ai/code/session_01DtmpGJDVZKqy18Yzm3D45j
Summary by Sourcery
Inline Android signing keystore and credentials into the release workflow so release builds run without repository secret configuration.
CI: