Skip to content

Commit b6398af

Browse files
committed
Tight node workflow security to address CWE-275
1 parent 862b7f9 commit b6398af

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/node.js.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
pull_request:
1010
branches: ["main"]
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
build:
1417
runs-on: ubuntu-latest
@@ -19,9 +22,11 @@ jobs:
1922
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2023

2124
steps:
22-
- uses: actions/checkout@v3
25+
- uses: actions/checkout@v4
26+
with:
27+
persist-credentials: false
2328
- name: Use Node.js ${{ matrix.node-version }}
24-
uses: actions/setup-node@v3
29+
uses: actions/setup-node@v4
2530
with:
2631
node-version: ${{ matrix.node-version }}
2732
cache: "npm"

0 commit comments

Comments
 (0)