Skip to content

Commit 04abb4d

Browse files
Update Workflows
Update actions to the latest versions. Format documents.
1 parent 63304b2 commit 04abb4d

File tree

5 files changed

+181
-181
lines changed

5 files changed

+181
-181
lines changed

.github/workflows/Deploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
runs-on: ubuntu-latest
4343

4444
# Require the test step to complete before creating the artifact
45-
needs: [ Test-Unit, Test-Lint ]
45+
needs: [Test-Unit, Test-Lint]
4646

4747
# Sets the scopes available to the github_token injected to the GH Actions runner
4848
permissions:
@@ -58,7 +58,7 @@ jobs:
5858

5959
# Set up NodeJS on the build host with caching support to optimize execution
6060
- name: Setup Node.JS Runtime
61-
uses: actions/setup-node@v4
61+
uses: actions/setup-node@v6
6262
with:
6363
node-version: 22
6464
cache: npm
@@ -78,7 +78,7 @@ jobs:
7878

7979
# Create an attestation for the compiled package and upload it to the internal system for health tracking
8080
- name: Attest Compiled Package
81-
uses: actions/attest-build-provenance@v2
81+
uses: actions/attest-build-provenance@v3
8282
with:
8383
subject-path: package.zip
8484

@@ -116,7 +116,7 @@ jobs:
116116
steps:
117117
# Set up NodeJS on the build host with caching support to optimize execution
118118
- name: Set up Node.JS Runtime
119-
uses: actions/setup-node@v4
119+
uses: actions/setup-node@v6
120120
with:
121121
node-version: 22
122122
registry-url: https://registry.npmjs.org

.github/workflows/Security-AdvancedSecretScan.yml

Lines changed: 67 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -3,81 +3,81 @@ name: Static Analysis - Advanced Secret Scan
33

44
# When this workflow triggers
55
on:
6-
# Allows you to run this workflow manually from the Actions tab
7-
workflow_dispatch:
6+
# Allows you to run this workflow manually from the Actions tab
7+
workflow_dispatch:
88

9-
# Allow this workflow to be called from another workflow
10-
workflow_call:
9+
# Allow this workflow to be called from another workflow
10+
workflow_call:
1111

12-
# Run the unit tests on every change
13-
push:
14-
branches: [ main ]
15-
pull_request:
16-
branches: [ main ]
12+
# Run the unit tests on every change
13+
push:
14+
branches: [main]
15+
pull_request:
16+
branches: [main]
1717

1818
# Define each session of execution that should be executed
1919
jobs:
20-
SecretScan:
21-
# Display name of the job
22-
name: Scan for Secrets
20+
SecretScan:
21+
# Display name of the job
22+
name: Scan for Secrets
2323

24-
# Operating system filter for the runners
25-
runs-on: ubuntu-latest
24+
# Operating system filter for the runners
25+
runs-on: ubuntu-latest
2626

27-
# Sets the scopes available to the github_token injected to the GH Actions runner
28-
permissions:
29-
contents: read
27+
# Sets the scopes available to the github_token injected to the GH Actions runner
28+
permissions:
29+
contents: read
3030

31-
steps:
32-
# Calculate the depth and branch for checkout optimization
33-
- name: Calculate Checkout Depth and Branch
34-
shell: bash
35-
env:
36-
# Untrusted inputs passed via env (no use inside the run script of ${{ }}).
37-
UNTRUST_PR_REF: ${{ github.event.pull_request.head.ref }}
38-
UNTRUST_PR_COMMITS_COUNT: ${{ github.event.pull_request.commits }}
39-
UNTRUST_PUSH_COMMIT_LIST_JSON: ${{ toJson(github.event.commits) }}
40-
run: |
41-
# Exit on error (-e), treat unset variables as errors (-u), and fail on pipeline errors (-o pipefail)
42-
set -euo pipefail
31+
steps:
32+
# Calculate the depth and branch for checkout optimization
33+
- name: Calculate Checkout Depth and Branch
34+
shell: bash
35+
env:
36+
# Untrusted inputs passed via env (no use inside the run script of ${{ }}).
37+
UNTRUST_PR_REF: ${{ github.event.pull_request.head.ref }}
38+
UNTRUST_PR_COMMITS_COUNT: ${{ github.event.pull_request.commits }}
39+
UNTRUST_PUSH_COMMIT_LIST_JSON: ${{ toJson(github.event.commits) }}
40+
run: |
41+
# Exit on error (-e), treat unset variables as errors (-u), and fail on pipeline errors (-o pipefail)
42+
set -euo pipefail
4343
44-
# If this run was triggered by a push event
45-
if [ "$GITHUB_EVENT_NAME" = "push" ]; then
46-
# Count how many commits are in the push event using jq (a JSON parser)
47-
raw_depth=$(printf '%s' "$UNTRUST_PUSH_COMMIT_LIST_JSON" | jq 'length')
48-
# Make sure the depth is a valid number; if not, default to 0
49-
if ! [[ "$raw_depth" =~ ^[0-9]+$ ]]; then raw_depth=0; fi
50-
# Add a small buffer (+2) so we have enough history for scanning
51-
depth=$(( raw_depth + 2 ))
52-
# Save the computed depth into the GitHub Actions environment for later steps
53-
printf 'depth=%s\n' "$depth" | tr -d '\n\r' >> "$GITHUB_ENV"
54-
# Use the branch name from the push event, cleaned of any stray characters
55-
safe_branch=$(printf '%s' "$GITHUB_REF_NAME" | tr -d '\n\r')
56-
# Save the branch name into the environment for later steps
57-
printf 'branch=%s\n' "$safe_branch" >> "$GITHUB_ENV"
58-
elif [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
59-
# Read the number of commits in the PR; default to 0 if missing
60-
pr_commits="${UNTRUST_PR_COMMITS_COUNT:-0}"
61-
# Validate that the commit count is a number; if not, set to 0
62-
if ! [[ "$pr_commits" =~ ^[0-9]+$ ]]; then pr_commits=0; fi
63-
# Add a small buffer (+2) so we have enough history for scanning
64-
depth=$(( pr_commits + 2 ))
65-
# Use the incoming PR branch name, cleaned of any stray characters
66-
safe_branch=$(printf '%s' "$UNTRUST_PR_REF" | tr -d '\n\r')
67-
# Save the computed depth into the environment for later steps
68-
printf 'depth=%s\n' "$depth" | tr -d '\n\r' >> "$GITHUB_ENV"
69-
# Save the branch name into the environment for later steps
70-
printf 'branch=%s\n' "$safe_branch" >> "$GITHUB_ENV"
71-
fi
44+
# If this run was triggered by a push event
45+
if [ "$GITHUB_EVENT_NAME" = "push" ]; then
46+
# Count how many commits are in the push event using jq (a JSON parser)
47+
raw_depth=$(printf '%s' "$UNTRUST_PUSH_COMMIT_LIST_JSON" | jq 'length')
48+
# Make sure the depth is a valid number; if not, default to 0
49+
if ! [[ "$raw_depth" =~ ^[0-9]+$ ]]; then raw_depth=0; fi
50+
# Add a small buffer (+2) so we have enough history for scanning
51+
depth=$(( raw_depth + 2 ))
52+
# Save the computed depth into the GitHub Actions environment for later steps
53+
printf 'depth=%s\n' "$depth" | tr -d '\n\r' >> "$GITHUB_ENV"
54+
# Use the branch name from the push event, cleaned of any stray characters
55+
safe_branch=$(printf '%s' "$GITHUB_REF_NAME" | tr -d '\n\r')
56+
# Save the branch name into the environment for later steps
57+
printf 'branch=%s\n' "$safe_branch" >> "$GITHUB_ENV"
58+
elif [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
59+
# Read the number of commits in the PR; default to 0 if missing
60+
pr_commits="${UNTRUST_PR_COMMITS_COUNT:-0}"
61+
# Validate that the commit count is a number; if not, set to 0
62+
if ! [[ "$pr_commits" =~ ^[0-9]+$ ]]; then pr_commits=0; fi
63+
# Add a small buffer (+2) so we have enough history for scanning
64+
depth=$(( pr_commits + 2 ))
65+
# Use the incoming PR branch name, cleaned of any stray characters
66+
safe_branch=$(printf '%s' "$UNTRUST_PR_REF" | tr -d '\n\r')
67+
# Save the computed depth into the environment for later steps
68+
printf 'depth=%s\n' "$depth" | tr -d '\n\r' >> "$GITHUB_ENV"
69+
# Save the branch name into the environment for later steps
70+
printf 'branch=%s\n' "$safe_branch" >> "$GITHUB_ENV"
71+
fi
7272
73-
# Downloads the repo at the specified depth calculated previously
74-
- uses: actions/checkout@v5
75-
with:
76-
ref: ${{env.branch}}
77-
fetch-depth: ${{env.depth}}
73+
# Downloads the repo at the specified depth calculated previously
74+
- uses: actions/checkout@v5
75+
with:
76+
ref: ${{env.branch}}
77+
fetch-depth: ${{env.depth}}
7878

79-
# Run TruffleHog Scan against the downloaded repo
80-
- name: Scan for Secrets
81-
uses: trufflesecurity/trufflehog@0f58ae7c5036094a1e3e750d18772af92821b503
82-
with:
83-
extra_args: --results=verified,unknown
79+
# Run TruffleHog Scan against the downloaded repo
80+
- name: Scan for Secrets
81+
uses: trufflesecurity/trufflehog@ad6fc8fb446b8fafbf7ea8193d2d6bfd42f45690
82+
with:
83+
extra_args: --results=verified,unknown

.github/workflows/Test-Build.yml

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,48 +3,48 @@ name: Dynamic Analysis - Build Project
33

44
# When this workflow triggers
55
on:
6-
# Allows you to run this workflow manually from the Actions tab
7-
workflow_dispatch:
6+
# Allows you to run this workflow manually from the Actions tab
7+
workflow_dispatch:
88

9-
# Allow this workflow to be called from another workflow
10-
workflow_call:
9+
# Allow this workflow to be called from another workflow
10+
workflow_call:
1111

12-
# Run the linting checks on every change
13-
push:
14-
branches: [ main ]
15-
pull_request:
16-
branches: [ main ]
12+
# Run the linting checks on every change
13+
push:
14+
branches: [main]
15+
pull_request:
16+
branches: [main]
1717

1818
# Define each session of execution that should be executed
1919
jobs:
20-
Build:
21-
# Display name of the job
22-
name: Test Build Project
23-
24-
# Operating system filter for the runners
25-
runs-on: ubuntu-latest
26-
27-
# Sets the scopes available to the github_token injected to the GH Actions runner
28-
permissions:
29-
contents: read
30-
31-
# Set of execution steps to perform
32-
steps:
33-
# Checks-out your repository under $GITHUB_WORKSPACE
34-
- uses: actions/checkout@v5
35-
36-
# Set up NodeJS on the build host
37-
- name: Setup Node.JS Environment
38-
uses: actions/setup-node@v4
39-
with:
40-
node-version: 22
41-
cache: npm
42-
cache-dependency-path: package-lock.json
43-
44-
# Install all of the dependencies
45-
- name: Install All of the Project Dependencies
46-
run: npm install
47-
48-
# Compile the Typescript files to JS
49-
- name: Build Server
50-
run: npm run-script build:Dev
20+
Build:
21+
# Display name of the job
22+
name: Test Build Project
23+
24+
# Operating system filter for the runners
25+
runs-on: ubuntu-latest
26+
27+
# Sets the scopes available to the github_token injected to the GH Actions runner
28+
permissions:
29+
contents: read
30+
31+
# Set of execution steps to perform
32+
steps:
33+
# Checks-out your repository under $GITHUB_WORKSPACE
34+
- uses: actions/checkout@v5
35+
36+
# Set up NodeJS on the build host
37+
- name: Setup Node.JS Environment
38+
uses: actions/setup-node@v6
39+
with:
40+
node-version: 22
41+
cache: npm
42+
cache-dependency-path: package-lock.json
43+
44+
# Install all of the dependencies
45+
- name: Install All of the Project Dependencies
46+
run: npm install
47+
48+
# Compile the Typescript files to JS
49+
- name: Build Server
50+
run: npm run-script build:Dev

.github/workflows/Test-Lint.yml

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -3,52 +3,52 @@ name: Static Analysis - Lint
33

44
# When this workflow triggers
55
on:
6-
# Allows this workflow to be manually run
7-
workflow_dispatch:
6+
# Allows this workflow to be manually run
7+
workflow_dispatch:
88

9-
# Allow this workflow to be called from another workflow
10-
workflow_call:
9+
# Allow this workflow to be called from another workflow
10+
workflow_call:
1111

12-
# Run the linting checks on every change
13-
push:
14-
branches: [ main ]
15-
pull_request:
16-
branches: [ main ]
12+
# Run the linting checks on every change
13+
push:
14+
branches: [main]
15+
pull_request:
16+
branches: [main]
1717

1818
# Define each session of execution that should be executed
1919
jobs:
20-
Lint:
21-
# Display name of the job
22-
name: Lint
23-
24-
# Operating system filter for the runners
25-
runs-on: ubuntu-latest
26-
27-
# Sets the scopes available to the github_token injected to the GH Actions runner
28-
permissions:
29-
contents: read
30-
31-
# Set of steps to run to lint the project
32-
steps:
33-
# Checks-out your repository under $GITHUB_WORKSPACE
34-
- uses: actions/checkout@v5
35-
36-
# Set up NodeJS on the build host
37-
- name: Setup Node.js environment
38-
uses: actions/setup-node@v4
39-
with:
40-
node-version: 22
41-
cache: npm
42-
cache-dependency-path: package-lock.json
43-
44-
# Install all of the dependencies
45-
- name: Install All of the Project Dependencies
46-
run: npm install
47-
48-
# Compile the Typescript files to JS
49-
- name: Build Project
50-
run: npm run-script build:Dev
51-
52-
# Lint the Source code to ensure project standardization and best practices
53-
- name: Lint Source Code
54-
run: npm run-script lint
20+
Lint:
21+
# Display name of the job
22+
name: Lint
23+
24+
# Operating system filter for the runners
25+
runs-on: ubuntu-latest
26+
27+
# Sets the scopes available to the github_token injected to the GH Actions runner
28+
permissions:
29+
contents: read
30+
31+
# Set of steps to run to lint the project
32+
steps:
33+
# Checks-out your repository under $GITHUB_WORKSPACE
34+
- uses: actions/checkout@v5
35+
36+
# Set up NodeJS on the build host
37+
- name: Setup Node.js environment
38+
uses: actions/setup-node@v6
39+
with:
40+
node-version: 22
41+
cache: npm
42+
cache-dependency-path: package-lock.json
43+
44+
# Install all of the dependencies
45+
- name: Install All of the Project Dependencies
46+
run: npm install
47+
48+
# Compile the Typescript files to JS
49+
- name: Build Project
50+
run: npm run-script build:Dev
51+
52+
# Lint the Source code to ensure project standardization and best practices
53+
- name: Lint Source Code
54+
run: npm run-script lint

0 commit comments

Comments
 (0)