Skip to content

Commit 5ef5c34

Browse files
committed
chore: switch SAST from semgrep to CodeQL and update Node workflows to v24
- Replace semgrep workflow with CodeQL static analysis (github/codeql-action) to align with OpenSSF Scorecard recognition requirement (issue #1827) - Update CI workflows from Node 20 (EOL) to Node 24 (current LTS): - coverage.yml: Node 20.x to 24.x - release.yml: Node 20 to 24 (all three jobs) - cve-scanning.yml: simplify to single Node 24 (removes matrix) - Add Node engine constraint (>=22) to root package.json per maintainer guidance indicating support floor and future Node 25 capability (issue #1826) Closes #1827 #1826
1 parent cc84068 commit 5ef5c34

6 files changed

Lines changed: 53 additions & 36 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Static code analysis
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
types: [opened, reopened, synchronize, ready_for_review]
8+
schedule:
9+
# Run every day at 5am and 5pm
10+
- cron: '0 5,17 * * *'
11+
12+
permissions: read-all
13+
14+
jobs:
15+
analyze:
16+
name: CodeQL analysis
17+
runs-on: ubuntu-latest
18+
permissions:
19+
security-events: write
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
language: [javascript-typescript]
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
29+
30+
- name: Initialize CodeQL
31+
uses: github/codeql-action/init@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
32+
with:
33+
languages: ${{ matrix.language }}
34+
35+
- name: Autobuild
36+
uses: github/codeql-action/autobuild@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8
37+
38+
- name: Analyze
39+
uses: github/codeql-action/analyze@dd746615b3b9d728a6a37ca2045b68ca76d4841a # v3.28.8

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Set up Node.js
2929
uses: actions/setup-node@v6
3030
with:
31-
node-version: 20.x
31+
node-version: 24.x
3232

3333
- name: Install dependencies
3434
run: npm ci

.github/workflows/cve-scanning.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,12 @@ permissions:
2525
jobs:
2626
build:
2727
runs-on: ubuntu-latest
28-
strategy:
29-
matrix:
30-
node-version: [20]
3128
steps:
3229
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
33-
- name: Use Node.js ${{ matrix.node-version }}
30+
- name: Use Node.js 24
3431
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
3532
with:
36-
node-version: ${{ matrix.node-version }}
33+
node-version: 24
3734

3835
- run: npm install
3936

.github/workflows/release.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Configure Node
2525
uses: actions/setup-node@v4
2626
with:
27-
node-version: 22
27+
node-version: 24
2828

2929
- name: Install dependencies
3030
run: npm ci
@@ -105,11 +105,11 @@ jobs:
105105
- name: Configure Node for npmjs.org
106106
uses: actions/setup-node@v4
107107
with:
108+
<<<<<<< HEAD
108109
node-version: 22
109-
registry-url: https://registry.npmjs.org
110-
always-auth: true
111-
112-
- name: Publish tarballs to npmjs.org (with provenance and dist-tag)
110+
=======
111+
node-version: 24
112+
node-version: 24
113113
env:
114114
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # npm automation token
115115
PUBLISH_TAG: ${{ needs.build_and_pack.outputs.publish_tag }}
@@ -136,9 +136,10 @@ jobs:
136136
- name: Configure Node for GitHub Packages
137137
uses: actions/setup-node@v4
138138
with:
139+
<<<<<<< HEAD
139140
node-version: 22
140-
registry-url: https://npm.pkg.github.com
141-
scope: '@finos'
141+
=======
142+
node-version: 24
142143
always-auth: true
143144

144145
- name: Publish tarballs to GitHub Packages (with dist-tag)

.github/workflows/semgrep.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
"tag": "latest"
1212
},
1313
"license": "Apache-2.0",
14+
"engines": {
15+
"node": ">=22"
16+
},
1417
"main": "dist/index.js",
1518
"typings": "dist/index.d.ts",
1619
"module": "dist/fdc3.esm.js",

0 commit comments

Comments
 (0)