Skip to content

chore(ci): security hardening - #1

Merged
iota9star merged 1 commit into
mainfrom
chore/security-hardening
Aug 13, 2026
Merged

chore(ci): security hardening#1
iota9star merged 1 commit into
mainfrom
chore/security-hardening

Conversation

@iota9star

Copy link
Copy Markdown
Member

Copilot AI lite review requested due to automatic review settings August 13, 2026 14:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens the CI workflow by reducing default GitHub token permissions and mitigating supply-chain risks through action pinning, while ensuring the jobs that need elevated permissions explicitly declare them.

Changes:

  • Reduced workflow-level permissions to contents: read, and added job-level permission scopes for Pages deployment and Releases.
  • Pinned all third-party GitHub Actions to specific commit SHAs and disabled persisted checkout credentials (persist-credentials: false).
  • Adjusted the Android keystore-generation step to use step env variables (instead of inline ${{ env.* }} expressions) and improved quoting for secret values.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +128 to +140
cd $EXAMPLE_DIR/android/app
if [ -n "$KEYSTORE_BASE64" ]; then
echo "$KEYSTORE_BASE64" | base64 -d > ${{ env.ANDROID_KEYSTORE_FILE }}
echo "$KEYSTORE_BASE64" | base64 -d > $ANDROID_KEYSTORE_FILE
else
keytool -genkey -v -keystore ${{ env.ANDROID_KEYSTORE_FILE }} \
-alias ${{ env.ANDROID_KEY_ALIAS }} \
keytool -genkey -v -keystore $ANDROID_KEYSTORE_FILE \
-alias $ANDROID_KEY_ALIAS \
-keyalg RSA -keysize 2048 -validity 36135 \
-storepass '${{ env.ANDROID_KEYSTORE_SECRET }}' \
-keypass '${{ env.ANDROID_KEY_PASSWORD }}' \
-dname '${{ env.ANDROID_KEY_DNAME }}'
-storepass "$ANDROID_KEYSTORE_SECRET" \
-keypass "$ANDROID_KEY_PASSWORD" \
-dname "$ANDROID_KEY_DNAME"
fi
if ! grep -q "${{ env.ANDROID_KEYSTORE_FILE }}" .gitignore 2>/dev/null; then
echo "${{ env.ANDROID_KEYSTORE_FILE }}" >> .gitignore
if ! grep -q "$ANDROID_KEYSTORE_FILE" .gitignore 2>/dev/null; then
echo "$ANDROID_KEYSTORE_FILE" >> .gitignore
@iota9star
iota9star merged commit 4cc8875 into main Aug 13, 2026
10 of 11 checks passed
@iota9star
iota9star deleted the chore/security-hardening branch August 13, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI/CD Security] fluttercandies/flexbox_layout - Issue Report

2 participants