From dcad30bc3909d645510da4c95dac05f6af251b97 Mon Sep 17 00:00:00 2001 From: xuncha <1658671838@qq.com> Date: Tue, 7 Apr 2026 22:58:41 +0800 Subject: [PATCH] =?UTF-8?q?x=E4=BF=AE=E5=A4=8D=E5=B7=A5=E4=BD=9C=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/security-scan.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/security-scan.yml b/.github/workflows/security-scan.yml index e598698..11a1376 100644 --- a/.github/workflows/security-scan.yml +++ b/.github/workflows/security-scan.yml @@ -1,5 +1,8 @@ name: Security Scan +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true + on: schedule: - cron: '0 2 * * *' # 每天 UTC 02:00 @@ -24,15 +27,15 @@ jobs: steps: - name: Checkout ${{ matrix.branch }} - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: ref: ${{ matrix.branch }} fetch-depth: 0 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v5 with: - node-version: '20' + node-version: '24' cache: 'npm' # 使用 npm 缓存加速 - name: Install dependencies @@ -71,10 +74,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 + - name: Setup Node.js + uses: actions/setup-node@v5 + with: + node-version: '24' + cache: 'npm' + - name: Run npm audit on all branches run: | git branch -r | grep -v HEAD | sed 's|origin/||' | tr -d ' ' | while read branch; do @@ -84,4 +93,4 @@ jobs: npm ci --ignore-scripts --silent 2>/dev/null || npm install --ignore-scripts --silent 2>/dev/null || true npm audit --audit-level=moderate 2>/dev/null || true done - continue-on-error: true \ No newline at end of file + continue-on-error: true