Skip to content

Commit c30cd2e

Browse files
J12934Reet00
authored andcommitted
Resolve code smell warning
Signed-off-by: Jannik Hollenbach <jannik.hollenbach@iteratec.com>
1 parent 8b7e94c commit c30cd2e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scanners/ssh-audit/parser/parser.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,11 @@ export async function parse(fileContent) {
239239
const location = "ssh://" + destination[0];
240240
let ipAddress = null;
241241
let hostname = null;
242-
isIPaddress(destination[0])
243-
? (ipAddress = destination[0])
244-
: (hostname = destination[0]);
242+
if (isIPaddress(destination[0])) {
243+
ipAddress = destination[0]
244+
} else {
245+
hostname = destination[0]
246+
}
245247

246248
const recommendationsArray = Object.entries(report.recommendations);
247249
const policyViolationFindings = recommendationsArray.flatMap(

0 commit comments

Comments
 (0)