fix(ci): gate AI workflows behind org membership#681
Open
Conversation
✅ Deploy Preview for vjs10-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
📦 Bundle Size Report
Total: 53.75 kB · 0 B · 0% Entry BreakdownSubpath sizes are the additional bytes on top of the root entry point, measured by bundling root + subpath together and subtracting the root-only size.
|
| Entry | Base | PR | Diff | % | |
|---|---|---|---|---|---|
. |
4.28 kB | 4.28 kB | 0 B | 0% | ✅ |
./dom |
6.01 kB | 6.01 kB | 0 B | 0% | ✅ |
| total | 10.28 kB | 10.28 kB | 0 B | 0% |
@videojs/element
| Entry | Base | PR | Diff | % | |
|---|---|---|---|---|---|
. |
817 B | 817 B | 0 B | 0% | ✅ |
./context |
823 B | 823 B | 0 B | 0% | ✅ |
| total | 1.60 kB | 1.60 kB | 0 B | 0% |
@videojs/html
| Entry | Base | PR | Diff | % | |
|---|---|---|---|---|---|
. |
15.20 kB | 15.20 kB | 0 B | 0% | ✅ |
./video |
1.06 kB | 1.06 kB | 0 B | 0% | ✅ |
./audio |
1.06 kB | 1.06 kB | 0 B | 0% | ✅ |
./background |
1.05 kB | 1.05 kB | 0 B | 0% | ✅ |
| total | 18.36 kB | 18.36 kB | 0 B | 0% |
@videojs/icons
| Entry | Base | PR | Diff | % | |
|---|---|---|---|---|---|
./react |
2.27 kB | 2.27 kB | 0 B | 0% | ✅ |
./html |
1.52 kB | 1.52 kB | 0 B | 0% | ✅ |
| total | 3.79 kB | 3.79 kB | 0 B | 0% |
@videojs/store
| Entry | Base | PR | Diff | % | |
|---|---|---|---|---|---|
. |
1.29 kB | 1.29 kB | 0 B | 0% | ✅ |
./html |
468 B | 468 B | 0 B | 0% | ✅ |
./react |
204 B | 204 B | 0 B | 0% | ✅ |
| total | 1.95 kB | 1.95 kB | 0 B | 0% |
@videojs/utils
| Entry | Base | PR | Diff | % | |
|---|---|---|---|---|---|
./array |
104 B | 104 B | 0 B | 0% | ✅ |
./dom |
928 B | 928 B | 0 B | 0% | ✅ |
./events |
227 B | 227 B | 0 B | 0% | ✅ |
./function |
261 B | 261 B | 0 B | 0% | ✅ |
./object |
119 B | 119 B | 0 B | 0% | ✅ |
./predicate |
265 B | 265 B | 0 B | 0% | ✅ |
./string |
148 B | 148 B | 0 B | 0% | ✅ |
./style |
185 B | 185 B | 0 B | 0% | ✅ |
./time |
478 B | 478 B | 0 B | 0% | ✅ |
./number |
158 B | 158 B | 0 B | 0% | ✅ |
| total | 2.81 kB | 2.81 kB | 0 B | 0% |
ℹ️ How to interpret
Sizes are minified + brotli, measured with esbuild.
Package totals are computed as root size + marginal subpath costs.
Subpath marginal cost = (root + subpath bundled together) − root alone.
| Icon | Meaning |
|---|---|
| ✅ | No change |
| 🔺 | Increased ≤ 10% |
| 🔴 | Increased > 10% |
| 🔽 | Decreased |
| 🆕 | New (no baseline) |
Run pnpm size locally to check current sizes.
274cf37 to
846d362
Compare
issue-triage: only run AI triage for MEMBER/OWNER/COLLABORATOR. Non-members get a 'triage' label added for manual review. Adding agent:triage label triggers AI triage on demand. ci-diagnose: check videojs org membership before running Claude to prevent external contributors from triggering AI via fork PR CI failures.
846d362 to
cf899b1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Prevent external contributors from triggering AI-powered workflows that consume Anthropic API credits.
Changes
author_association— only MEMBER/OWNER/COLLABORATOR get automatic AI triage. Non-members get atriagelabel added for manual review. Adding theagent:triagelabel triggers AI triage on demand (only triage+ permissions can add labels).videojsorg membership via GitHub API before running Claude. Fork PR CI failures from non-members are skipped.What was the risk?
issue-triage.ymlcould be triggered by any GitHub user opening or editing an issue — no author check, consuming Anthropic credits with each invocationci-diagnose.ymlruns onworkflow_runevents which execute in the default branch context with secret access. A fork PR with intentionally broken code would trigger CI failure → AI diagnosis → Anthropic API costAll other workflows were audited and are safe:
ci.yml,bundle-size.yml,website-tests.yml—pull_requestevent = read-only sandbox, no secret accesscd.yml— push to main onlyissue-sync.yml— requires PR merge (maintainer action)issue-to-pr.yml— requiresagent:prlabel (triage+ permissions only)api-reference-sync.yml— requires merge to main or workflow_dispatchTriage trigger paths
triagelabel added, no AIagent:triagelabel addedTesting
triagelabel, no AI commentagent:triagelabel to any issue → AI triage runs