-
Notifications
You must be signed in to change notification settings - Fork 182
Expand file tree
/
Copy pathsslyze.test.js
More file actions
72 lines (68 loc) · 1.86 KB
/
Copy pathsslyze.test.js
File metadata and controls
72 lines (68 loc) · 1.86 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
const { startSecurityTest, Time } = require('./sdk');
test(
'finds tls information for host with self signed cert',
async () => {
const securityTest = await startSecurityTest({
context: 'securecodebox.io tls',
metaData: {},
name: 'sslyze',
target: {
name: 'unsafe-https server',
location: 'unsafe-https',
attributes: {},
},
});
const { report } = securityTest;
const findings = report.findings.map(({ name, category, severity }) => ({
name,
category,
severity,
}));
expect(findings).toContainEqual({
name: 'Certificate is not trusted',
category: 'Certificate info',
severity: 'MEDIUM',
});
expect(findings).toContainEqual({
name: 'Must-Staple unsupported',
category: 'Certificate info',
severity: 'INFORMATIONAL',
});
expect(findings).toContainEqual({
name: 'No extended validation certificate',
category: 'Certificate info',
severity: 'INFORMATIONAL',
});
expect(findings).toContainEqual({
name: 'No OCSP response',
category: 'Certificate info',
severity: 'INFORMATIONAL',
});
expect(findings).toContainEqual({
name: 'Ticket resumption supported',
category: 'Resumption',
severity: 'INFORMATIONAL',
});
expect(findings).toContainEqual({
name: 'Session resumption failed',
category: 'Resumption',
severity: 'LOW',
});
expect(findings).toContainEqual({
name: 'TLSv1 supported',
category: 'TLSv1',
severity: 'LOW',
});
expect(findings).toContainEqual({
name: 'TLSv1.1 supported',
category: 'TLSv1.1',
severity: 'INFORMATIONAL',
});
expect(findings).toContainEqual({
name: 'TLSv1.2 supported',
category: 'TLSv1.2',
severity: 'INFORMATIONAL',
});
},
5 * Time.Minute
);