Skip to content

Commit dc45669

Browse files
committed
ci(ci): add ssh-scan to matrix build
I added ssh-scan to matrix build and moved the integration tests Signed-off-by: Yannik Fuhrmeister <yannik.fuhrmeister@iteratec.com>
1 parent b0aae7d commit dc45669

File tree

4 files changed

+10
-15
lines changed

4 files changed

+10
-15
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ jobs:
279279
unit:
280280
- amass
281281
- nuclei
282+
- ssh-scan
282283
steps:
283284
- name: Checkout
284285
uses: actions/checkout@v2
@@ -463,7 +464,6 @@ jobs:
463464
- nikto
464465
- nmap
465466
- screenshooter
466-
- ssh-scan
467467
- sslyze
468468
- test-scan
469469
- trivy
@@ -1022,19 +1022,6 @@ jobs:
10221022
npx jest --ci --color ./hooks/notification.test.js
10231023
helm -n integration-tests uninstall test-scan http-webhook notification-hook
10241024
1025-
# ---- SSH_SCAN Integration Tests ----
1026-
1027-
- name: "ssh-scan Integration Tests"
1028-
run: |
1029-
kubectl -n integration-tests delete scans --all
1030-
helm -n integration-tests install ssh-scan ./scanners/ssh-scan/ \
1031-
--set="parser.image.tag=sha-$(git rev-parse --short HEAD)" \
1032-
--set="parser.image.repository=docker.io/${{ env.DOCKER_NAMESPACE }}/parser-ssh-scan" \
1033-
--set="parser.env[0].name=CRASH_ON_FAILED_VALIDATION" \
1034-
--set-string="parser.env[0].value=true"
1035-
cd tests/integration/
1036-
npx jest --ci --color scanner/ssh-scan.test.js
1037-
10381025
# ---- SSLyze Integration Tests ----
10391026

10401027
- name: "sslyze Integration Tests"

scanners/ssh-scan/Makefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,10 @@ scanner = ssh-scan
1111
include ../../scanners.mk
1212

1313
deploy-test-deps: deploy-test-dep-dummy-ssh
14+
15+
integration-tests:
16+
@echo ".: 🩺 Starting integration test in kind namespace 'integration-tests'."
17+
kubectl -n integration-tests delete scans --all
18+
cd ../../tests/integration/ && npm ci
19+
cd ../../scanners/${scanner}
20+
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/ssh-scan.test.js renamed to scanners/ssh-scan/integration-tests/ssh-scan.test.js

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

55
// todo: Integrate into github ci pipeline
6-
const { scan } = require("../helpers");
6+
const { scan } = require("../../../tests/integration/helpers.js");
77

88
jest.retryTimes(3);
99

0 commit comments

Comments
 (0)