Skip to content

ci(release): add workflow to deprecate version#2128

Merged
mandarini merged 3 commits into
masterfrom
ci/deprecate-v
Feb 20, 2026
Merged

ci(release): add workflow to deprecate version#2128
mandarini merged 3 commits into
masterfrom
ci/deprecate-v

Conversation

@mandarini

Copy link
Copy Markdown
Contributor

Add workflow so that we can easily deprecate a version

@mandarini
mandarini requested a review from staaldraad February 20, 2026 10:55
@coderabbitai

coderabbitai Bot commented Feb 20, 2026

Copy link
Copy Markdown
📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Added automated workflow to manage package version deprecation with authorization verification and status notifications.

Walkthrough

A new GitHub Actions workflow file has been added at .github/workflows/deprecate-version.yml that automates the deprecation of package versions. The workflow is manually triggered via workflow_dispatch with two inputs: version and message. It performs authentication by generating a GitHub App token, verifies the triggering actor belongs to authorized teams (@supabase/admin or @supabase/sdk), sets up Node.js v20 and npm, then executes npm deprecate commands across multiple @supabase/* packages with the provided version and message. The workflow tracks success or failure for each package and exits with a non-zero status if any deprecations fail. Upon completion, it triggers a Slack notification workflow to report the deprecation status.


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

@mandarini mandarini self-assigned this Feb 20, 2026
@mandarini
mandarini marked this pull request as ready for review February 20, 2026 12:36
@mandarini
mandarini requested review from a team as code owners February 20, 2026 12:37
@mandarini
mandarini enabled auto-merge (squash) February 20, 2026 12:41
@mandarini
mandarini merged commit a808c54 into master Feb 20, 2026
23 of 26 checks passed
@mandarini
mandarini deleted the ci/deprecate-v branch February 20, 2026 12:41

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/deprecate-version.yml:
- Around line 72-77: The workflow step "Deprecate package versions" is
vulnerable because it interpolates inputs directly into the run script as
VERSION="${{ inputs.version }}" and MESSAGE="${{ inputs.message }}"; change the
step to set those values as step-level environment variables (env: VERSION: ${{
inputs.version }}, MESSAGE: ${{ inputs.message }}) and then reference the safe
shell variables ($VERSION, $MESSAGE) inside the run block so GitHub Actions will
escape the inputs and prevent command injection.

Comment on lines +72 to +77
- name: Deprecate package versions
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
VERSION="${{ inputs.version }}"
MESSAGE="${{ inputs.message }}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Command injection vulnerability via direct input interpolation.

Direct interpolation of ${{ inputs.version }} and ${{ inputs.message }} into shell scripts allows command injection. Even with team authorization checks, an authorized user could inject shell metacharacters (accidental or intentional). Move inputs to step-level environment variables where GitHub Actions will properly escape them.

🔒 Proposed fix
      - name: Deprecate package versions
        env:
          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
+         VERSION: ${{ inputs.version }}
+         MESSAGE: ${{ inputs.message }}
        run: |
-         VERSION="${{ inputs.version }}"
-         MESSAGE="${{ inputs.message }}"
-
          PACKAGES=(
            "supabase-js"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/deprecate-version.yml around lines 72 - 77, The workflow
step "Deprecate package versions" is vulnerable because it interpolates inputs
directly into the run script as VERSION="${{ inputs.version }}" and MESSAGE="${{
inputs.message }}"; change the step to set those values as step-level
environment variables (env: VERSION: ${{ inputs.version }}, MESSAGE: ${{
inputs.message }}) and then reference the safe shell variables ($VERSION,
$MESSAGE) inside the run block so GitHub Actions will escape the inputs and
prevent command injection.

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