Skip to content

Commit f1a2623

Browse files
authored
Merge pull request #8 from 88labs/feat/takumi-guard
feat: integrate Takumi Guard for npm supply chain protection
2 parents 4abd855 + 747b675 commit f1a2623

2 files changed

Lines changed: 35 additions & 3 deletions

File tree

.github/workflows/asset-size.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,18 @@ jobs:
66
compare:
77
timeout-minutes: 15
88
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
id-token: write
913

1014
steps:
1115
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
1216
with:
1317
fetch-depth: 0
18+
- uses: flatt-security/setup-takumi-guard-npm@8f53b50568e4466f2d92504f349c05b9ffcb8b59 # v1.0.0
19+
with:
20+
bot-id: "BT01KJW2C86AE4TDJRN1YH21K840" # 88labs
1421
- uses: chrysanthos/simple-asset-size-reporter@3c86a594c400b40a4ebe6418da605a5d2755ef52 # 1.0.2
1522
with:
1623
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/tests.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ jobs:
1010
test:
1111
timeout-minutes: 10
1212
name: Node v${{ matrix.node-version }} on ${{ matrix.os }}
13+
permissions:
14+
contents: read
15+
id-token: write
1316
strategy:
1417
fail-fast: false
1518
matrix:
@@ -30,7 +33,13 @@ jobs:
3033
with:
3134
node-version: ${{ matrix.node-version }}
3235
cache: 'npm'
33-
- run: npm install
36+
- uses: flatt-security/setup-takumi-guard-npm@8f53b50568e4466f2d92504f349c05b9ffcb8b59 # v1.0.0
37+
with:
38+
bot-id: "BT01KJW2C86AE4TDJRN1YH21K840" # 88labs
39+
- name: Install dependencies
40+
shell: bash
41+
run: npm install || (sleep 30 && npm install) || (sleep 60 && npm install)
42+
- run: git checkout -- .npmrc || true
3443
- run: npm test
3544
env:
3645
CI: true
@@ -39,14 +48,22 @@ jobs:
3948
timeout-minutes: 15
4049
name: Measure performance impact of changes
4150
runs-on: ubuntu-latest
51+
permissions:
52+
contents: read
53+
id-token: write
4254

4355
steps:
4456
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
4557
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
4658
with:
4759
node-version: 18
4860
cache: 'npm'
49-
- run: npm install
61+
- uses: flatt-security/setup-takumi-guard-npm@8f53b50568e4466f2d92504f349c05b9ffcb8b59 # v1.0.0
62+
with:
63+
bot-id: "BT01KJW2C86AE4TDJRN1YH21K840" # 88labs
64+
- name: Install dependencies
65+
run: npm install || (sleep 30 && npm install) || (sleep 60 && npm install)
66+
- run: git checkout -- .npmrc || true
5067
- run: npm run benchmark
5168
env:
5269
CI: true
@@ -55,14 +72,22 @@ jobs:
5572
timeout-minutes: 15
5673
name: Ensure typescript compatibility
5774
runs-on: ubuntu-latest
75+
permissions:
76+
contents: read
77+
id-token: write
5878

5979
steps:
6080
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
6181
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
6282
with:
6383
node-version: 18
6484
cache: 'npm'
65-
- run: npm install
85+
- uses: flatt-security/setup-takumi-guard-npm@8f53b50568e4466f2d92504f349c05b9ffcb8b59 # v1.0.0
86+
with:
87+
bot-id: "BT01KJW2C86AE4TDJRN1YH21K840" # 88labs
88+
- name: Install dependencies
89+
run: npm install || (sleep 30 && npm install) || (sleep 60 && npm install)
90+
- run: git checkout -- .npmrc || true
6691
- run: npm install typescript
6792
- run: tsc index.d.ts --ignoreConfig --types node
6893
env:

0 commit comments

Comments
 (0)