Skip to content

Commit e6c6a2e

Browse files
authored
Merge pull request #871 from hmcts/ZAP_Report_Fix
FPET-748-ZAP-Report-Fix-added security.sh file for zap report generation
2 parents 958ddca + be3ead6 commit e6c6a2e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.ci/security.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
echo ${TEST_URL}
3+
zap-api-scan.py -t ${TEST_URL}/v3/api-docs -f openapi -S -d -u ${SecurityRules} -P 1001 -l FAIL -J report.json -r api-report.html
4+
cat zap.out
5+
echo "ZAP has successfully started"
6+
curl --fail http://0.0.0.0:1001/OTHER/core/other/jsonreport/?formMethod=GET --output report.json
7+
export LC_ALL=C.UTF-8
8+
export LANG=C.UTF-8
9+
zap-cli --zap-url http://0.0.0.0 -p 1001 report -o /zap/api-report.html -f html
10+
zap-cli --zap-url http://0.0.0.0 -p 1001 alerts -l Medium --exit-code False
11+
mkdir -p functional-output
12+
chmod a+wx functional-output
13+
cp /zap/api-report.html functional-output/

0 commit comments

Comments
 (0)