Skip to content

Commit d86ea8e

Browse files
authored
Merge pull request #1070 from NHSDigital/release
CCM-18392: release v4.67.0
2 parents 1e37d05 + eb6639b commit d86ea8e

8 files changed

Lines changed: 40 additions & 155 deletions

File tree

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.10.11
1+
3.13.2

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
python 3.13.2
22
poetry 2.2.1
33
jq 1.6
4-
nodejs 20.2.0
4+
nodejs 22.22.3

package-lock.json

Lines changed: 1 addition & 142 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"eslint-plugin-unicorn": "^56.0.1",
4141
"eslint-plugin-workspaces": "^0.11.0",
4242
"eslint-plugin-yml": "^1.2.0",
43-
"hbs-cli": "^1.4.1",
43+
"handlebars": "^4.7.9",
4444
"license-checker": "^25.0.1",
4545
"minimist": "^1.2.2",
4646
"newman": "^6.2.2",
@@ -57,6 +57,9 @@
5757
"flatted": "^3.4.2",
5858
"postcss": "^8.5.12",
5959
"lodash": "^4.18.1",
60-
"underscore": "^1.13.8"
60+
"underscore": "^1.13.8",
61+
"glob-promise": {
62+
"glob": "^7.2.3"
63+
}
6164
}
6265
}

scripts/config/sonar-scanner.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sonar.qualitygate.wait=true
88
sonar.sources=.
99
sonar.tests=tests/, sandbox/__test__
1010
sonar.test.inclusions=tests/**.py, sandbox/__test__/**
11-
sonar.exclusions=.venv/**,proxies/utils/performance/*
11+
sonar.exclusions=.venv/**,proxies/utils/performance/*,scripts/render_hbs.js
1212

1313
sonar.python.version=3.10.8
1414

scripts/render_hbs.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env node
2+
'use strict';
3+
4+
const fs = require('fs');
5+
const Handlebars = require('handlebars');
6+
7+
const [,, dataFile, templateFile] = process.argv;
8+
9+
if (!dataFile || !templateFile) {
10+
console.error('Usage: node scripts/render_hbs.js <data.json> <template.hbs>');
11+
process.exit(1);
12+
}
13+
14+
const data = JSON.parse(fs.readFileSync(dataFile, 'utf8'));
15+
const templateSource = fs.readFileSync(templateFile, 'utf8');
16+
const template = Handlebars.compile(templateSource);
17+
18+
// @generated is a data-frame variable used in the nunit template
19+
const output = template(data, { data: { generated: new Date().toISOString() } });
20+
process.stdout.write(output);

scripts/run_zap.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,21 @@ export INTEGRATION_PRIVATE_KEY_CONTENTS=$(cat $INTEGRATION_PRIVATE_KEY)
2222

2323
docker build -t zap -f ./zap/Dockerfile .
2424

25+
echo "running zap"
2526
# run zap in a container
2627
docker container run \
2728
--env INTEGRATION_PRIVATE_KEY_CONTENTS="$INTEGRATION_PRIVATE_KEY_CONTENTS" \
28-
--env INTEGRATION_API_KEY="$INTEGRATION_API_KEY" \
29-
-v $(pwd):/zap/wrk/:rw \
30-
-v $TEMP_DIR:/zap/tmp/:rw \
31-
-v $(pwd)/zap/comms-manager-json/:/home/zap/.ZAP/reports/comms-manager-json/:rw \
32-
-t zap \
33-
bash -c "./zap.sh -cmd -autorun /zap/wrk/zap/zap.yaml"
29+
--env INTEGRATION_API_KEY="$INTEGRATION_API_KEY" \
30+
-v $(pwd):/zap/wrk/:rw \
31+
-v $TEMP_DIR:/zap/tmp/:rw \
32+
-v $(pwd)/zap/comms-manager-json/:/home/zap/.ZAP/reports/comms-manager-json/:rw \
33+
-t zap \
34+
bash -c "./zap.sh -cmd -autorun /zap/wrk/zap/zap.yaml"
35+
36+
echo "ended running zap"
3437

3538
# generate our nunit report from the zap JSON report
36-
./node_modules/.bin/hbs --data $TEMP_DIR/zap-report.json zap/nunit-template.hbs -s > zap-report.xml
39+
node scripts/render_hbs.js $TEMP_DIR/zap-report.json zap/nunit-template.hbs > zap-report.xml
3740

3841
# delete our zap compatible report
3942
rm build/communications-manager-zap.json

zap/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM zaproxy/zap-stable:2.16.1
1+
FROM zaproxy/zap-stable:2.17.0
22

33
COPY ./zap/policies/ /home/zap/.ZAP/policies/
44

0 commit comments

Comments
 (0)