Skip to content

Commit f897007

Browse files
ci: apply security best practices (#1311)
Co-authored-by: Ulises Gascón <[email protected]>
1 parent 061f4cb commit f897007

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
fail-fast: false
@@ -80,7 +86,7 @@ jobs:
8086
node-version: "24"
8187

8288
steps:
83-
- uses: actions/checkout@v4
89+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
8490

8591
- name: Install Node.js ${{ matrix.node-version }}
8692
shell: bash -eo pipefail -l {0}
@@ -132,19 +138,21 @@ jobs:
132138
fi
133139
134140
- name: Collect code coverage
135-
uses: coverallsapp/github-action@v2
141+
uses: coverallsapp/github-action@09b709cf6a16e30b0808ba050c7a6e8a5ef13f8d # master
136142
if: steps.list_env.outputs.nyc != ''
137143
with:
138144
github-token: ${{ secrets.GITHUB_TOKEN }}
139145
flag-name: run-${{ matrix.test_number }}
140146
parallel: true
141147

142148
coverage:
149+
permissions:
150+
checks: write # for coverallsapp/github-action to create new checks
143151
needs: test
144152
runs-on: ubuntu-latest
145153
steps:
146154
- name: Upload code coverage
147-
uses: coverallsapp/github-action@v2
155+
uses: coverallsapp/github-action@09b709cf6a16e30b0808ba050c7a6e8a5ef13f8d # master
148156
with:
149157
github-token: ${{ secrets.GITHUB_TOKEN }}
150158
parallel-finished: true

0 commit comments

Comments
 (0)