From 6deafe29f203fbe7a6d5c1facb8b850353671b94 Mon Sep 17 00:00:00 2001 From: Thomas Pedley Date: Tue, 14 Jul 2026 12:21:25 +0100 Subject: [PATCH] NHSO-0000: Fix security hotspot. --- .github/workflows/continuous-integration.yml | 4 ++-- sandbox/controllers/Pets.js | 12 ++++++------ sandbox/index.js | 4 ++-- scripts/tag-versions.sh | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 6fc4887..50ab119 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -25,8 +25,8 @@ jobs: - name: Install node run: | - wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - - curl -sL https://deb.nodesource.com/setup_24.x | sudo -E bash - + curl --proto "=https" --tlsv1.2 -sSf -L https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - + curl --proto "=https" --tlsv1.2 -sSf -L https://deb.nodesource.com/setup_24.x | sudo -E bash - sudo apt-get install -y nodejs - name: Upgrade python packaging tools diff --git a/sandbox/controllers/Pets.js b/sandbox/controllers/Pets.js index da642fe..c3db668 100644 --- a/sandbox/controllers/Pets.js +++ b/sandbox/controllers/Pets.js @@ -8,8 +8,8 @@ module.exports.createPets = function createPets (req, res, next) { .then(function (response) { utils.writeJson(res, response); }) - .catch(function (response) { - utils.writeJson(res, response); + .catch(function (error_) { + utils.writeJson(res, error_); }); }; @@ -18,8 +18,8 @@ module.exports.listPets = function listPets (req, res, next, limit) { .then(function (response) { utils.writeJson(res, response); }) - .catch(function (response) { - utils.writeJson(res, response); + .catch(function (error_) { + utils.writeJson(res, error_); }); }; @@ -28,7 +28,7 @@ module.exports.showPetById = function showPetById (req, res, next, petId) { .then(function (response) { utils.writeJson(res, response); }) - .catch(function (response) { - utils.writeJson(res, response); + .catch(function (error_) { + utils.writeJson(res, error_); }); }; diff --git a/sandbox/index.js b/sandbox/index.js index a549ab2..cbc4089 100644 --- a/sandbox/index.js +++ b/sandbox/index.js @@ -1,7 +1,7 @@ 'use strict'; -const path = require('path'); -const http = require('http'); +const path = require('node:path'); +const http = require('node:http'); const express = require('express'); const oasTools = require('oas-tools'); const fs = require('node:fs'); diff --git a/scripts/tag-versions.sh b/scripts/tag-versions.sh index b1796e0..ea536fd 100755 --- a/scripts/tag-versions.sh +++ b/scripts/tag-versions.sh @@ -6,7 +6,7 @@ VERSION=$(poetry run python scripts/calculate_version.py) GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) -if [ "$GIT_BRANCH" = 'master' ]; then +if [[ "$GIT_BRANCH" = 'master' ]]; then git config credential.helper 'cache --timeout 120' git config user.email "" git config user.name "Marvin (Automated)"