-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
chore: Supply chain hardening #15876
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,24 +36,12 @@ permissions: | |
| contents: read # to fetch code (actions/checkout) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we could do |
||
|
|
||
| jobs: | ||
| pkg-pr-new: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: pnpm/action-setup@v6.0.8 | ||
| - uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: 24 | ||
| cache: pnpm | ||
| - run: pnpm install --frozen-lockfile | ||
| - run: pnpm build | ||
| - run: pnpx pkg-pr-new publish --comment=off ./packages/* | ||
| lint-all: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: pnpm/action-setup@v6.0.8 | ||
| - uses: actions/setup-node@v6 | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | ||
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | ||
| with: | ||
| node-version: 24 | ||
| cache: pnpm | ||
|
|
@@ -93,9 +81,9 @@ jobs: | |
| MATRIX_VITE: ${{matrix.vite}} | ||
| steps: | ||
| - run: git config --global core.autocrlf false | ||
| - uses: actions/checkout@v6 | ||
| - uses: pnpm/action-setup@v6.0.8 | ||
| - uses: actions/setup-node@v6 | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | ||
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| cache: pnpm | ||
|
|
@@ -121,7 +109,7 @@ jobs: | |
| run: find packages -type d -name test-results -not -empty | tar -czf test-results.tar.gz --files-from=- | ||
| - name: Upload test results | ||
| if: failure() | ||
| uses: actions/upload-artifact@v7 | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| retention-days: 3 | ||
| name: test-failure-${{ github.run_id }}-${{ matrix.os }}-${{ matrix.node-version }}-${{ matrix.e2e-browser }}-vite-${{matrix.vite}} | ||
|
|
@@ -161,9 +149,9 @@ jobs: | |
| KIT_E2E_BROWSER: ${{matrix.e2e-browser}} | ||
| steps: | ||
| - run: git config --global core.autocrlf false | ||
| - uses: actions/checkout@v6 | ||
| - uses: pnpm/action-setup@v6.0.8 | ||
| - uses: actions/setup-node@v6 | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | ||
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
| cache: pnpm | ||
|
|
@@ -179,7 +167,7 @@ jobs: | |
| run: find packages -type d -name test-results -not -empty | tar -czf test-results-cross-platform-${{ matrix.mode }}.tar.gz --files-from=- | ||
| - name: Upload test results | ||
| if: failure() | ||
| uses: actions/upload-artifact@v7 | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| retention-days: 3 | ||
| name: test-failure-cross-platform-${{ matrix.mode }}-${{ github.run_id }}-${{ matrix.os }}-${{ matrix.node-version }}-${{ matrix.e2e-browser }} | ||
|
|
@@ -195,9 +183,9 @@ jobs: | |
| - mode: 'build' | ||
| steps: | ||
| - run: git config --global core.autocrlf false | ||
| - uses: actions/checkout@v6 | ||
| - uses: pnpm/action-setup@v6.0.8 | ||
| - uses: actions/setup-node@v6 | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | ||
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | ||
| with: | ||
| node-version: 24 | ||
| cache: pnpm | ||
|
|
@@ -213,7 +201,7 @@ jobs: | |
| run: find packages -type d -name test-results -not -empty | tar -czf test-results-server-side-route-resolution-${{ matrix.mode }}.tar.gz --files-from=- | ||
| - name: Upload test results | ||
| if: failure() | ||
| uses: actions/upload-artifact@v7 | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| retention-days: 3 | ||
| name: test-failure-server-side-route-resolution-${{ matrix.mode }}-${{ github.run_id }} | ||
|
|
@@ -229,9 +217,9 @@ jobs: | |
| - mode: 'build' | ||
| steps: | ||
| - run: git config --global core.autocrlf false | ||
| - uses: actions/checkout@v6 | ||
| - uses: pnpm/action-setup@v6.0.8 | ||
| - uses: actions/setup-node@v6 | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | ||
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | ||
| with: | ||
| node-version: 24 | ||
| cache: pnpm | ||
|
|
@@ -247,7 +235,7 @@ jobs: | |
| run: find packages -type d -name test-results -not -empty | tar -czf test-results-svelte-async-${{ matrix.mode }}.tar.gz --files-from=- | ||
| - name: Upload test results | ||
| if: failure() | ||
| uses: actions/upload-artifact@v7 | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| retention-days: 3 | ||
| name: test-failure-svelte-async-${{ matrix.mode }}-${{ github.run_id }} | ||
|
|
@@ -258,14 +246,14 @@ jobs: | |
| matrix: | ||
| node-version: [18, 20, 22, 24] | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: pnpm/action-setup@v6.0.8 | ||
| - uses: actions/setup-node@v6 | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | ||
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | ||
| with: | ||
| node-version: ${{matrix.node-version}} | ||
| cache: pnpm | ||
| # required for testing netlify edge functions | ||
| - uses: denoland/setup-deno@v2 | ||
| - uses: denoland/setup-deno@667a34cdef165d8d2b2e98dde39547c9daac7282 # v2.0.4 | ||
| with: | ||
| deno-version: ^2.2.4 | ||
| - run: pnpm install --frozen-lockfile | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -28,7 +28,7 @@ jobs: | |||||||
| timeout-minutes: 15 | ||||||||
| environment: '@sveltejs/adapter-vercel platform tests' | ||||||||
| steps: | ||||||||
| - uses: actions/checkout@v6 | ||||||||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||||||||
| with: | ||||||||
| ref: ${{ inputs.sha || github.sha }} | ||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
|
||||||||
|
|
||||||||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -23,13 +23,13 @@ jobs: | |||||||
| runs-on: ubuntu-latest | ||||||||
| steps: | ||||||||
| - name: Checkout Repo | ||||||||
| uses: actions/checkout@v6 | ||||||||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||||||||
| with: | ||||||||
| # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits | ||||||||
| fetch-depth: 0 | ||||||||
| - uses: pnpm/action-setup@v6.0.8 | ||||||||
| - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | ||||||||
| - name: Setup Node.js | ||||||||
| uses: actions/setup-node@v6 | ||||||||
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | ||||||||
| with: | ||||||||
| node-version: 24.x | ||||||||
| cache: pnpm | ||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Disabling cache in the release workflow can help reduce risk of cache poisoning attacks being able to get code published - this seems to be the way to do it with |
||||||||
|
|
@@ -38,7 +38,7 @@ jobs: | |||||||
|
|
||||||||
| - name: Create Release Pull Request or Publish to npm | ||||||||
| id: changesets | ||||||||
| uses: changesets/action@v1 | ||||||||
| uses: changesets/action@63a615b9cd06ba9a3e6d13796c7fbcb080a60a0b # v1.8.0 | ||||||||
| with: | ||||||||
| # This expects you to have a script called release which does a build for your packages and calls changeset publish | ||||||||
| publish: pnpm changeset:release | ||||||||
|
|
||||||||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,17 @@ | ||
| minimumReleaseAge: 2880 | ||
| minimumReleaseAgeExclude: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a lot more that needed to be excluded in vps https://github.com/sveltejs/vite-plugin-svelte/blob/71f93de833a48f1f7134b56d9a38d0e2d1255d1c/pnpm-workspace.yaml#L9
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm. zimmerframe and esm-env seem legit but it's weird to exclude the other ones. They're legitimately outside our sphere of influence / direct trust
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While true that we don't control them, I have a lot of trust in Vite and we have to bump it a lot for testing new beta releases, addressing CVEs, etc. and it gets annoying if we can't do that |
||
| - '@sveltejs/*' | ||
| - svelte | ||
| - esrap | ||
| - devalue | ||
| - zimmerframe | ||
| - prettier-plugin-svelte | ||
| - svelte-check | ||
| - esm-env | ||
| blockExoticSubdeps: true | ||
| linkWorkspacePackages: true | ||
| shellEmulator: true | ||
|
|
||
| packages: | ||
| - packages/* | ||
| - packages/adapter-cloudflare/test/apps/* | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.