Skip to content

Commit 0e7f5c5

Browse files
CCM-11345 backported ASDF and scorecard versioning (#73)
* CCM-11345 backported ASDF and scorecard versioning * CCM-11345 updating central ignore list * CCM-11345 updating central ignore list * CCM-11345 backported todo excludes * CCM-11345 fix todo detection for camelcase * CCM-11345 fix asdf version * CCM-11345 fix license security and precommit rev * CCM-11345 fix license security and precommit rev * CCM-11345 fix license security and precommit rev
1 parent eebf9ad commit 0e7f5c5

File tree

10 files changed

+33
-22
lines changed

10 files changed

+33
-22
lines changed

.github/SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ If you wish to notify us of a vulnerability via email, please include detailed i
2121

2222
You can reach us at:
2323

24-
- _[ A product team email address ]_
25-
24+
25+
2626

2727
### NCSC
2828

.github/workflows/scheduled-repository-template-sync.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
3333
- name: Create Pull Request
3434
if: ${{ !env.ACT }}
35-
uses: peter-evans/[email protected].6
35+
uses: peter-evans/[email protected].8
3636
with:
3737
token: ${{ secrets.GITHUB_TOKEN }}
3838
commit-message: Drift from template

.github/workflows/scorecard.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,25 @@ jobs:
2727
# Needed to publish results and get a badge (see publish_results below).
2828
id-token: write
2929
# Uncomment the permissions below if installing in a private repository.
30-
# contents: read
31-
# actions: read
30+
contents: read
31+
actions: read
3232

3333
steps:
3434
- name: "Checkout code"
35-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
35+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3636
with:
3737
persist-credentials: false
3838

3939
- name: "Run analysis"
40-
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
40+
uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
4141
with:
4242
results_file: results.sarif
4343
results_format: sarif
4444
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
4545
# - you want to enable the Branch-Protection check on a *public* repository, or
4646
# - you are installing Scorecard on a *private* repository
4747
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action?tab=readme-ov-file#authentication-with-fine-grained-pat-optional.
48-
# repo_token: ${{ secrets.SCORECARD_TOKEN }}
48+
repo_token: ${{ secrets.SCORECARD_TOKEN }}
4949

5050
# Public repositories:
5151
# - Publish results to OpenSSF REST API for easy access by consumers
@@ -68,6 +68,6 @@ jobs:
6868
# Upload the results to GitHub's code scanning dashboard (optional).
6969
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
7070
- name: "Upload to code-scanning"
71-
uses: github/codeql-action/upload-sarif@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
71+
uses: github/codeql-action/upload-sarif@fca7ace96b7d713c7035871441bd52efbe39e27e # v3.28.19
7272
with:
7373
sarif_file: results.sarif

.github/workflows/stage-1-commit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ jobs:
156156
- name: "Checkout code"
157157
uses: actions/checkout@v4
158158
- name: "Setup ASDF"
159-
uses: asdf-vm/actions/setup@v3
159+
uses: asdf-vm/actions/setup@v4
160160
- name: "Perform Setup"
161161
uses: ./.github/actions/setup
162162
- name: "Trivy Scan"

LICENCE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT Licence
22

3-
Copyright (c) 2024 Crown Copyright NHS England.
3+
Copyright (c) 2025 Crown Copyright NHS England.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

infrastructure/terraform/bin/terraform.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ readonly component_name=$(basename ${component_path});
403403
# verify terraform version matches .tool-versions
404404
echo ${PWD}
405405
tool_version=$(grep "terraform " .tool-versions | cut -d ' ' -f 2)
406-
asdf plugin-add terraform && asdf install terraform "${tool_version}"
406+
asdf plugin add terraform && asdf install terraform "${tool_version}"
407407
current_version=$(terraform --version | head -n 1 | cut -d 'v' -f 2)
408408

409409
if [ -z "${current_version}" ] || [ "${current_version}" != "${tool_version}" ]; then

scripts/config/.repository-template-sync-ignore

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,28 @@ nhs-notify-repository-template/
44
# Files and Folders in this repository to ignore
55
.editorconfig
66
.github/CODEOWNERS
7+
.github/ISSUE_TEMPLATE
78
.gitleaksignore
89
.vscode/
9-
/Makefile
10+
Makefile
1011
CHANGELOG.md
11-
README.md
12-
VERSION
1312
project.code-workspace
13+
README.md
1414
scripts/config/sonar-scanner.properties
1515
scripts/tests/
16+
VERSION
1617

1718
# Files and Folders in the template repository to disregard
1819
.devcontainer/
19-
.github/workflows/cicd-*.yaml
20+
.github/actions/build-docs
21+
.github/workflows/*.disabled
22+
*/examples/
2023
docs/
24+
eslint.config.mjs
2125
infrastructure/terraform/components/
26+
lambdas/example-lambda/
27+
package-lock.json
28+
package.json
2229
scripts/**/examples/
30+
scripts/terraform/terraform.mk
31+
src/.vscode/
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Files and folders to merge when syncing nhs-notify-repository-template back in to this repository
2+
.github/workflows/cicd-*.yaml
3+
.gitignore
4+
.tool-versions
25
scripts/config/.repository-template-sync-ignore
36
scripts/config/.repository-template-sync-merge
4-
.tool-versions
5-
.gitignore
6-
scripts/config/vale/vale.ini
77
scripts/config/vale/styles/config/vocabularies/words/accept.txt
88
scripts/config/vale/styles/config/vocabularies/words/reject.txt
9+
scripts/config/vale/vale.ini

scripts/config/pre-commit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.6.0 # Use the ref you want to point at
3+
rev: v5.0.0 # Use the ref you want to point at
44
hooks:
55
- id: trailing-whitespace
66
- id: detect-aws-credentials

scripts/githooks/check-todos.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ set -euo pipefail
2828
EXCLUDED_FILES=(
2929
".devcontainer/devcontainer.json"
3030
".tool-versions"
31+
".vscode/extensions.json"
3132
"infrastructure/terraform/bin/terraform.sh"
3233
"Makefile"
3334
"project.code-workspace"
@@ -119,7 +120,7 @@ function search_todos() {
119120

120121
# If the file is excluded, skip it
121122
if [ "$skip" = false ] && [ -f "$file" ]; then
122-
file_todos=$(grep -nHi TODO "$file" || true)
123+
file_todos=$(grep -nHiE '\bTODO\b' "$file" || true)
123124
[ -n "$file_todos" ] && todos+="$file_todos\n"
124125
fi
125126
done
@@ -135,7 +136,7 @@ function filter_todos_with_valid_jira_ticket() {
135136

136137
while IFS= read -r line; do
137138
# Only lines with TODO but without a valid JIRA ticket
138-
if grep -qi 'TODO' <<< "$line"; then
139+
if grep -qnHiE '\bTODO\b' <<< "$line"; then
139140
if ! [[ "$line" =~ $jira_regex ]]; then
140141
todos_without_ticket+="$line\n"
141142
fi

0 commit comments

Comments
 (0)