Skip to content

Commit dc50d2d

Browse files
committed
General Hygiene
1 parent 17d9032 commit dc50d2d

File tree

3 files changed

+53
-113
lines changed

3 files changed

+53
-113
lines changed

.github/workflows/Build and test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ jobs:
2424
- name: Build from src
2525
uses: useblacksmith/setup-node@65c6ca86fdeb0ab3d85e78f57e4f6a7e4780b391 # v5.0.4
2626
with:
27-
node-version: '20.x'
27+
node-version: '22.x'
2828

2929
- run: yarn install --frozen-lockfile
3030
- run: yarn build-only
3131

32-
- uses: actions/upload-artifact@v3
32+
- uses: actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 # v3.2.1
3333
with:
3434
name: dist
3535
path: dist/
3636

3737
- run: tar -cvf node_modules.tar node_modules
3838

39-
- uses: actions/upload-artifact@v3
39+
- uses: actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 # v3.2.1
4040
with:
4141
name: node_modules
4242
path: node_modules.tar
@@ -48,7 +48,7 @@ jobs:
4848
runs-on: blacksmith-4vcpu-ubuntu-2204
4949
strategy:
5050
matrix:
51-
node-version: [15.x, 16.x, 17.x, 18.x, 19.x, latest]
51+
node-version: [16.x, 18.x, 20.x, 22.x, 23.x, latest]
5252
steps:
5353
- name: Harden Runner
5454
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2

.github/workflows/codeql.yml

Lines changed: 24 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
1-
# For most projects, this workflow file will not need changing; you simply need
2-
# to commit it to your repository.
3-
#
4-
# You may wish to alter this file to override the set of languages analyzed,
5-
# or to provide custom queries or build logic.
6-
#
7-
# ******** NOTE ********
8-
# We have attempted to detect the languages in your repository. Please check
9-
# the `language` matrix defined below to confirm you have the correct set of
10-
# supported CodeQL languages.
11-
#
12-
name: "CodeQL"
1+
name: 'CodeQL'
132

143
on:
154
push:
16-
branches: [ "develop" ]
5+
branches: ['develop']
176
pull_request:
18-
# The branches below must be a subset of the branches above
19-
branches: [ "develop" ]
7+
branches: ['develop']
208
schedule:
219
- cron: '32 13 * * 0'
2210

@@ -26,11 +14,6 @@ permissions:
2614
jobs:
2715
analyze:
2816
name: Analyze
29-
# Runner size impacts CodeQL analysis time. To learn more, please see:
30-
# - https://gh.io/recommended-hardware-resources-for-running-codeql
31-
# - https://gh.io/supported-runners-and-hardware-resources
32-
# - https://gh.io/using-larger-runners
33-
# Consider using larger runners for possible analysis time improvements.
3417
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'blacksmith-4vcpu-ubuntu-2204' }}
3518
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
3619
permissions:
@@ -41,50 +24,26 @@ jobs:
4124
strategy:
4225
fail-fast: false
4326
matrix:
44-
language: [ 'javascript' ]
45-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
46-
# Use only 'java' to analyze code written in Java, Kotlin or both
47-
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
48-
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
27+
language: ['javascript']
4928

5029
steps:
51-
- name: Harden Runner
52-
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
53-
with:
54-
egress-policy: audit
55-
56-
- name: Checkout repository
57-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
58-
59-
# Initializes the CodeQL tools for scanning.
60-
- name: Initialize CodeQL
61-
uses: github/codeql-action/init@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
62-
with:
63-
languages: ${{ matrix.language }}
64-
# If you wish to specify custom queries, you can do so here or in a config file.
65-
# By default, queries listed here will override any specified in a config file.
66-
# Prefix the list here with "+" to use these queries and those in the config file.
67-
68-
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
69-
# queries: security-extended,security-and-quality
70-
71-
72-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
73-
# If this step fails, then you should remove it and run the build manually (see below)
74-
- name: Autobuild
75-
uses: github/codeql-action/autobuild@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
76-
77-
# ℹ️ Command-line programs to run using the OS shell.
78-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
79-
80-
# If the Autobuild fails above, remove it and uncomment the following three lines.
81-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
82-
83-
# - run: |
84-
# echo "Run, Build Application using script"
85-
# ./location_of_script_within_repo/buildscript.sh
86-
87-
- name: Perform CodeQL Analysis
88-
uses: github/codeql-action/analyze@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
89-
with:
90-
category: "/language:${{matrix.language}}"
30+
- name: Harden Runner
31+
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f
32+
with:
33+
egress-policy: audit
34+
35+
- name: Checkout repository
36+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
37+
38+
- name: Initialize CodeQL
39+
uses: github/codeql-action/init@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169
40+
with:
41+
languages: ${{ matrix.language }}
42+
43+
- name: Autobuild
44+
uses: github/codeql-action/autobuild@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169
45+
46+
- name: Perform CodeQL Analysis
47+
uses: github/codeql-action/analyze@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169
48+
with:
49+
category: '/language:${{ matrix.language }}'

.github/workflows/scorecard.yml

Lines changed: 25 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,57 @@
1-
# This workflow uses actions that are not certified by GitHub. They are provided
2-
# by a third-party and are governed by separate terms of service, privacy
3-
# policy, and support documentation.
4-
5-
name: Scorecard supply-chain security
1+
name: Scorecard analysis workflow
62
on:
7-
# For Branch-Protection check. Only the default branch is supported. See
8-
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
9-
branch_protection_rule:
10-
# To guarantee Maintained check is occasionally updated. See
11-
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
12-
schedule:
13-
- cron: '20 8 * * 4'
143
push:
15-
branches: [ "develop" ]
4+
# Only the default branch is supported.
5+
branches:
6+
- develop
7+
schedule:
8+
# Weekly on Saturdays.
9+
- cron: '30 1 * * 6'
1610

17-
# Declare default permissions as read only.
1811
permissions: read-all
1912

2013
jobs:
2114
analysis:
2215
name: Scorecard analysis
23-
runs-on: blacksmith-4vcpu-ubuntu-2204
16+
runs-on: ubuntu-latest
2417
permissions:
25-
# Needed to upload the results to code-scanning dashboard.
18+
# Needed for Code scanning upload
2619
security-events: write
27-
# Needed to publish results and get a badge (see publish_results below).
20+
# Needed for GitHub OIDC token if publish_results is true
2821
id-token: write
29-
# Uncomment the permissions below if installing in a private repository.
30-
# contents: read
31-
# actions: read
3222

3323
steps:
34-
- name: Harden Runner
35-
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
36-
with:
37-
egress-policy: audit
38-
3924
- name: "Checkout code"
4025
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
4126
with:
4227
persist-credentials: false
43-
44-
- name: "Run analysis"
45-
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
28+
29+
- name: OSSF Scorecard action
30+
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46
4631
with:
32+
# OUTPUT: Path to file to store results
4733
results_file: results.sarif
34+
# OUTPUT: format of the results [json, sarif]
4835
results_format: sarif
49-
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
50-
# - you want to enable the Branch-Protection check on a *public* repository, or
51-
# - you are installing Scorecard on a *private* repository
52-
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
53-
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
54-
55-
# Public repositories:
56-
# - Publish results to OpenSSF REST API for easy access by consumers
57-
# - Allows the repository to include the Scorecard badge.
58-
# - See https://github.com/ossf/scorecard-action#publishing-results.
59-
# For private repositories:
60-
# - `publish_results` will always be set to `false`, regardless
61-
# of the value entered here.
36+
# Scorecard team runs a weekly scan of public GitHub repos,
37+
# see https://github.com/ossf/scorecard#public-data.
38+
# Setting `publish_results: true` helps us scale by leveraging your workflow to
39+
# extract the results instead of relying on our own infrastructure to run scans.
40+
# And it's free for you!
6241
publish_results: true
6342

64-
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
65-
# format to the repository Actions tab.
43+
# Upload the results as artifacts (optional). Commenting out will disable
44+
# uploads of run results in SARIF format to the repository Actions tab.
45+
# https://docs.github.com/en/actions/advanced-guides/storing-workflow-data-as-artifacts
6646
- name: "Upload artifact"
6747
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
6848
with:
6949
name: SARIF file
7050
path: results.sarif
7151
retention-days: 5
7252

73-
# Upload the results to GitHub's code scanning dashboard.
53+
# Upload the results to GitHub's code scanning dashboard (optional).
54+
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
7455
- name: "Upload to code-scanning"
7556
uses: github/codeql-action/upload-sarif@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
7657
with:

0 commit comments

Comments
 (0)