forked from secureCodeBox/secureCodeBox
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathssh.test.js
More file actions
57 lines (50 loc) · 1.42 KB
/
ssh.test.js
File metadata and controls
57 lines (50 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
const { startSecurityTest, Time } = require('./sdk');
test(
'finds a few low severity findigns for securecodebox.io',
async () => {
const securityTest = await startSecurityTest({
context: 'securecodebox.io tls',
metaData: {},
name: 'ssh',
target: {
name: 'securecodebox.io tls',
location: 'securecodebox.io',
attributes: {},
},
});
const { report } = securityTest;
const findings = report.findings.map(
({ description, category, name, osi_layer, severity }) => ({
description,
category,
name,
osi_layer,
severity,
})
);
expect(findings.length).toBe(3);
expect(findings).toContainEqual({
category: 'SSH Service',
description: 'SSH Compliance Information',
name: 'SSH Compliance',
osi_layer: 'NETWORK',
severity: 'INFORMATIONAL',
});
expect(findings).toContainEqual({
category: 'SSH Service',
description: ' diffie-hellman-group14-sha1',
name: 'Remove these key exchange algorithms',
osi_layer: 'NETWORK',
severity: 'MEDIUM',
});
expect(findings).toContainEqual({
category: 'SSH Service',
description:
' umac-64-etm@openssh.com, hmac-sha1-etm@openssh.com, umac-64@openssh.com, hmac-sha1',
name: 'Remove these MAC algorithms',
osi_layer: 'NETWORK',
severity: 'MEDIUM',
});
},
2 * Time.Minute
);