Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Commit 019fccd

Browse files
sebiesebie
authored andcommitted
ncrack integration test
1 parent 2d14ae2 commit 019fccd

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,11 +399,20 @@ jobs:
399399
cd tests/integration/
400400
npx jest --ci --color read-only-hook
401401
helm -n integration-tests uninstall test-scan http-webhook ro-hook
402+
- name: "Install Demo Apps"
403+
run: |
404+
# Install dummy-ssh app
405+
helm -n demo-apps install dummy-ssh ./demo-apps/dummy-ssh/ --wait
402406
- name: "nmap Integration Tests"
403407
run: |
404408
helm -n integration-tests install nmap ./scanners/nmap/ --set="parserImage.tag=sha-$(git rev-parse --short HEAD)"
405409
cd tests/integration/
406410
npx jest --ci --color nmap
411+
- name: "ncrack Integration Tests"
412+
run: |
413+
helm -n integration-tests install ncrack ./scanners/ncrack/ --set="parserImage.tag=sha-$(git rev-parse --short HEAD)"
414+
cd tests/integration/
415+
npx jest --ci --color ncrack
407416
- name: "kube-hunter Integration Tests"
408417
run: |
409418
helm -n integration-tests install kube-hunter ./scanners/kube-hunter/ --set="parserImage.tag=sha-$(git rev-parse --short HEAD)"
@@ -412,8 +421,6 @@ jobs:
412421
- name: "ssh-scan Integration Tests"
413422
run: |
414423
helm -n integration-tests install ssh-scan ./scanners/ssh_scan/ --set="parserImage.tag=sha-$(git rev-parse --short HEAD)"
415-
# Install dummy-ssh app
416-
helm -n demo-apps install dummy-ssh ./demo-apps/dummy-ssh/ --wait
417424
cd tests/integration/
418425
npx jest --ci --color ssh-scan
419426
- name: Inspect Post Failure
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
const { scan } = require('../helpers')
2+
3+
test(
4+
"localhost port scan should only find a host finding",
5+
async () => {
6+
const { categories, severities, count } = await scan(
7+
"ncrack-dummy-ssh",
8+
"ncrack",
9+
["--user", "root,admin", "--pass", "password,123456,THEPASSWORDYOUCREATED", "ssh://dummy-ssh.demo-apps.svc"],
10+
90
11+
);
12+
13+
expect(count).toBe(1);
14+
expect(categories).toMatchInlineSnapshot(`
15+
Object {
16+
"Discovered Credentials": 1,
17+
}
18+
`);
19+
expect(severities).toMatchInlineSnapshot(`
20+
Object {
21+
"high": 1,
22+
}
23+
`);
24+
},
25+
3 * 60 * 1000
26+
);

0 commit comments

Comments
 (0)