Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
ae7b4a0
chore(pom): Use recommended core version 2.462.3, and Java 11.
gounthar Mar 28, 2025
8563401
Merge remote-tracking branch 'upstream/master' into plugin-modernizer…
gounthar Jun 6, 2025
65700f9
Merge remote-tracking branch 'upstream/master' into plugin-modernizer…
gounthar Jun 11, 2025
667ea24
Merge remote-tracking branch 'upstream/master' into plugin-modernizer…
gounthar Jun 15, 2025
6d35c9c
Merge remote-tracking branch 'upstream/master' into plugin-modernizer…
gounthar Jun 18, 2025
c035c10
Merge remote-tracking branch 'upstream/master' into plugin-modernizer…
gounthar Jun 19, 2025
b70cee7
Merge remote-tracking branch 'upstream/master' into plugin-modernizer…
gounthar Jul 22, 2025
a3156e9
Merge remote-tracking branch 'upstream/master' into plugin-modernizer…
gounthar Aug 28, 2025
4e8e121
Merge remote-tracking branch 'upstream/master' into plugin-modernizer…
gounthar Sep 10, 2025
6820a8b
Merge remote-tracking branch 'upstream/master' into plugin-modernizer…
gounthar Sep 15, 2025
a6165e0
Merge remote-tracking branch 'upstream/master' into plugin-modernizer…
gounthar Sep 16, 2025
a568790
Merge remote-tracking branch 'upstream/master' into plugin-modernizer…
gounthar Sep 29, 2025
3ecf0d3
Merge branch 'jenkinsci:master' into plugin-modernizer/upgradetorecom…
gounthar Oct 3, 2025
b3977b9
Merge branch 'jenkinsci:master' into plugin-modernizer/upgradetorecom…
gounthar Oct 3, 2025
9ab95b7
fix: resolve SpotBugs static analysis issues
gounthar Oct 3, 2025
531bf58
Merge remote-tracking branch 'upstream/master' into plugin-modernizer…
gounthar Dec 4, 2025
e830348
Merge remote-tracking branch 'upstream/master' into plugin-modernizer…
gounthar Dec 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,18 @@
<url> https://www.apache.org/licenses/LICENSE-2.0</url>
</license>
</licenses>

<developers>
<developer>
<id>mattmurp</id>
<name>Matt Murphy</name>
<email>[email protected]</email>
</developer>
</developers>

<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>4.52</version>
<version>4.88</version>
<relativePath />
</parent>

<properties>
<slf4jVersion>1.7.26</slf4jVersion>
<jenkins.baseline>2.426</jenkins.baseline>
<!-- https://www.jenkins.io/doc/developer/plugin-development/choosing-jenkins-baseline/ -->
<jenkins.baseline>2.462</jenkins.baseline>
<jenkins.version>${jenkins.baseline}.3</jenkins.version>
<findbugs.failOnError>false</findbugs.failOnError>
<spotbugs.failOnError>false</spotbugs.failOnError>
Expand All @@ -49,7 +42,7 @@
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-${jenkins.baseline}.x</artifactId>
<version>2718.v7e8a_d43b_3f0b_</version>
<version>4228.v0a_71308d905b_</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -107,7 +100,7 @@
</dependencies>

<scm>
<connection>scm:git:ssh://github.com/jenkinsci/appscan-plugin.git</connection>
<connection>scm:git:https://github.com/jenkinsci/appscan-plugin.git</connection>
<developerConnection>scm:git:ssh://[email protected]/jenkinsci/appscan-plugin.git</developerConnection>
<url>https://github.com/jenkinsci/appscan-plugin</url>
<tag>HEAD</tag>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,23 +285,24 @@ private void shouldFailBuild(IResultsProvider provider,Run<?,?> build, IProgress
if(!m_failBuild && !m_failBuildNonCompliance)
return ;
String failureMessage=Messages.error_threshold_exceeded();
try {
List<FailureCondition> failureConditions=m_failureConditions;
progress.setStatus(new Message(Message.INFO, Messages.fail_build_check()));
if (m_failBuildNonCompliance){
failureConditions =new ArrayList<>();
FailureCondition nonCompliantCondition = new FailureCondition("total", 0);
failureConditions.add(nonCompliantCondition);
failureMessage=Messages.error_noncompliant_issues();
}
if(new ResultsInspector(failureConditions, provider).shouldFail()){
build.setDescription(failureMessage);
throw new AbortException(failureMessage);
}

} catch(NullPointerException e) {
throw new AbortException(Messages.error_checking_results(provider.getStatus()));
}

if (provider == null) {
throw new AbortException(Messages.error_checking_results("Provider is null"));
}

List<FailureCondition> failureConditions=m_failureConditions;
progress.setStatus(new Message(Message.INFO, Messages.fail_build_check()));
if (m_failBuildNonCompliance){
failureConditions =new ArrayList<>();
FailureCondition nonCompliantCondition = new FailureCondition("total", 0);
failureConditions.add(nonCompliantCondition);
failureMessage=Messages.error_noncompliant_issues();
}

if (failureConditions != null && new ResultsInspector(failureConditions, provider).shouldFail()){
build.setDescription(failureMessage);
throw new AbortException(failureMessage);
}
}

private void perform(Run<?,?> build, Launcher launcher, TaskListener listener) throws InterruptedException, IOException {
Expand All @@ -322,7 +323,12 @@ private void perform(Run<?,?> build, Launcher launcher, TaskListener listener) t

final IScan scan = ScanFactory.createScan(properties, progress, m_authProvider);

IResultsProvider provider = launcher.getChannel().call(new Callable<IResultsProvider, AbortException>() {
final hudson.remoting.VirtualChannel channel = launcher.getChannel();
if (channel == null) {
throw new AbortException("Jenkins launcher channel is not available. Cannot execute scan remotely.");
}

IResultsProvider provider = channel.call(new Callable<IResultsProvider, AbortException>() {
private static final long serialVersionUID = 1L;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,14 +441,15 @@ private void shouldFailBuild(IResultsProvider provider, Run<?, ?> build) throws
if (!m_failBuild)
return;
String failureMessage = Messages.error_threshold_exceeded();
try {
List<FailureCondition> failureConditions = m_failureConditions;
if (new ResultsInspector(failureConditions, provider).shouldFail()) {
build.setDescription(failureMessage);
throw new AbortException(failureMessage);
}
} catch (NullPointerException e) {
throw new AbortException(Messages.error_checking_results(provider.getStatus()));

if (provider == null) {
throw new AbortException(Messages.error_checking_results("Provider is null"));
}

List<FailureCondition> failureConditions = m_failureConditions;
if (failureConditions != null && new ResultsInspector(failureConditions, provider).shouldFail()) {
build.setDescription(failureMessage);
throw new AbortException(failureMessage);
}
}

Expand All @@ -458,7 +459,7 @@ private boolean checkURLAccessibility(String URL) throws IOException {
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
int responseCode = conn.getResponseCode();
return responseCode >= HttpURLConnection.HTTP_OK && responseCode < HttpURLConnection.HTTP_MULT_CHOICE;
} catch (Exception e){
} catch (IOException e){
throw new AbortException(Messages.error_url_validation(m_target));
}
}
Expand Down Expand Up @@ -498,7 +499,12 @@ private void performScan(Run<?, ?> build, Launcher launcher, TaskListener listen
}
final IScan scan = ScanFactory.createScan(properties, progress, m_authProvider); // Call ASEScanFactory directly

IResultsProvider provider = launcher.getChannel().call(new Callable<IResultsProvider, AbortException>() {
final hudson.remoting.VirtualChannel channel = launcher.getChannel();
if (channel == null) {
throw new AbortException("Jenkins launcher channel is not available. Cannot execute scan remotely.");
}

IResultsProvider provider = channel.call(new Callable<IResultsProvider, AbortException>() {
private static final long serialVersionUID = 1L;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ public static String getClientTypeUpdated() {
}

public static String getPluginVersion() {
if(Jenkins.getInstanceOrNull() != null) {
Plugin tempPlugin = Jenkins.getInstanceOrNull().getPlugin("appscan");

if(tempPlugin != null) {
Jenkins jenkins = Jenkins.getInstanceOrNull();
if(jenkins != null) {
Plugin tempPlugin = jenkins.getPlugin("appscan");

if(tempPlugin != null && tempPlugin.getWrapper() != null) {
return tempPlugin.getWrapper().getVersion();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@

import hudson.model.Run;

@edu.umd.cs.findbugs.annotations.SuppressFBWarnings("NM_SAME_SIMPLE_NAME_AS_SUPERCLASS")
public class ScanResults extends com.hcl.appscan.jenkins.plugin.actions.ScanResults {

public ScanResults(Run<?, ?> build, IResultsProvider provider, String name, String status, int totalFindings, int criticalCount,
int highCount, int mediumCount, int lowCount, int infoCount) {
super(build, provider, name, status, totalFindings, criticalCount, highCount, mediumCount, lowCount, infoCount, null, null);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.cloudbees.plugins.credentials.CredentialsScope;

// Added for backward compatibility during HCL wash
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings("NM_SAME_SIMPLE_NAME_AS_SUPERCLASS")
public class ASoCCredentials extends com.hcl.appscan.jenkins.plugin.auth.ASoCCredentials {

private static final long serialVersionUID = 1L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import hudson.model.ItemGroup;

@edu.umd.cs.findbugs.annotations.SuppressFBWarnings("NM_SAME_SIMPLE_NAME_AS_SUPERCLASS")
public class JenkinsAuthenticationProvider extends com.hcl.appscan.jenkins.plugin.auth.JenkinsAuthenticationProvider {

private static final long serialVersionUID = 1L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package com.ibm.appscan.jenkins.plugin.results;

//Added for backward compatibility during HCL wash
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings("NM_SAME_SIMPLE_NAME_AS_SUPERCLASS")
public class FailureCondition extends com.hcl.appscan.jenkins.plugin.results.FailureCondition {

private static final long serialVersionUID = 1L;
Expand Down
Loading