-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Sync changes to v2.x #1312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sync changes to v2.x #1312
Changes from all commits
31b8132
2d70575
a1b4428
ba25a5c
4af318a
561f42c
5246d31
974d712
6377ed0
541620a
42ba0fb
b1c1960
0e67b30
44b7ab5
8cc3a5d
07c9e84
cbb4a80
4da126f
274550c
f1596eb
842088f
2579455
78a7535
2c01eb6
be3d4de
aa42bea
2a4ff03
67409df
cd4cd41
c283061
2405995
d0782a5
8cd2dba
900764f
88f2aa1
7dff48d
435be6c
6517e9a
ed5520d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,195 @@ | ||
name: ci | ||
|
||
on: | ||
- pull_request | ||
- push | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
name: | ||
- Node.js 0.10 | ||
- Node.js 0.12 | ||
- io.js 1.x | ||
- io.js 2.x | ||
- io.js 3.x | ||
- Node.js 4.x | ||
- Node.js 6.x | ||
- Node.js 8.x | ||
- Node.js 10.x | ||
- Node.js 11.x | ||
- Node.js 12.x | ||
- Node.js 13.x | ||
- Node.js 14.x | ||
- Node.js 15.x | ||
- Node.js 16.x | ||
- Node.js 17.x | ||
- Node.js 18.x | ||
- Node.js 19.x | ||
- Node.js 20.x | ||
- Node.js 21.x | ||
- Node.js 22.x | ||
- Node.js 23.x | ||
- Node.js 24.x | ||
|
||
include: | ||
- name: Node.js 0.10 | ||
node-version: "0.10" | ||
npm-i: mocha@3.5.3 nyc@10.3.2 | ||
|
||
- name: Node.js 0.12 | ||
node-version: "0.12" | ||
npm-i: mocha@3.5.3 nyc@10.3.2 | ||
|
||
- name: io.js 1.x | ||
node-version: "1.8" | ||
npm-i: mocha@3.5.3 nyc@10.3.2 | ||
|
||
- name: io.js 2.x | ||
node-version: "2.5" | ||
npm-i: mocha@3.5.3 nyc@10.3.2 | ||
|
||
- name: io.js 3.x | ||
node-version: "3.3" | ||
npm-i: mocha@3.5.3 nyc@10.3.2 | ||
|
||
- name: Node.js 4.x | ||
node-version: "4.9" | ||
npm-i: mocha@5.2.0 nyc@11.9.0 | ||
|
||
- name: Node.js 6.x | ||
node-version: "6.17" | ||
npm-i: mocha@6.2.2 nyc@14.1.1 | ||
|
||
- name: Node.js 8.x | ||
node-version: "8.17" | ||
npm-i: mocha@7.1.2 nyc@14.1.1 | ||
|
||
- name: Node.js 10.x | ||
node-version: "10.24" | ||
npm-i: mocha@8.4.0 | ||
|
||
- name: Node.js 11.x | ||
node-version: "11.15" | ||
npm-i: mocha@8.4.0 | ||
|
||
- name: Node.js 12.x | ||
node-version: "12.22" | ||
npm-i: mocha@9.2.2 | ||
|
||
- name: Node.js 13.x | ||
node-version: "13.14" | ||
npm-i: mocha@9.2.2 | ||
|
||
- name: Node.js 14.x | ||
node-version: "14.21" | ||
|
||
- name: Node.js 15.x | ||
node-version: "15.14" | ||
|
||
- name: Node.js 16.x | ||
node-version: "16.20" | ||
|
||
- name: Node.js 17.x | ||
node-version: "17.9" | ||
|
||
- name: Node.js 18.x | ||
node-version: "18.18" | ||
|
||
- name: Node.js 19.x | ||
node-version: "19.9" | ||
|
||
- name: Node.js 20.x | ||
node-version: "20.9" | ||
|
||
- name: Node.js 21.x | ||
node-version: "21.1" | ||
|
||
- name: Node.js 22.x | ||
node-version: "22.0" | ||
|
||
- name: Node.js 23.x | ||
node-version: "23" | ||
|
||
- name: Node.js 24.x | ||
node-version: "24" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
Check warningCode scanning / Scorecard Pinned-Dependencies Medium
score is 3: GitHub-owned GitHubAction not pinned by hash
Remediation tip: update your workflow using https://app.stepsecurity.io Click Remediation section below for further remediation help |
||
|
||
- name: Install Node.js ${{ matrix.node-version }} | ||
shell: bash -eo pipefail -l {0} | ||
run: | | ||
nvm install --default ${{ matrix.node-version }} | ||
if [[ "${{ matrix.node-version }}" == 0.* && "$(cut -d. -f2 <<< "${{ matrix.node-version }}")" -lt 10 ]]; then | ||
nvm install --alias=npm 0.10 | ||
nvm use ${{ matrix.node-version }} | ||
if [[ "$(npm -v)" == 1.1.* ]]; then | ||
nvm exec npm npm install -g npm@1.1 | ||
ln -fs "$(which npm)" "$(dirname "$(nvm which npm)")/npm" | ||
else | ||
sed -i '1s;^.*$;'"$(printf '#!%q' "$(nvm which npm)")"';' "$(readlink -f "$(which npm)")" | ||
fi | ||
npm config set strict-ssl false | ||
fi | ||
dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH" | ||
|
||
- name: Configure npm | ||
run: | | ||
if [[ "$(npm config get package-lock)" == "true" ]]; then | ||
npm config set package-lock false | ||
else | ||
npm config set shrinkwrap false | ||
fi | ||
|
||
- name: Remove npm module(s) ${{ matrix.npm-rm }} | ||
run: npm rm --silent --save-dev ${{ matrix.npm-rm }} | ||
if: matrix.npm-rm != '' | ||
|
||
- name: Install npm module(s) ${{ matrix.npm-i }} | ||
run: npm install --save-dev ${{ matrix.npm-i }} | ||
if: matrix.npm-i != '' | ||
Check warningCode scanning / Scorecard Pinned-Dependencies Medium
score is 3: npmCommand not pinned by hash
Click Remediation section below to solve this issue |
||
|
||
- name: Install Node.js dependencies | ||
run: npm install | ||
|
||
Check warningCode scanning / Scorecard Pinned-Dependencies Medium
score is 3: npmCommand not pinned by hash
Click Remediation section below to solve this issue |
||
- name: List environment | ||
id: list_env | ||
shell: bash | ||
run: | | ||
echo "node@$(node -v)" | ||
echo "npm@$(npm -v)" | ||
npm -s ls ||: | ||
(npm -s ls --depth=0 ||:) | awk -F'[ @]' 'NR>1 && $2 { print $2 "=" $3 }' >> "$GITHUB_OUTPUT" | ||
|
||
- name: Lint code | ||
run: npm run lint | ||
|
||
- name: Run tests | ||
shell: bash | ||
run: | | ||
if npm -ps ls nyc | grep -q nyc; then | ||
npm run test-ci | ||
else | ||
npm test | ||
fi | ||
|
||
- name: Collect code coverage | ||
uses: coverallsapp/github-action@master | ||
Check warningCode scanning / Scorecard Pinned-Dependencies Medium
score is 3: third-party GitHubAction not pinned by hash
Remediation tip: update your workflow using https://app.stepsecurity.io Click Remediation section below for further remediation help |
||
if: steps.list_env.outputs.nyc != '' | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
flag-name: run-${{ matrix.test_number }} | ||
parallel: true | ||
|
||
coverage: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Upload code coverage | ||
uses: coverallsapp/github-action@master | ||
Check warningCode scanning / Scorecard Pinned-Dependencies Medium
score is 3: third-party GitHubAction not pinned by hash
Remediation tip: update your workflow using https://app.stepsecurity.io Click Remediation section below for further remediation help |
||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
parallel-finished: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: ["master"] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: ["master"] | ||
schedule: | ||
- cron: "0 0 * * 1" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@3ab4101902695724f9365a384f86c1074d94e18c # v3.24.7 | ||
with: | ||
languages: javascript | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
# - name: Autobuild | ||
# uses: github/codeql-action/autobuild@3ab4101902695724f9365a384f86c1074d94e18c # v3.24.7 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun | ||
|
||
# If the Autobuild fails above, remove it and uncomment the following three lines. | ||
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. | ||
|
||
# - run: | | ||
# echo "Run, Build Application using script" | ||
# ./location_of_script_within_repo/buildscript.sh | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@3ab4101902695724f9365a384f86c1074d94e18c # v3.24.7 | ||
with: | ||
category: "/language:javascript" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# This workflow uses actions that are not certified by GitHub. They are provided | ||
# by a third-party and are governed by separate terms of service, privacy | ||
# policy, and support documentation. | ||
|
||
name: Scorecard supply-chain security | ||
|
||
on: | ||
# For Branch-Protection check. Only the default branch is supported. See | ||
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection | ||
branch_protection_rule: | ||
# To guarantee Maintained check is occasionally updated. See | ||
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained | ||
schedule: | ||
- cron: '16 21 * * 1' | ||
push: | ||
branches: [ "master" ] | ||
|
||
# Declare default permissions as read only. | ||
permissions: read-all | ||
|
||
jobs: | ||
analysis: | ||
name: Scorecard analysis | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# Needed to upload the results to code-scanning dashboard. | ||
security-events: write | ||
# Needed to publish results and get a badge (see publish_results below). | ||
id-token: write | ||
# Uncomment the permissions below if installing in a private repository. | ||
# contents: read | ||
# actions: read | ||
|
||
steps: | ||
- name: "Checkout code" | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: "Run analysis" | ||
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0 | ||
with: | ||
results_file: results.sarif | ||
results_format: sarif | ||
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if: | ||
# - you want to enable the Branch-Protection check on a *public* repository, or | ||
# - you are installing Scorecard on a *private* repository | ||
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat. | ||
# repo_token: ${{ secrets.SCORECARD_TOKEN }} | ||
|
||
# Public repositories: | ||
# - Publish results to OpenSSF REST API for easy access by consumers | ||
# - Allows the repository to include the Scorecard badge. | ||
# - See https://github.com/ossf/scorecard-action#publishing-results. | ||
# For private repositories: | ||
# - `publish_results` will always be set to `false`, regardless | ||
# of the value entered here. | ||
publish_results: true | ||
|
||
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF | ||
# format to the repository Actions tab. | ||
- name: "Upload artifact" | ||
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 | ||
with: | ||
name: SARIF file | ||
path: results.sarif | ||
retention-days: 5 | ||
|
||
# Upload the results to GitHub's code scanning dashboard. | ||
- name: "Upload to code-scanning" | ||
uses: github/codeql-action/upload-sarif@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9 | ||
with: | ||
sarif_file: results.sarif | ||
|
This file was deleted.
Check failure
Code scanning / Scorecard
Token-Permissions High