Skip to content

Commit f063ffc

Browse files
committed
ci(ci): add zap to matrix make build
Signed-off-by: Yannik Fuhrmeister <yannik.fuhrmeister@iteratec.com>
1 parent 497bda8 commit f063ffc

4 files changed

Lines changed: 18 additions & 15 deletions

File tree

‎.github/workflows/ci.yaml‎

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ jobs:
283283
- sslyze
284284
- trivy
285285
- wpscan
286+
- zap
286287
steps:
287288
- name: Checkout
288289
uses: actions/checkout@v2
@@ -470,7 +471,6 @@ jobs:
470471
- test-scan
471472
- whatweb
472473
- typo3scan
473-
- zap
474474

475475
steps:
476476
- name: Checkout
@@ -1048,19 +1048,6 @@ jobs:
10481048
cd tests/integration/
10491049
npx jest --ci --color scanner/whatweb.test.js
10501050
1051-
# ---- Zap Integration Tests ----
1052-
1053-
- name: "ZAP Integration Tests"
1054-
run: |
1055-
kubectl -n integration-tests delete scans --all
1056-
helm -n integration-tests install zap ./scanners/zap/ \
1057-
--set="parser.image.tag=sha-$(git rev-parse --short HEAD)" \
1058-
--set="parser.image.repository=docker.io/${{ env.DOCKER_NAMESPACE }}/parser-zap" \
1059-
--set="parser.env[0].name=CRASH_ON_FAILED_VALIDATION" \
1060-
--set-string="parser.env[0].value=true"
1061-
cd tests/integration/
1062-
npx jest --ci --color scanner/zap.test.js
1063-
10641051
# ---- Zap Extended Integration Tests ----
10651052

10661053
- name: "ZAP Extended Integration Tests"

‎scanners/zap/Makefile‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,18 @@ scanner = zap
1111
include ../../scanners.mk
1212

1313
deploy-test-deps: deploy-test-dep-nginx
14+
15+
deploy-without-scanner:
16+
helm -n integration-tests install zap ./ --wait \
17+
--set="parser.image.tag=sha-$$(git rev-parse --short HEAD)" \
18+
--set="parser.image.repository=docker.io/${IMG_NS}/parser-zap" \
19+
--set="parser.env[0].name=CRASH_ON_FAILED_VALIDATION" \
20+
--set-string="parser.env[0].value=true"
21+
22+
23+
integration-tests:
24+
@echo ".: 🩺 Starting integration test in kind namespace 'integration-tests'."
25+
kubectl -n integration-tests delete scans --all
26+
cd ../../tests/integration/ && npm ci
27+
cd ../../scanners/${scanner}
28+
npx --yes --package jest@$(JEST_VERSION) jest --verbose --ci --colors --coverage --passWithNoTests ${scanner}/integration-tests
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

tests/integration/scanner/zap.test.js renamed to scanners/zap/integration-tests/zap.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// SPDX-License-Identifier: Apache-2.0
44

5-
const { scan } = require("../helpers");
5+
const { scan } = require("../../../tests/integration/helpers");
66

77
test(
88
"zap baseline scan against a plain nginx container should only find couple findings",

0 commit comments

Comments
 (0)