Skip to content

Commit 23a7411

Browse files
committed
security: use commit hash instead of tag for 3rd party actions and add permissions
1 parent c2b46dc commit 23a7411

3 files changed

Lines changed: 17 additions & 4 deletions

File tree

.github/workflows/build-linux.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,25 @@ on:
33
push:
44
branches:
55
- main
6+
paths:
7+
- packages/**
8+
- .github/workflows/build-linux.yml
69
pull_request:
710
branches:
811
- main
912
paths:
1013
- packages/cpp.js/**
1114
- packages/cppjs-plugin-*/**
15+
- .github/workflows/build-linux.yml
16+
17+
permissions: {}
1218
jobs:
1319
build:
1420
runs-on: ubuntu-latest
1521
steps:
1622
- uses: actions/checkout@v4
1723
- name: Install pnpm
18-
uses: pnpm/action-setup@v4
24+
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 #v4
1925
- name: Use Node.js
2026
uses: actions/setup-node@v4
2127
with:

.github/workflows/build-macos.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,18 @@ on:
33
push:
44
branches:
55
- main
6+
paths:
7+
- packages/**
8+
- .github/workflows/build-macos.yml
69
pull_request:
710
branches:
811
- main
912
paths:
1013
- packages/cpp.js/**
1114
- packages/cppjs-plugin-*/**
15+
- .github/workflows/build-macos.yml
16+
17+
permissions: {}
1218
jobs:
1319
build:
1420
runs-on: macos-latest
@@ -44,7 +50,7 @@ jobs:
4450
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
4551
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles
4652
- name: Install pnpm
47-
uses: pnpm/action-setup@v4
53+
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 #v4
4854
- name: Use Node.js
4955
uses: actions/setup-node@v4
5056
with:

.github/workflows/deploy-website.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- main
77
paths:
88
- website/**
9+
- .github/workflows/deploy-website.yml
910
pull_request:
1011

1112
jobs:
@@ -18,7 +19,7 @@ jobs:
1819
steps:
1920
- uses: actions/checkout@v4
2021
- name: Install pnpm
21-
uses: pnpm/action-setup@v4
22+
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 #v4
2223
- name: Use Node.js
2324
uses: actions/setup-node@v4
2425
with:
@@ -28,7 +29,7 @@ jobs:
2829
- name: Build website
2930
run: pnpm run build:website
3031
- name: Deploy
31-
uses: peaceiris/actions-gh-pages@v4
32+
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e #v4
3233
if: github.ref == 'refs/heads/main'
3334
with:
3435
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)