Skip to content

Commit 410a552

Browse files
IlyesbdlalaWeltraumschaf
authored andcommitted
maintenance(jest): Updated snapshots to fit the updated format of jest v29.3.1
Signed-off-by: Ilyes Ben Dlala <ilyes.bendlala@iteratec.com>
1 parent bf8a301 commit 410a552

28 files changed

Lines changed: 3347 additions & 3347 deletions

File tree

scanners/amass/parser/__snapshots__/parser.test.js.snap

Lines changed: 182 additions & 182 deletions
Large diffs are not rendered by default.

scanners/amass/parser/parser.test.js

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -42,31 +42,31 @@ test("example parser parses single line json successfully", async () => {
4242
await expect(validateParser(findings)).resolves.toBeUndefined();
4343

4444
expect(findings).toMatchInlineSnapshot(`
45-
Array [
46-
Object {
47-
"attributes": Object {
48-
"addresses": Array [
49-
Object {
50-
"asn": 34011,
51-
"cidr": "10.110.224.0/21",
52-
"desc": "GD-EMEA-DC-CGN1",
53-
"ip": "10.110.225.135",
54-
},
55-
],
56-
"domain": "example.de",
57-
"name": "www.example.de",
58-
"source": undefined,
59-
"tag": "cert",
60-
},
61-
"category": "Subdomain",
62-
"description": "Found subdomain www.example.de",
63-
"location": "www.example.de",
45+
[
46+
{
47+
"attributes": {
48+
"addresses": [
49+
{
50+
"asn": 34011,
51+
"cidr": "10.110.224.0/21",
52+
"desc": "GD-EMEA-DC-CGN1",
53+
"ip": "10.110.225.135",
54+
},
55+
],
56+
"domain": "example.de",
6457
"name": "www.example.de",
65-
"osi_layer": "NETWORK",
66-
"severity": "INFORMATIONAL",
58+
"source": undefined,
59+
"tag": "cert",
6760
},
68-
]
69-
`);
61+
"category": "Subdomain",
62+
"description": "Found subdomain www.example.de",
63+
"location": "www.example.de",
64+
"name": "www.example.de",
65+
"osi_layer": "NETWORK",
66+
"severity": "INFORMATIONAL",
67+
},
68+
]
69+
`);
7070
});
7171

7272
test("example parser parses large json result successfully", async () => {

scanners/angularjs-csti-scanner/parser/parser.test.js

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ test("should properly parse acstis empty finding log file", async () => {
2222
);
2323
const findings = await parse(fileContent);
2424
await expect(validateParser(findings)).resolves.toBeUndefined();
25-
expect(findings).toMatchInlineSnapshot("Array []");
25+
expect(findings).toMatchInlineSnapshot(`[]`);
2626
});
2727

2828
test("should properly parse acstis finding log file", async () => {
@@ -35,33 +35,33 @@ test("should properly parse acstis finding log file", async () => {
3535
const findings = await parse(fileContent);
3636
await expect(validateParser(findings)).resolves.toBeUndefined();
3737
expect(findings).toMatchInlineSnapshot(`
38-
Array [
39-
Object {
40-
"attributes": Object {
41-
"injectedTemplate": "{{a=toString().constructor.prototype;a.charAt=a.trim;$eval('a,alert(1),a')}}",
42-
"method": "POST",
43-
"parameter": "string",
44-
"url": "https://www.google.com/test/",
45-
},
46-
"category": "Template Injection",
47-
"description": "The given in this finding URL is vulnerable to AngularJS template injection which can lead to XSS",
48-
"name": "AngularJS template injection",
49-
"osi_layer": "APPLICATION",
50-
"severity": "HIGH",
51-
},
52-
Object {
53-
"attributes": Object {
54-
"injectedTemplate": "{{alert('test')}}",
55-
"method": "GET",
56-
"parameter": "category",
57-
"url": "http://localhost:5000/home?category={{alert('test')}}",
58-
},
59-
"category": "Template Injection",
60-
"description": "The given in this finding URL is vulnerable to AngularJS template injection which can lead to XSS",
61-
"name": "AngularJS template injection",
62-
"osi_layer": "APPLICATION",
63-
"severity": "HIGH",
64-
},
65-
]
66-
`);
38+
[
39+
{
40+
"attributes": {
41+
"injectedTemplate": "{{a=toString().constructor.prototype;a.charAt=a.trim;$eval('a,alert(1),a')}}",
42+
"method": "POST",
43+
"parameter": "string",
44+
"url": "https://www.google.com/test/",
45+
},
46+
"category": "Template Injection",
47+
"description": "The given in this finding URL is vulnerable to AngularJS template injection which can lead to XSS",
48+
"name": "AngularJS template injection",
49+
"osi_layer": "APPLICATION",
50+
"severity": "HIGH",
51+
},
52+
{
53+
"attributes": {
54+
"injectedTemplate": "{{alert('test')}}",
55+
"method": "GET",
56+
"parameter": "category",
57+
"url": "http://localhost:5000/home?category={{alert('test')}}",
58+
},
59+
"category": "Template Injection",
60+
"description": "The given in this finding URL is vulnerable to AngularJS template injection which can lead to XSS",
61+
"name": "AngularJS template injection",
62+
"osi_layer": "APPLICATION",
63+
"severity": "HIGH",
64+
},
65+
]
66+
`);
6767
});

scanners/cmseek/parser/__snapshots__/parser.test.js.snap

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

33
exports[`parser parses result of Joomla scan with core vulnerabilities successfully 1`] = `
4-
Array [
5-
Object {
6-
"attributes": Object {
4+
[
5+
{
6+
"attributes": {
77
"joomla_version": "3.6.5",
8-
"references": Array [
8+
"references": [
99
"CVE : CVE-2016-10033",
1010
"https://www.rapid7.com/db/modules/exploit/multi/http/phpmailer_arg_injection",
1111
"https://github.com/opsxcq/exploit-CVE-2016-10033",
@@ -19,10 +19,10 @@ Array [
1919
"osi_layer": "APPLICATION",
2020
"severity": "HIGH",
2121
},
22-
Object {
23-
"attributes": Object {
22+
{
23+
"attributes": {
2424
"joomla_version": "3.6.5",
25-
"references": Array [
25+
"references": [
2626
"CVE : CVE-2016-10045",
2727
"https://www.rapid7.com/db/modules/exploit/multi/http/phpmailer_arg_injection",
2828
"EDB : https://www.exploit-db.com/exploits/40969/",
@@ -35,9 +35,9 @@ Array [
3535
"osi_layer": "APPLICATION",
3636
"severity": "HIGH",
3737
},
38-
Object {
39-
"attributes": Object {
40-
"joomla_backup_files": Array [
38+
{
39+
"attributes": {
40+
"joomla_backup_files": [
4141
"http://172.26.0.3/1.save",
4242
"http://172.26.0.3/1.tar.gz",
4343
"http://172.26.0.3/1.rar",
@@ -57,7 +57,7 @@ Array [
5757
"osi_layer": "APPLICATION",
5858
"severity": "INFORMATIONAL",
5959
},
60-
Object {
60+
{
6161
"category": "Security Misconfiguration",
6262
"description": "Debug mode is enabled on the site",
6363
"location": "http://172.26.0.3/",
@@ -68,6 +68,6 @@ Array [
6868
]
6969
`;
7070

71-
exports[`parser parses result of Joomla scan without core vulnerabilities successfully 1`] = `Array []`;
71+
exports[`parser parses result of Joomla scan without core vulnerabilities successfully 1`] = `[]`;
7272

73-
exports[`parser parses result of non-Joomla scan successfully 1`] = `Array []`;
73+
exports[`parser parses result of non-Joomla scan successfully 1`] = `[]`;

scanners/cmseek/parser/parser.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,5 @@ test("should properly parse empty cmseek json file", async () => {
6161
);
6262
const findings = await parse(jsonContent);
6363
await expect(validateParser(findings)).resolves.toBeUndefined();
64-
expect(findings).toMatchInlineSnapshot(`Array []`);
64+
expect(findings).toMatchInlineSnapshot(`[]`);
6565
});

scanners/ffuf/parser/parser.test.js

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ test("should properly parse ffuf json file", async () => {
2424
// validate findings
2525
await expect(validateParser(findings)).resolves.toBeUndefined();
2626
expect(findings).toMatchInlineSnapshot(`
27-
Array [
28-
Object {
29-
"attributes": Object {
27+
[
28+
{
29+
"attributes": {
3030
"contentType": "text/html; charset=UTF-8",
3131
"duration": 14335592,
32-
"headers": Object {},
32+
"headers": {},
3333
"hostname": "www.securecodebox.io",
3434
"httpStatus": 301,
35-
"input": Object {
35+
"input": {
3636
"FUZZ": "blog",
3737
},
3838
"length": 7253,
@@ -48,14 +48,14 @@ Array [
4848
"osi_layer": "APPLICATION",
4949
"severity": "INFORMATIONAL",
5050
},
51-
Object {
52-
"attributes": Object {
51+
{
52+
"attributes": {
5353
"contentType": "text/html; charset=UTF-8",
5454
"duration": 17386127,
55-
"headers": Object {},
55+
"headers": {},
5656
"hostname": "www.securecodebox.io",
5757
"httpStatus": 200,
58-
"input": Object {
58+
"input": {
5959
"FUZZ": "404",
6060
},
6161
"length": 9152,
@@ -88,15 +88,15 @@ test("should properly parse ffuf json file wih multiple fuzz keyword inputs", as
8888
// validate findings
8989
await expect(validateParser(findings)).resolves.toBeUndefined();
9090
expect(findings).toMatchInlineSnapshot(`
91-
Array [
92-
Object {
93-
"attributes": Object {
91+
[
92+
{
93+
"attributes": {
9494
"contentType": "text/html; charset=UTF-8",
9595
"duration": 501741303,
96-
"headers": Object {},
96+
"headers": {},
9797
"hostname": "www.securecodebox.io",
9898
"httpStatus": 301,
99-
"input": Object {
99+
"input": {
100100
"FUZZ1": "docs",
101101
"FUZZ2": "architecture",
102102
},
@@ -127,23 +127,23 @@ test("should properly parse ffuf json file with postdata", async () => {
127127
// validate findings
128128
await expect(validateParser(findings)).resolves.toBeUndefined();
129129
expect(findings).toMatchInlineSnapshot(`
130-
Array [
131-
Object {
132-
"attributes": Object {
130+
[
131+
{
132+
"attributes": {
133133
"contentType": "application/json; charset=utf-8",
134134
"duration": 248886400,
135-
"headers": Object {
135+
"headers": {
136136
"Content-Type": "application/json",
137137
},
138138
"hostname": "localhost:3000",
139139
"httpStatus": 200,
140-
"input": Object {
140+
"input": {
141141
"PASSWORD": "password",
142142
"USERNAME": "user@example.com",
143143
},
144144
"length": 855,
145145
"lines": 1,
146-
"postdata": "{\\"email\\":\\"USERNAME\\",\\"password\\":\\"PASSWORD\\"}",
146+
"postdata": "{"email":"USERNAME","password":"PASSWORD"}",
147147
"redirectlocation": "",
148148
"words": 1,
149149
},
@@ -167,7 +167,7 @@ test("should properly parse empty json file", async () => {
167167
const findings = await parse(fileContent);
168168
// validate findings
169169
await expect(validateParser(findings)).resolves.toBeUndefined();
170-
expect(findings).toMatchInlineSnapshot(`Array []`);
170+
expect(findings).toMatchInlineSnapshot(`[]`);
171171
});
172172

173173
test("should properly parse zero findings json file", async () => {
@@ -179,26 +179,26 @@ test("should properly parse zero findings json file", async () => {
179179
const findings = await parse(fileContent);
180180
// validate findings
181181
await expect(validateParser(findings)).resolves.toBeUndefined();
182-
expect(findings).toMatchInlineSnapshot(`Array []`);
182+
expect(findings).toMatchInlineSnapshot(`[]`);
183183
});
184184

185185
test("should properly parse empty string", async () => {
186186
const findings = await parse("");
187187
// validate findings
188188
await expect(validateParser(findings)).resolves.toBeUndefined();
189-
expect(findings).toMatchInlineSnapshot(`Array []`);
189+
expect(findings).toMatchInlineSnapshot(`[]`);
190190
});
191191

192192
test("should properly parse null", async () => {
193193
const findings = await parse(null);
194194
// validate findings
195195
await expect(validateParser(findings)).resolves.toBeUndefined();
196-
expect(findings).toMatchInlineSnapshot(`Array []`);
196+
expect(findings).toMatchInlineSnapshot(`[]`);
197197
});
198198

199199
test("should properly parse undefined", async () => {
200200
const findings = await parse(undefined);
201201
// validate findings
202202
await expect(validateParser(findings)).resolves.toBeUndefined();
203-
expect(findings).toMatchInlineSnapshot(`Array []`);
203+
expect(findings).toMatchInlineSnapshot(`[]`);
204204
});

0 commit comments

Comments
 (0)