Skip to content

Commit cc241c9

Browse files
authored
Merge pull request #67 from Qualys/feature/QINT-18550
QINT-18550: GitHub Action WAS: Update WAS Scan Report URL
2 parents b0fc3a7 + 7883b90 commit cc241c9

3 files changed

Lines changed: 7 additions & 31 deletions

File tree

pom.xml

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.springframework.boot</groupId>
77
<artifactId>spring-boot-starter-parent</artifactId>
8-
<version>3.1.6</version>
8+
<version>3.3.1</version>
99
<relativePath/> <!-- lookup parent from repository -->
1010
</parent>
1111
<groupId>com.example</groupId>
@@ -25,10 +25,6 @@
2525
<artifactId>snakeyaml</artifactId>
2626
<groupId>org.yaml</groupId>
2727
</exclusion>
28-
<exclusion>
29-
<artifactId>logback-classic</artifactId>
30-
<groupId>ch.qos.logback</groupId>
31-
</exclusion>
3228
</exclusions>
3329
</dependency>
3430
<dependency>
@@ -64,22 +60,6 @@
6460
<artifactId>snakeyaml</artifactId>
6561
<version>2.2</version>
6662
</dependency>
67-
<dependency>
68-
<groupId>ch.qos.logback</groupId>
69-
<artifactId>logback-classic</artifactId>
70-
<version>1.4.14</version>
71-
<exclusions>
72-
<exclusion>
73-
<artifactId>logback-core</artifactId>
74-
<groupId>ch.qos.logback</groupId>
75-
</exclusion>
76-
</exclusions>
77-
</dependency>
78-
<dependency>
79-
<groupId>ch.qos.logback</groupId>
80-
<artifactId>logback-core</artifactId>
81-
<version>1.4.14</version>
82-
</dependency>
8363
<dependency>
8464
<groupId>org.slf4j</groupId>
8565
<artifactId>slf4j-simple</artifactId>

src/main/java/com/example/GitHubActionsQWas/service/QualysWASScanBuilder.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ public void launchWebApplicationScan() {
244244
message1 += ", 'CANCEL_OPTION:" + cancelOptions + "', 'CANCEL_HOURS:" + cancelHours + " hrs'";
245245
}
246246
String message2 = "Scan successfully launched with scan id: " + scanId + " and scan name: " + service.getScanName();
247-
String message3 = "Please switch to WAS Classic UI and Check for report...";
248-
String message4 = "To check scan result, please follow the url: " + portalServer + "/portal-front/module/was/#forward=/module/was/&scan-report=" + scanId;
247+
String message3 = "To check scan result on Qualys UI, please follow the url. Note that, scan result URL will work with New WAS UI only: " + portalServer + "/was/#/reports/online-reports/email-report/scan/" + scanId;
248+
249249
logger.info(message1);
250250
logger.info(message2);
251251
if (this.waitForResult) {
@@ -273,7 +273,6 @@ public void launchWebApplicationScan() {
273273
buildPassed = failurePolicyEvaluationResult.get("passed").getAsBoolean();
274274
if (!buildPassed) {
275275
logger.info(message3);
276-
logger.info(message4);
277276
String failureMessage = failurePolicyEvaluationResult.get("failureMessage").getAsString();
278277
logger.error(failureMessage);
279278

@@ -296,13 +295,11 @@ public void launchWebApplicationScan() {
296295
System.exit(1);
297296
}
298297
logger.info(message3);
299-
logger.info(message4);
300298
}
301299
}
302300
} else {
303301
logger.info(message3);
304-
logger.info(message4);
305-
String message = message1 + "\n" + message2 + "\n" + message3 + "\n" + message4;
302+
String message = message1 + "\n" + message2 + "\n" + message3;
306303
String fileName = "Qualys_Wasscan_" + webAppId + ".txt";
307304
Helper.dumpDataIntoFile(message, fileName);
308305
}

src/main/java/com/example/GitHubActionsQWas/service/QualysWASScanStatusService.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,15 @@ public String fetchScanStatus(String scanId, String scanType, boolean severityCh
3131
long endTime = System.currentTimeMillis();
3232
if ((endTime - startTime) > timeoutInMillis) {
3333
String message1 = "Failed to get scan result; timeout of " + TimeUnit.SECONDS.toMinutes(TIMEOUT) + " minutes reached.";
34-
String message2 = "Please switch to WAS Classic UI and Check for report...";
35-
String message3 = "To check scan result, please follow the url: " + portalUrl + "/portal-front/module/was/#forward=/module/was/&scan-report=" + scanId;
34+
String message2 = "To check scan result on Qualys UI, please follow the url. Note that, scan result URL will work with New WAS UI only: " + portalUrl + "/was/#/reports/online-reports/email-report/scan/" + scanId;
35+
3636
logger.info(message1);
3737
logger.info(message2);
38-
logger.info(message3);
3938
if (scanType.equalsIgnoreCase("vulnerability") && severityCheck) {
4039
failed = true;
4140
}
4241
if (failed) {
43-
String message = message1 + "\n" + message2 + "\n" + message3;
42+
String message = message1 + "\n" + message2;
4443
Helper.dumpDataIntoFile(message, "Qualys_Wasscan_" + scanId + ".txt");
4544
System.exit(1);
4645
}

0 commit comments

Comments
 (0)