Skip to content

Commit cf5195c

Browse files
andris9claude
andcommitted
chore: harden workflow token permissions and update GitHub Actions
Set explicit GITHUB_TOKEN permissions in the test workflow (contents: read) and the stale workflow (issues + pull-requests: write), resolving the CodeQL actions/missing-workflow-permissions alerts. Update actions/checkout and actions/setup-node to v5 and actions/stale to v10, which run on Node.js 24 and clear the runner deprecation annotations. Co-Authored-By: Claude Fable 5 <[email protected]>
1 parent 067aebe commit cf5195c

4 files changed

Lines changed: 15 additions & 8 deletions

File tree

‎.github/workflows/codeql.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434

3535
steps:
3636
- name: Checkout repository
37-
uses: actions/checkout@v4
37+
uses: actions/checkout@v5
3838

3939
- name: Initialize CodeQL
4040
uses: github/codeql-action/init@v4

‎.github/workflows/release.yaml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ jobs:
1818
with:
1919
release-type: node
2020
# The logic below handles the npm publication:
21-
- uses: actions/checkout@v4
21+
- uses: actions/checkout@v5
2222
# these if statements ensure that a publication only occurs when
2323
# a new release is created:
2424
if: ${{ steps.release.outputs.release_created }}
25-
- uses: actions/setup-node@v4
25+
- uses: actions/setup-node@v5
2626
with:
2727
node-version: 24
28-
registry-url: "https://registry.npmjs.org"
28+
registry-url: 'https://registry.npmjs.org'
2929
if: ${{ steps.release.outputs.release_created }}
3030
- run: npm ci
3131
if: ${{ steps.release.outputs.release_created }}

‎.github/workflows/stale.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@ on:
33
schedule:
44
- cron: '30 1 * * *'
55

6+
permissions:
7+
issues: write
8+
pull-requests: write
9+
610
jobs:
711
stale:
812
runs-on: ubuntu-latest
913
steps:
10-
- uses: actions/stale@v9
14+
- uses: actions/stale@v10
1115
with:
1216
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
1317
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'

‎.github/workflows/test.yml‎

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

7+
permissions:
8+
contents: read
9+
710
jobs:
811
syntax-compat:
912
runs-on: ubuntu-latest
1013
steps:
11-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@v5
1215
- name: Verify Node.js 6 syntax compatibility
1316
run: docker run --rm -v "$PWD:/app:ro" -w /app node:6-alpine node test/syntax-compat.js
1417

@@ -19,9 +22,9 @@ jobs:
1922
os: [ubuntu-latest]
2023
runs-on: ${{ matrix.os }}
2124
steps:
22-
- uses: actions/checkout@v4
25+
- uses: actions/checkout@v5
2326
- name: Use Node.js ${{ matrix.node }}
24-
uses: actions/setup-node@v4
27+
uses: actions/setup-node@v5
2528
with:
2629
node-version: ${{ matrix.node }}
2730
- run: npm install

0 commit comments

Comments
 (0)