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

Commit 7fc0bdf

Browse files
committed
Fix copy paste error in XSS nikto id
1 parent 8646ec2 commit 7fc0bdf

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

integrations/nikto/parser/__snapshots__/parser.test.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ Array [
7575
"niktoId": 999102,
7676
"port": 443,
7777
},
78-
"category": "Nikto Finding",
78+
"category": "X-XSS-Protection",
7979
"description": null,
8080
"location": "https://www.securecodebox.io/",
8181
"name": "The X-XSS-Protection header is not defined. This header can hint to the user agent to protect against some forms of XSS",
8282
"osi_layer": "NETWORK",
83-
"severity": "INFORMATIONAL",
83+
"severity": "LOW",
8484
},
8585
Object {
8686
"attributes": Object {

integrations/nikto/parser/parser.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
const INFORMATIONAL = 'INFORMATIONAL';
2-
const LOW = 'LOW';
3-
const MEDIUM = 'MEDIUM';
4-
const HIGH = 'HIGH';
1+
const INFORMATIONAL = "INFORMATIONAL";
2+
const LOW = "LOW";
3+
const MEDIUM = "MEDIUM";
4+
const HIGH = "HIGH";
55
/**
66
* Sorts Nikto findings into Categories
77
*
88
* @param {string} category
99
*/
1010
function categorize({ id }) {
1111
if (id === 999957) {
12-
return ['X-Frame-Options Header', LOW];
13-
} else if (id === 'X-XSS-Protection') {
14-
return ['X-XSS-Protection', LOW];
12+
return ["X-Frame-Options Header", LOW];
13+
} else if (id === 999102) {
14+
return ["X-XSS-Protection", LOW];
1515
} else if (id === 999100) {
16-
return ['Uncommon Header', INFORMATIONAL];
16+
return ["Uncommon Header", INFORMATIONAL];
1717
} else if (id === 999103) {
18-
return ['X-Content-Type-Options Header', INFORMATIONAL];
18+
return ["X-Content-Type-Options Header", INFORMATIONAL];
1919
} else if (id === 521000) {
20-
return ['Path Traversal', HIGH];
20+
return ["Path Traversal", HIGH];
2121
} else if (id >= 600000 && id < 700000) {
22-
return ['Outdated Software', MEDIUM];
22+
return ["Outdated Software", MEDIUM];
2323
} else if (id >= 800000 && id < 900000) {
24-
return ['Identified Software', INFORMATIONAL];
24+
return ["Identified Software", INFORMATIONAL];
2525
} else if (id >= 0 && id < 100000) {
26-
return ['Potential Vulnerability', HIGH];
26+
return ["Potential Vulnerability", HIGH];
2727
} else if (id >= 500017 && id < 600000) {
28-
return ['Identified Software', INFORMATIONAL];
28+
return ["Identified Software", INFORMATIONAL];
2929
} else if (id >= 300000 && id < 400000) {
30-
return ['Embedded Device', INFORMATIONAL];
30+
return ["Embedded Device", INFORMATIONAL];
3131
}
3232

33-
return ['Nikto Finding', INFORMATIONAL];
33+
return ["Nikto Finding", INFORMATIONAL];
3434
}
3535

3636
async function parse({ host, ip, port: portString, banner, vulnerabilities }) {
@@ -42,14 +42,14 @@ async function parse({ host, ip, port: portString, banner, vulnerabilities }) {
4242
const [category, severity] = categorize({ id: niktoId });
4343

4444
// We can only guess at this point. Nikto doesn't tell use anymore :(
45-
const protocol = port === 443 || port === 8443 ? 'https' : 'http';
45+
const protocol = port === 443 || port === 8443 ? "https" : "http";
4646

4747
return {
4848
name: msg,
4949
description: null,
5050
category,
5151
location: `${protocol}://${host}${url}`,
52-
osi_layer: 'NETWORK',
52+
osi_layer: "NETWORK",
5353
severity,
5454
attributes: {
5555
ip_address: ip,

0 commit comments

Comments
 (0)