Repository navigation
Conversation
The default was pinned to a fixed commit (faba359, 2026-07-20) when this workflow was added and has never been refreshed since — it's still that same commit as of current main, weeks and several capability renames (#74) later. Every caller that doesn't explicitly override sdk-ref diffs against that stale, pre-rename spec, so the sync job resurrects already-renamed/retired capability IDs as spurious "new" not_implemented entries (hit supabase-swift#1195 and supabase-flutter#1676). This repo has no tags/releases, so nothing can auto-bump a fixed SHA default here either — it would just go stale again. Since this workflow is only ever called by other repos in this org, tracking main by default doesn't carry third-party supply-chain risk; it just keeps the sync correct.
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe reusable SDK compliance workflow now uses the 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. Comment |
supabase/sdk#79 fixes the reusable workflow's own sdk-ref default (was stuck on the stale faba359a pin since 2026-07-20). Point at that fix commit directly and drop our local sdk-ref: main override, since it's now the workflow's default. Note: 72fda7c is currently on supabase/sdk's unmerged PR #79. Re-pin to the actual main commit once that merges.
supabase/sdk#79 fixes the reusable workflow's own sdk-ref default (was stuck on the stale faba359a pin since 2026-07-20). Point at that fix commit directly and drop our local sdk-ref: main override, since it's now the workflow's default. Note: 72fda7c is currently on supabase/sdk's unmerged PR #79. Re-pin to the actual main commit once that merges.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/sync-sdk-compliance.yml:
- Line 17: Update the sdk-ref input default in the workflow so it uses a full
immutable commit SHA instead of main, ensuring the _sdk-spec checkout and
sync-compliance execution remain reproducible; retain manual override support if
already provided.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: ede1ab66-dc41-4618-baf9-82e50bbba5f5
📒 Files selected for processing (1)
.github/workflows/sync-sdk-compliance.yml
| description: Ref to check out from supabase/sdk for the spec and script | ||
| type: string | ||
| default: faba359a57d270bbbf68fd6b583db0604ddce8af | ||
| default: main |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
workflow=".github/workflows/sync-sdk-compliance.yml"
action=".github/actions/sdk-compliance-check-symbols/action.yml"
rg -n -C 4 \
'permissions:|pull_request|pull_request_target|workflow_call|actions/checkout|sdk-ref|persist-credentials' \
"$workflow"
rg -n -C 4 \
'npm run|working-directory|GITHUB_TOKEN|git' \
"$action"Repository: supabase/sdk
Length of output: 1884
🏁 Script executed:
#!/bin/bash
set -euo pipefail
workflow=".github/workflows/sync-sdk-compliance.yml"
action=".github/actions/sdk-compliance-check-symbols/action.yml"
printf '--- workflow ---\n'
cat -n "$workflow"
printf '\n--- action ---\n'
cat -n "$action"
printf '\n--- references to reusable workflow and inputs ---\n'
rg -n -C 4 'sync-sdk-compliance|create-pull-request|push-to-branch|sdk-ref|branch' .github/workflowsRepository: supabase/sdk
Length of output: 241
🏁 Script executed:
#!/bin/bash
set -euo pipefail
workflow=".github/workflows/sync-sdk-compliance.yml"
action=".github/actions/sdk-compliance-check-symbols/action.yml"
printf '%s\n' '--- workflow ---'
cat -n "$workflow"
printf '%s\n' ''
printf '%s\n' '--- action ---'
cat -n "$action"
printf '%s\n' ''
printf '%s\n' '--- references to reusable workflow and inputs ---'
rg -n -C 4 'sync-sdk-compliance|create-pull-request|push-to-branch|sdk-ref|branch' .github/workflowsRepository: supabase/sdk
Length of output: 23246
Pin sdk-ref to an immutable commit.
sdk-ref controls the _sdk-spec checkout, npm ci, and the sync-compliance executable, and this job runs with contents and pull-requests write permissions. main makes workflow-executable code mutable and non-reproducible; pin this input to a full commit SHA, or set strong defaults such as main only with documented manual overrides.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/sync-sdk-compliance.yml at line 17, Update the sdk-ref
input default in the workflow so it uses a full immutable commit SHA instead of
main, ensuring the _sdk-spec checkout and sync-compliance execution remain
reproducible; retain manual override support if already provided.
QuintinWillison
left a comment
There was a problem hiding this comment.
Clearly a move in a better direction, fixing the issue in hand, but it does ask the wider question for me as to whether there might be need for version tags in this repository as is convention for GitHub actions repos - e.g. a major v1.
| description: Ref to check out from supabase/sdk for the spec and script | ||
| type: string | ||
| default: faba359a57d270bbbf68fd6b583db0604ddce8af | ||
| default: main |
There was a problem hiding this comment.
Since we weren't allowed to have main here (that's what I had initially), I guess that we need to do something like this:
- Create another job that opens a PR to this repo each week that updates this pin
- When that PR is merged trigger and action that open PRs that update each separate SDK repo pin
- And lastly when those PRs are merged, trigger the sync-sdk-compliance jobs for each repo
Quite tedious, but I don't see any other way around it.
Since tags are floating it is safer to pin to actual hashes. |
This is a |
That was my original thinking about just having this referencing main, but the security team said it didn't matter that it was org-owned and that all checkouts should be pinned. |
|
I'm also thinking versioning this repo would solve this, if versioning and pinning SHA commit in the SDK repos, then dependabot will automatically keep them updated using SHA, which solves both issues. |
|
Drafted a tagging setup addressing the thread above: #80 adds release-please, so this repo starts cutting semver tags. Once a first release exists, consumers can pin |
Follow-up to the discussion on #79. Consumers currently pin `uses:` references to this repo's reusable workflows (`sync-sdk-compliance.yml`, `validate-sdk-compliance-*.yml`) either to a raw commit SHA or, in several places, to `@main` directly. Neither is great: - A raw SHA has nothing to auto-bump it — this repo has no tags, so Dependabot's `github-actions` ecosystem has no version signal to key off, and the SHA just goes stale until someone notices (as happened in #79). - `@main` floats. Per the security team's stance in #79's discussion, that's not acceptable here even though this is an org-owned repo — every consumer would pick up a change the moment it lands on `main`, without going through that consumer's own review. **This PR:** adds [release-please](https://github.com/googleapis/release-please), mirroring the setup already used in `supabase-swift` and other SDK repos (`release-type: simple`, same GitHub-App-token pattern for opening the release PR). Commit history here already follows Conventional Commits, so no history rewrite is needed — the first release PR will pick up whatever merges after this lands. Once this is in place, consumers can pin like: ```yaml uses: supabase/sdk/.github/workflows/validate-sdk-compliance-swift.yml@<sha> # v1.2.3 ``` and Dependabot bumps that pin automatically as new tags land — no more hand-maintained SHAs, no floating `main`. **Not done in this PR** (one-way / repo-admin actions, listed for whoever merges this): 1. Enable **Immutable actions** in repo settings, so published release tags can't be retargeted after the fact — this is what actually gives a tag the same integrity guarantee as a raw SHA (per the [GitHub docs](https://docs.github.com/en/actions/how-tos/create-and-publish-actions/using-immutable-releases-and-tags-to-manage-your-actions-releases) linked in #79). 2. Once the first release-please PR merges and tags `v1.0.0`, update `uses:` lines in `supabase-js`, `supabase-swift`, `supabase-flutter` (and any other consumers) to pin to that tag's SHA, including the `@main` references in each repo's `validate-capabilities.yml` — those weren't part of #79 but have the same problem.
The
sdk-refdefault was pinned to a fixed commit (faba359a, 2026-07-20) when this workflow was added in #65/#66, and has never been refreshed since — it's still that same commit as of currentmain, weeks and several capability renames (#74) later.Every caller that doesn't explicitly override
sdk-refdiffs the caller'ssdk-compliance.yamlagainst that stale, pre-rename spec, so the sync job resurrects already-renamed/retired capability IDs as spurious "new"not_implementedentries. Hit this in:This repo has no tags/releases, so there's no signal for anything (Dependabot included) to auto-bump a fixed SHA default here — it would just go stale again on its own schedule. Since this workflow is only ever called by other repos in this org, tracking
mainby default doesn't carry third-party supply-chain risk; it just keeps the sync correct without ongoing manual upkeep.Once this merges, the two PRs above should bump their
uses:pin to the merge commit and can drop their ownsdk-ref: mainoverride, since it'll be the default again.