Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Conversation

@swolfand
Copy link
Collaborator

@swolfand swolfand commented Dec 19, 2025

Summary of changes

Summary by CodeRabbit

Release Notes

  • New Features

    • Firebase App Distribution integration enabled for application distribution.
  • Chores

    • Updated build configuration with new plugins and version information.
    • Enhanced manual release workflow to support selective module publishing.
    • Refreshed user interface component in workbench.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 19, 2025

📝 Walkthrough

Walkthrough

This PR introduces Firebase App Distribution capabilities and makes related configuration updates. A new GitHub Actions workflow enables app distribution via Firebase, while the manual release workflow gains configurable input parameters for selective module publishing. The workbench build configuration is updated with Firebase and Google Play Services plugins, plus version properties for the debug build. Finally, the UI activity is updated to use a UserButton component in place of UserProfileView.

Pre-merge checks

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description only contains the template header with no actual content, failing to provide details about the four files modified and the specific changes introduced. Complete the description by adding a summary of changes under the 'Summary of changes' section, including the new Firebase workflow, manual release updates, and build configuration changes.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'Update actions' is vague and generic, failing to convey specific information about the substantial changes across multiple workflows and build configurations. Provide a more descriptive title that captures the main changes, such as 'Add Firebase App Distribution workflow and update manual release workflow' or 'Configure Firebase distribution and selective module publishing'.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 329d909 and a060f3e.

📒 Files selected for processing (4)
  • .github/workflows/firebase-app-distribution.yml (1 hunks)
  • .github/workflows/manual-release.yml (2 hunks)
  • workbench/build.gradle.kts (2 hunks)
  • workbench/src/main/java/com/clerk/workbench/UiActivity2.kt (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*

⚙️ CodeRabbit configuration file

If there are no tests added or modified as part of the PR, please suggest that tests be added to cover the changes.

**/*: Only comment on issues that would block merging, ignore minor or stylistic concerns.
Restrict feedback to errors, security risks, or functionality-breaking problems.
Do not post comments on code style, formatting, or non-critical improvements.
Keep reviews short: flag only issues that make the PR unsafe to merge.
Group similar issues into a single comment instead of posting multiple notes.
Skip repetition: if a pattern repeats, mention it once at a summary level only.
Do not add general suggestions, focus strictly on merge-blocking concerns.
If there are no critical problems, respond with minimal approval (e.g., 'Looks good'). Do not add additional review.
Avoid line-by-line commentary unless it highlights a critical bug or security hole.
Highlight only issues that could cause runtime errors, data loss, or severe maintainability issues.
Ignore minor optimization opportunities, focus solely on correctness and safety.
Provide a top-level summary of critical blockers rather than detailed per-line notes.
Comment only when the issue must be resolved before merge, otherwise remain silent.
When in doubt, err on the side of fewer comments, brevity and blocking issues only.
Avoid posting any refactoring issues.

Files:

  • workbench/build.gradle.kts
  • workbench/src/main/java/com/clerk/workbench/UiActivity2.kt
🧬 Code graph analysis (1)
workbench/src/main/java/com/clerk/workbench/UiActivity2.kt (1)
source/ui/src/main/java/com/clerk/ui/userbutton/UserButton.kt (1)
  • UserButton (46-108)
🪛 actionlint (1.7.9)
.github/workflows/firebase-app-distribution.yml

14-14: label "blacksmith-4vcpu-ubuntu-2404" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)

🔇 Additional comments (3)
workbench/src/main/java/com/clerk/workbench/UiActivity2.kt (1)

21-21: Looks good.

The component swap from UserProfileView to UserButton is correctly implemented with the matching import.

Also applies to: 41-41

.github/workflows/manual-release.yml (1)

176-200: Looks good.

The conditional task selection logic correctly handles both release events and manual workflow dispatch, with proper validation for empty module selection.

workbench/build.gradle.kts (1)

9-10: Looks good.

Plugin additions align with the Firebase App Distribution workflow requirements.

Also applies to: 21-22

Comment on lines +32 to +36
- name: Build and upload to Firebase App Distribution
env:
ORG_GRADLE_PROJECT_WORKBENCH_CLERK_PUBLISHABLE_KEY: ${{ secrets.WORKBENCH_CLERK_PUBLISHABLE_KEY }}
run: |
./gradlew :workbench:assembleDebug :workbench:appDistributionUploadDebug
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if Firebase App Distribution is configured with credentials in build files
echo "=== Checking Firebase App Distribution config in build files ==="
rg -n "firebaseAppDistribution|serviceCredentialsFile|appDistribution" --type=gradle

echo ""
echo "=== Checking for google-services.json ==="
fd "google-services.json"

echo ""
echo "=== Checking for Firebase-related secrets usage in workflows ==="
rg -n "FIREBASE|GOOGLE_APPLICATION" .github/workflows/

Repository: clerk/clerk-android

Length of output: 433


Add Firebase App Distribution credentials to the workflow.

The appDistributionUploadDebug task requires explicit Firebase authentication. The workflow only provides WORKBENCH_CLERK_PUBLISHABLE_KEY but no Firebase credentials. GitHub Actions runners are ephemeral and have no persistent Firebase CLI login state.

Add one of:

  • A FIREBASE_TOKEN secret (acquired via firebase login:ci)
  • A GOOGLE_APPLICATION_CREDENTIALS environment variable pointing to a service account key file
  • A serviceCredentialsFile property in the app-level build.gradle

Without this, the upload step will fail with an authentication error.

🤖 Prompt for AI Agents
.github/workflows/firebase-app-distribution.yml lines 32-36: The workflow
invokes the Gradle appDistributionUploadDebug task but provides no Firebase
authentication, so the upload will fail; fix by adding Firebase credentials to
the job — set a FIREBASE_TOKEN secret (from firebase login:ci) and expose it as
FIREBASE_TOKEN in the env for that step, or upload a service account JSON to a
secret and set GOOGLE_APPLICATION_CREDENTIALS to point to it (or configure
serviceCredentialsFile in the app-level build.gradle and supply the file via a
secret), ensuring the chosen credential is available as an environment variable
before running the Gradle task.

Comment on lines 176 to +200
run: |
./gradlew :source:api:publishMavenPublicationToMavenCentralRepository \
:source:ui:publishMavenPublicationToMavenCentralRepository \
:source:telemetry:publishAllPublicationsToMavenCentralRepository
TASKS=""
# For release events, publish all modules. For workflow_dispatch, use the inputs.
if [ "${{ github.event_name }}" == "release" ]; then
TASKS=":source:api:publishMavenPublicationToMavenCentralRepository :source:ui:publishMavenPublicationToMavenCentralRepository :source:telemetry:publishAllPublicationsToMavenCentralRepository"
else
if [ "${{ github.event.inputs.publish_api }}" == "true" ]; then
TASKS="$TASKS :source:api:publishMavenPublicationToMavenCentralRepository"
fi
if [ "${{ github.event.inputs.publish_ui }}" == "true" ]; then
TASKS="$TASKS :source:ui:publishMavenPublicationToMavenCentralRepository"
fi
if [ "${{ github.event.inputs.publish_telemetry }}" == "true" ]; then
TASKS="$TASKS :source:telemetry:publishAllPublicationsToMavenCentralRepository"
fi
fi
if [ -z "$TASKS" ]; then
echo "No modules selected for publishing"
exit 1
fi
echo "Publishing modules: $TASKS"
./gradlew $TASKS

Choose a reason for hiding this comment

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

Semgrep identified an issue in your code:
Using variable interpolation ${{...}} with github context data in a run: step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. github context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with env: to store the data and use the environment variable in the run: script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".

To resolve this comment:

✨ Commit Assistant Fix Suggestion
  1. Move all use of ${{ github.event_name }} and ${{ github.event.inputs.* }} out of the run: script and into environment variables by defining them under env: for this step.
  2. In the run: script, reference these new environment variables using shell variable syntax. For example, replace ${{ github.event_name }} with $EVENT_NAME and ${{ github.event.inputs.publish_api }} with $PUBLISH_API, etc. Make sure to use double-quotes around each environment variable, like "$EVENT_NAME".
  3. Example changes:
    • Add under the relevant step:
      env:
        EVENT_NAME: ${{ github.event_name }}
        PUBLISH_API: ${{ github.event.inputs.publish_api }}
        PUBLISH_UI: ${{ github.event.inputs.publish_ui }}
        PUBLISH_TELEMETRY: ${{ github.event.inputs.publish_telemetry }}
      
    • Update the script to use these variables:
      if [ "$EVENT_NAME" == "release" ]; then
      ...
      if [ "$PUBLISH_API" == "true" ]; then
      ...
      if [ "$PUBLISH_UI" == "true" ]; then
      ...
      if [ "$PUBLISH_TELEMETRY" == "true" ]; then
      

This approach prevents the possibility of user-controlled values being executed directly in the shell, mitigating injection risks.

💬 Ignore this finding

Reply with Semgrep commands to ignore this finding.

  • /fp <comment> for false positive
  • /ar <comment> for acceptable risk
  • /other <comment> for all other reasons

Alternatively, triage in Semgrep AppSec Platform to ignore the finding created by run-shell-injection.

You can view more details about this finding in the Semgrep AppSec Platform.

@swolfand swolfand merged commit fad3837 into main Dec 19, 2025
10 checks passed
@swolfand swolfand deleted the updateActions branch December 19, 2025 20:13
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.

2 participants