-
Notifications
You must be signed in to change notification settings - Fork 1.5k
chore(deps): sweep Dependabot alerts into board-tracked issues #2243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
cliffhall
merged 14 commits into
v2/chore/2235-remove-dependabot-config
from
v2/chore/2233-dependabot-alert-sweep
Sep 4, 2026
+3,362
−19
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
66a3332
chore(deps): sweep Dependabot alerts into board-tracked issues
cliffhall b53266b
chore(deps): address Copilot review round 1 on #2243
cliffhall 761bdd1
chore(deps): address Copilot review round 2 on #2243
cliffhall 5c65bd2
chore(deps): address Copilot review round 3 on #2243
cliffhall 1e58d2f
chore(deps): address Copilot review round 4 on #2243
cliffhall a17eace
chore(deps): address Copilot review round 5 on #2243
cliffhall ff339dc
chore(deps): address Copilot review round 6 on #2243
cliffhall 1d6ea1a
chore(deps): address Copilot review round 7 on #2243
cliffhall 9e516ae
chore(deps): address Copilot review rounds 8-10 on #2243
cliffhall 2336471
chore(deps): address Copilot review round 11 on #2243
cliffhall bc47fcb
chore(deps): address Copilot review round 12 on #2243
cliffhall c0d1d56
chore(deps): address Copilot review round 13 on #2243
cliffhall e846dec
chore(deps): address Copilot review round 14 on #2243
cliffhall 0bf8fbd
chore(deps): address Copilot review round 15 on #2243
cliffhall File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| # Dependabot alert sweep (#2233), the alert-consuming half of #2229. | ||
| # | ||
| # Dependabot's SECURITY-update PRs are turned off for this repo; its ALERTS are | ||
| # left on. Those are two independent settings, and this workflow depends on the | ||
| # split: it reads the alerts and turns them into ordinary board-tracked issues, | ||
| # so the fix is written by hand against `v2/main` like any other work. | ||
| # | ||
| # alert -> this sweep -> issue (labeled, milestoned, boarded) -> maintainer PR -> v2/main | ||
| # | ||
| # It is a SCHEDULE, not an event handler, because there is no `dependabot_alert` | ||
| # workflow trigger — that is a webhook event only. Daily is deliberate: with | ||
| # security PRs off there is no mergeable-against-`main` artifact and no window to | ||
| # race, so the merge guard #2060 needed has no analogue here. What replaces it is | ||
| # a precondition inside the script: `automated-security-fixes` is a repo SETTING | ||
| # and can be switched back on from the UI without a commit, so the sweep reads it | ||
| # back and fails loudly on an explicit `enabled: true`. That read needs a | ||
| # permission `GITHUB_TOKEN` cannot hold, so with the default token it reports | ||
| # UNVERIFIED instead — see the token notes below; it is a conditional guard, not | ||
| # an invariant. | ||
| # | ||
| # ⚠️ GitHub computes the dependency graph, and therefore every alert, from the | ||
| # DEFAULT branch (`main`), while we ship from `v2/main`. Two consequences: | ||
| # | ||
| # * An alert is re-checked against `v2/main`'s own lockfile before an issue is | ||
| # filed — hence the `ref: v2/main` checkout below. An alert whose vulnerable | ||
| # range no longer matches is already fixed on the branch we ship from and is | ||
| # waiting on a milestone merge to close, so it is skipped silently. | ||
| # * A vulnerable dependency introduced on `v2/main` and not yet merged to | ||
| # `main` produces NO alert at all. No approach that consumes GitHub's alerts | ||
| # avoids that. The release-time `npm audit --audit-level=high` report from | ||
| # #2231 is a second signal that partially covers it — at release time only; | ||
| # running that same report over `v2/main`'s lockfiles on a schedule would | ||
| # close it fully and is a separable follow-up. | ||
| # | ||
| # `vulnerability-alerts: read` is the one non-default permission, and | ||
| # `GITHUB_TOKEN` supports it — no PAT is needed to read the alerts themselves. | ||
| # Two side steps are outside its reach, and `PROJECT_TOKEN` is what covers them | ||
| # when it exists: | ||
| # | ||
| # * Writing the board card, since board #28 is an ORG project | ||
| # (`organization projects: write`). Absent, the issue is still filed labeled | ||
| # and milestoned and the next `/issue-triage` sweep boards it. | ||
| # * Reading back `automated-security-fixes`, which needs `administration: read` | ||
| # — a permission `permissions:` has no key for, so `GITHUB_TOKEN` can never | ||
| # have it. Absent, that assertion is reported as UNVERIFIED rather than | ||
| # failing the run; an explicit `enabled: true` still fails it. | ||
| # | ||
| # Nothing the sweep exists to do is skipped for want of that secret. | ||
| # | ||
| # The version-update half of #2229 is the sibling `dependency-refresh.yml`. | ||
| name: Dependabot Alert Sweep | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: "17 6 * * *" # 06:17 UTC daily; alerts are not minute-sensitive | ||
| workflow_dispatch: | ||
|
|
||
| # The marker check is a read-before-write, not an atomic one, and nothing stops | ||
| # a `workflow_dispatch` from landing on top of the scheduled run. Two overlapping | ||
| # runs would both see no open issue and both file one, which is the exact | ||
| # duplicate this sweep's whole idempotency design exists to prevent (Copilot). | ||
| # `cancel-in-progress: false` because the queued run must WAIT and then re-read | ||
| # the state the first run wrote — cancelling it would drop a sweep instead. | ||
| concurrency: | ||
| group: dependabot-alert-sweep | ||
| cancel-in-progress: false | ||
|
|
||
| permissions: | ||
| contents: read | ||
| issues: write | ||
| vulnerability-alerts: read | ||
|
|
||
| jobs: | ||
| alert-sweep: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout v2/main | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| ref: v2/main | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v7 | ||
| with: | ||
| node-version: "22.x" | ||
| cache: "npm" | ||
|
|
||
| # Root install only, and no lifecycle scripts. The sweep's one dependency | ||
| # is `semver`; it reads every lockfile as JSON and never needs a client's | ||
| # tree on disk, so the postinstall cascade into `clients/*` that | ||
| # `dependency-refresh.yml` genuinely needs (it shells out to | ||
| # `npm outdated` in each) would be minutes of nothing here. | ||
| - name: Install root dependencies | ||
| run: npm ci --ignore-scripts | ||
|
|
||
| - name: Run the Dependabot alert sweep | ||
| run: node scripts/dependabot-alerts.mjs | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| GITHUB_REPOSITORY: ${{ github.repository }} | ||
| # Optional: an org-project PAT with `organization projects: write`. | ||
| # Absent, the issue is filed unboarded and triage picks it up. | ||
| PROJECT_TOKEN: ${{ secrets.PROJECT_TOKEN }} | ||
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.