Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
"$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json",
"changelog": [
"@svitejs/changesets-changelog-github-compact",
{ "repo": "TanStack/devtools" }
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6.0.1
uses: actions/checkout@v6.0.2
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Fix formatting
Expand Down
25 changes: 14 additions & 11 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: PR

on:
pull_request:
paths-ignore:
- 'docs/**'
- 'media/**'
- '**/*.md'

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
Expand All @@ -16,14 +12,15 @@ env:

permissions:
contents: read
pull-requests: write
Comment on lines 13 to +15
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 | 🟠 Major

Scope PR write permission to the Version Preview job only.

Line 15 grants pull-requests: write to every job, including jobs executing third-party tooling. Restrict it to version-preview to reduce token blast radius.

🔐 Proposed least-privilege adjustment
 permissions:
   contents: read
-  pull-requests: write

 jobs:
   test:
@@
   version-preview:
     name: Version Preview
     runs-on: ubuntu-latest
+    permissions:
+      contents: read
+      pull-requests: write
     steps:
       - name: Checkout
         uses: actions/checkout@v6.0.2

Also applies to: 56-65

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/pr.yml around lines 13 - 15, The top-level GitHub Actions
permissions block currently grants pull-requests: write globally; remove
pull-requests: write from the top-level permissions and instead add a job-level
permissions block for the version-preview job that includes pull-requests: write
(keep contents: read at top-level). Update the job named version-preview to
include permissions: { pull-requests: write, contents: read } (or merge with its
existing permissions) so only that job has write scope; also mirror the same
change for the other occurrence noted around lines 56-65 by removing global
write and scoping write to the specific job(s).


jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6.0.1
uses: actions/checkout@v6.0.2
with:
fetch-depth: 0
- name: Setup Tools
Expand All @@ -39,9 +36,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6.0.1
with:
fetch-depth: 0
uses: actions/checkout@v6.0.2
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Build Packages
Expand All @@ -53,10 +48,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6.0.1
with:
fetch-depth: 0
uses: actions/checkout@v6.0.2
- name: Check Provenance
uses: danielroe/provenance-action@v0.1.1
with:
fail-on-downgrade: true
version-preview:
name: Version Preview
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Changeset Preview
uses: tanstack/config/.github/changeset-preview@main
12 changes: 8 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6.0.1
uses: actions/checkout@v6.0.2
with:
fetch-depth: 0
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Run Tests
run: pnpm run test:ci
- name: Run Changesets (version or publish)
uses: changesets/action@v1.5.3
id: changesets
uses: changesets/action@v1.7.0
with:
version: pnpm run changeset:version
publish: pnpm run changeset:publish
commit: 'ci: Version Packages'
title: 'ci: Version Packages'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Comment on PRs about release
if: steps.changesets.outputs.published == 'true'
uses: TanStack/config/.github/comment-on-release@main
with:
published-packages: ${{ steps.changesets.outputs.publishedPackages }}
3 changes: 3 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"nxCloudId": "68d74dda9d18071f643ecda4",
"useInferencePlugins": false,
"parallel": 5,
"tui": {
"enabled": false
},
"namedInputs": {
"sharedGlobals": [
"{workspaceRoot}/.nvmrc",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
}
],
"devDependencies": {
"@changesets/cli": "^2.29.7",
"@changesets/cli": "^2.30.0",
"@faker-js/faker": "^9.9.0",
"@size-limit/preset-small-lib": "^11.2.0",
"@svitejs/changesets-changelog-github-compact": "^1.2.0",
Expand Down
65 changes: 29 additions & 36 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading