Skip to content

Commit 9de67e7

Browse files
ci: apply security best practices (#129)
Co-authored-by: Ulises Gascón <ulisesgascongonzalez@gmail.com>
1 parent 77e9390 commit 9de67e7

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

.github/dependabot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: monthly
7+
8+
- package-ecosystem: npm
9+
directory: /
10+
schedule:
11+
interval: monthly
12+
open-pull-requests-limit: 10
13+
ignore:
14+
- dependency-name: "*"
15+
update-types: ["version-update:semver-major"]

.github/workflows/ci.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@ on:
44
- pull_request
55
- push
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
test:
12+
permissions:
13+
checks: write # for coverallsapp/github-action to create new checks
14+
contents: read # for actions/checkout to fetch code
915
runs-on: ubuntu-latest
1016
strategy:
1117
matrix:
@@ -128,7 +134,7 @@ jobs:
128134
node-version: "22.0"
129135

130136
steps:
131-
- uses: actions/checkout@v4
137+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
132138

133139
- name: Install Node.js ${{ matrix.node-version }}
134140
shell: bash -eo pipefail -l {0}
@@ -196,19 +202,21 @@ jobs:
196202
run: npm run lint
197203

198204
- name: Collect code coverage
199-
uses: coverallsapp/github-action@master
205+
uses: coverallsapp/github-action@09b709cf6a16e30b0808ba050c7a6e8a5ef13f8d # master
200206
if: steps.list_env.outputs.nyc != ''
201207
with:
202208
github-token: ${{ secrets.GITHUB_TOKEN }}
203209
flag-name: run-${{ matrix.test_number }}
204210
parallel: true
205211

206212
coverage:
213+
permissions:
214+
checks: write # for coverallsapp/github-action to create new checks
207215
needs: test
208216
runs-on: ubuntu-latest
209217
steps:
210218
- name: Upload code coverage
211-
uses: coverallsapp/github-action@master
219+
uses: coverallsapp/github-action@09b709cf6a16e30b0808ba050c7a6e8a5ef13f8d # master
212220
with:
213221
github-token: ${{ secrets.github_token }}
214222
parallel-finished: true

0 commit comments

Comments
 (0)