Skip to content

Commit 122714c

Browse files
step-security-botUlisesGasconbjohansebas
authored
[StepSecurity] Apply security best practices (#1047)
* [StepSecurity] Apply security best practices Signed-off-by: StepSecurity Bot <[email protected]> * Update dependabot.yml * ping supertest versions in CI Signed-off-by: Sebastian Beltran <[email protected]> --------- Signed-off-by: StepSecurity Bot <[email protected]> Signed-off-by: Sebastian Beltran <[email protected]> Co-authored-by: Ulises Gascón <[email protected]> Co-authored-by: Sebastian Beltran <[email protected]>
1 parent 6edf5ee commit 122714c

File tree

2 files changed

+30
-12
lines changed

2 files changed

+30
-12
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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

.github/workflows/ci.yml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
- pull_request
55
- push
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
test:
912
runs-on: ubuntu-latest
@@ -79,33 +82,34 @@ jobs:
7982

8083
- name: Node.js 8.x
8184
node-version: "8.17"
82-
85+
8386

8487
- name: Node.js 9.x
8588
node-version: "9.11"
86-
89+
8790

8891
- name: Node.js 10.x
8992
node-version: "10.24"
90-
93+
9194

9295
- name: Node.js 11.x
9396
node-version: "11.15"
94-
97+
9598

9699
- name: Node.js 12.x
97100
node-version: "12.22"
98-
101+
99102

100103
- name: Node.js 13.x
101104
node-version: "13.14"
102-
105+
103106

104107
- name: Node.js 14.x
105108
node-version: "14.21"
106109

107110
- name: Node.js 15.x
108-
node-version: "15.14"
111+
node-version: "15.14"
112+
109113

110114
- name: Node.js 16.x
111115
node-version: "16.20"
@@ -126,7 +130,7 @@ jobs:
126130
node-version: "21.6"
127131

128132
steps:
129-
- uses: actions/checkout@v4
133+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
130134

131135
- name: Install Node.js ${{ matrix.node-version }}
132136
shell: bash -eo pipefail -l {0}
@@ -204,25 +208,28 @@ jobs:
204208
fi
205209
206210
- name: Upload code coverage
207-
uses: actions/upload-artifact@v4
211+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
208212
if: steps.list_env.outputs.nyc != ''
209213
with:
210214
name: coverage-${{ matrix.node-version }}
211215
path: "./coverage/${{ matrix.node-version }}"
212216
retention-days: 1
213217

214218
coverage:
219+
permissions:
220+
checks: write # for coverallsapp/github-action to create new checks
221+
contents: read # for actions/checkout to fetch code
215222
needs: test
216223
runs-on: ubuntu-latest
217224
steps:
218-
- uses: actions/checkout@v4
225+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
219226

220227
- name: Install lcov
221228
shell: bash
222229
run: sudo apt-get -y install lcov
223230

224231
- name: Collect coverage reports
225-
uses: actions/download-artifact@v4
232+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
226233
with:
227234
path: ./coverage
228235

@@ -231,6 +238,6 @@ jobs:
231238
run: find ./coverage -name lcov.info -exec printf '-a %q\n' {} \; | xargs lcov -o ./coverage/lcov.info
232239

233240
- name: Upload coverage report
234-
uses: coverallsapp/github-action@master
241+
uses: coverallsapp/github-action@09b709cf6a16e30b0808ba050c7a6e8a5ef13f8d # master
235242
with:
236243
github-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)