diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml index b9f4dadc2..23351ab9f 100644 --- a/.github/workflows/autofix.yml +++ b/.github/workflows/autofix.yml @@ -18,11 +18,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 + persist-credentials: false - name: Setup Tools - uses: tanstack/config/.github/setup@main + uses: tanstack/config/.github/setup@e4b48f16568324f76f467aa4c2aac2f05db632c3 - name: Fix formatting run: pnpm format - name: Apply fixes diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml index c4bb5e220..0130d3800 100644 --- a/.github/workflows/claude.yml +++ b/.github/workflows/claude.yml @@ -18,10 +18,11 @@ jobs: actions: read # Required for Claude to read CI results on PRs steps: - name: Checkout code - uses: actions/checkout@v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 # required for Claude Code - - uses: anthropics/claude-code-action@v1 + persist-credentials: false + - uses: anthropics/claude-code-action@f4fb5c6cdccc1ee7af63692f5d08d56efaa64cc8 # v1.0.121 with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} # Responds to @claude mentions in comments diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 6f3d6b54a..4c83337bd 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -5,6 +5,9 @@ on: branches: [main] pull_request: +permissions: + contents: read + jobs: e2e-tests: name: Run E2E Tests @@ -13,15 +16,17 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - name: Setup pnpm - uses: pnpm/action-setup@v4 + uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0 with: version: 10.27.0 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: '20' cache: 'pnpm' @@ -123,7 +128,7 @@ jobs: - name: Upload test results if: failure() - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: test-results path: packages/db-collection-e2e/junit/ diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 64525c50b..48f12e07c 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -15,7 +15,6 @@ env: permissions: contents: read - pull-requests: write jobs: test: @@ -23,13 +22,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 + persist-credentials: false - name: Setup Tools - uses: tanstack/config/.github/setup@main + uses: tanstack/config/.github/setup@e4b48f16568324f76f467aa4c2aac2f05db632c3 - name: Get base and head commits for `nx affected` - uses: nrwl/nx-set-shas@v4.4.0 + uses: nrwl/nx-set-shas@3e9ad7370203c1e93d109be57f3b72eb0eb511b1 # v4.4.0 with: main-branch-name: main - name: Run Checks @@ -51,26 +51,30 @@ jobs: preview: name: Preview runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write steps: - name: Checkout - uses: actions/checkout@v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 + persist-credentials: false - name: Setup Tools - uses: tanstack/config/.github/setup@main + uses: tanstack/config/.github/setup@e4b48f16568324f76f467aa4c2aac2f05db632c3 - name: Build Packages run: pnpm run build - name: Publish Previews run: pnpx pkg-pr-new publish --pnpm --compact './packages/*' --template './examples/*/*' - name: Compressed Size Action - DB Package - uses: preactjs/compressed-size-action@v2 + uses: preactjs/compressed-size-action@66325aad6443cb7cf89c4bfcd414aea2367cda94 # 2.9.1 with: repo-token: '${{ secrets.GITHUB_TOKEN }}' pattern: './packages/db/dist/**/*.{js,mjs}' comment-key: 'db-package-size' build-script: 'build:minified' - name: Compressed Size Action - React DB Package - uses: preactjs/compressed-size-action@v2 + uses: preactjs/compressed-size-action@66325aad6443cb7cf89c4bfcd414aea2367cda94 # 2.9.1 with: repo-token: '${{ secrets.GITHUB_TOKEN }}' pattern: './packages/react-db/dist/**/*.{js,mjs}' @@ -81,9 +85,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - name: Setup Tools - uses: tanstack/config/.github/setup@main + uses: tanstack/config/.github/setup@e4b48f16568324f76f467aa4c2aac2f05db632c3 - name: Build Packages run: pnpm run build - name: Build Example Site @@ -95,9 +101,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false - name: Setup Tools - uses: tanstack/config/.github/setup@main + uses: tanstack/config/.github/setup@e4b48f16568324f76f467aa4c2aac2f05db632c3 - name: Build Packages run: pnpm run build - name: Build Starter Site diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6c5d363b9..6ec135f94 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,16 +23,17 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 + persist-credentials: true # release job pushes version/docs changes - name: Setup Tools - uses: tanstack/config/.github/setup@main + uses: tanstack/config/.github/setup@e4b48f16568324f76f467aa4c2aac2f05db632c3 - name: Run Tests run: pnpm run lint && pnpm run build && pnpm run test - name: Run Changesets (version or publish) id: changesets - uses: changesets/action@v1.5.3 + uses: changesets/action@e0145edc7d9d8679003495b11f87bd8ef63c0cba # v1.5.3 with: version: pnpm run changeset:version publish: pnpm run changeset:publish @@ -85,6 +86,6 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Comment on PRs about release if: steps.changesets.outputs.published == 'true' - uses: tanstack/config/.github/comment-on-release@main + uses: tanstack/config/.github/comment-on-release@e4b48f16568324f76f467aa4c2aac2f05db632c3 with: published-packages: ${{ steps.changesets.outputs.publishedPackages }} diff --git a/.github/workflows/reproduce-and-fix-issue-claude.yml b/.github/workflows/reproduce-and-fix-issue-claude.yml index 75bd6e259..10cfeb2fe 100644 --- a/.github/workflows/reproduce-and-fix-issue-claude.yml +++ b/.github/workflows/reproduce-and-fix-issue-claude.yml @@ -28,12 +28,13 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 + persist-credentials: false - name: Run Claude Code (auto issue handler) - uses: anthropics/claude-code-action@v1 + uses: anthropics/claude-code-action@f4fb5c6cdccc1ee7af63692f5d08d56efaa64cc8 # v1.0.121 with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} claude_args: | diff --git a/.github/workflows/review-pr-claude.yml b/.github/workflows/review-pr-claude.yml index e40e97580..a38f98d42 100644 --- a/.github/workflows/review-pr-claude.yml +++ b/.github/workflows/review-pr-claude.yml @@ -28,9 +28,10 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v6.0.1 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 + persist-credentials: false - name: Get PR branch id: pr-info @@ -42,10 +43,12 @@ jobs: echo "base_ref=$(echo $PR_DATA | jq -r '.baseRefName')" >> $GITHUB_OUTPUT - name: Checkout PR branch - run: git checkout ${{ steps.pr-info.outputs.head_ref }} + env: + HEAD_REF: ${{ steps.pr-info.outputs.head_ref }} + run: git checkout "$HEAD_REF" - name: Run Claude Code (PR review) - uses: anthropics/claude-code-action@v1 + uses: anthropics/claude-code-action@f4fb5c6cdccc1ee7af63692f5d08d56efaa64cc8 # v1.0.121 with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} plugin_marketplaces: 'https://github.com/anthropics/claude-code.git' diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml new file mode 100644 index 000000000..2202c720f --- /dev/null +++ b/.github/workflows/zizmor.yml @@ -0,0 +1,25 @@ +name: GitHub Actions Security Analysis + +on: + push: + branches: [main] + pull_request: + branches: ['**'] + +permissions: {} + +jobs: + zizmor: + name: zizmor + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Run zizmor + uses: zizmorcore/zizmor-action@b1d7e1fb5de872772f31590499237e7cce841e8e # v0.5.3 + with: + advanced-security: false + annotations: true