Skip to content

Commit 9a9f489

Browse files
authored
Build: Improve security of the GitHub Actions setup
Changes: 1. Reference concrete hashes of actions with versions in comments 2. Update actions to recent versions 3. Set up automatic dependabot montly PRs updating actions Fortunately, hashes with versions in comments is syntax recognized by dependabot automatic updates; we're using it with success in jQuery Core. Closes gh-497
1 parent 7bdb3de commit 9a9f489

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: "/"
5+
schedule:
6+
interval: monthly

.github/workflows/node.js.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ jobs:
1212
NODE_VERSION: [10.x, 18.x]
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v2
15+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
1616

1717
- name: Cache
18-
uses: actions/cache@v2
18+
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
1919
with:
2020
path: ~/.npm
2121
key: ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-npm-lock-${{ hashFiles('**/package-lock.json') }}
2222
restore-keys: |
2323
${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-npm-lock-
2424
2525
- name: Use Node.js ${{ matrix.NODE_VERSION }}
26-
uses: actions/setup-node@v2.1.2
26+
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
2727
with:
2828
node-version: ${{ matrix.NODE_VERSION }}
2929

0 commit comments

Comments
 (0)