Skip to content

Commit 6b7e0e2

Browse files
committed
Merge branch 'release-1.1.0' into master
2 parents 51dabd2 + 7d72b59 commit 6b7e0e2

File tree

66 files changed

+5288
-1727
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+5288
-1727
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ allprojects {
1010
apply plugin: 'java'
1111
group = 'org.zaproxy'
1212

13-
version '1.1.0-SNAPSHOT'
13+
version '1.1.0'
1414
ext.versionBC = '1.0.0'
1515

1616
repositories {

subprojects/zap-clientapi-ant/src/main/java/org/zaproxy/clientapi/ant/ActiveScanSubtreeTask.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,11 @@
2424
public class ActiveScanSubtreeTask extends ZapTask {
2525

2626
private String url;
27-
private String apikey;
2827

2928
@Override
3029
public void execute() throws BuildException {
3130
try {
32-
this.getClientApi().ascan.scan(apikey, url, "true", "false", "", "", "");
31+
this.getClientApi().ascan.scan(url, "true", "false", "", "", "");
3332

3433
} catch (Exception e) {
3534
throw new BuildException(e);
@@ -43,12 +42,4 @@ public String getUrl() {
4342
public void setUrl(String url) {
4443
this.url = url;
4544
}
46-
47-
public String getApikey() {
48-
return apikey;
49-
}
50-
51-
public void setApikey(String apikey) {
52-
this.apikey = apikey;
53-
}
5445
}

subprojects/zap-clientapi-ant/src/main/java/org/zaproxy/clientapi/ant/ActiveScanUrlTask.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,11 @@
2424
public class ActiveScanUrlTask extends ZapTask {
2525

2626
private String url;
27-
private String apikey;
2827

2928
@Override
3029
public void execute() throws BuildException {
3130
try {
32-
this.getClientApi().ascan.scan(apikey, url, "false", "false", "", "", "");
31+
this.getClientApi().ascan.scan(url, "false", "false", "", "", "");
3332

3433
} catch (Exception e) {
3534
throw new BuildException(e);
@@ -43,12 +42,4 @@ public String getUrl() {
4342
public void setUrl(String url) {
4443
this.url = url;
4544
}
46-
47-
public String getApikey() {
48-
return apikey;
49-
}
50-
51-
public void setApikey(String apikey) {
52-
this.apikey = apikey;
53-
}
5445
}

subprojects/zap-clientapi-ant/src/main/java/org/zaproxy/clientapi/ant/AlertTask.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public class AlertTask extends Task {
3939
* Gets the name of the alert.
4040
*
4141
* @return the name of the alert
42-
* @since TODO add version
42+
* @since 1.1.0
4343
*/
4444
public String getName() {
4545
return name;
@@ -49,7 +49,7 @@ public String getName() {
4949
* Sets the name of the alert.
5050
*
5151
* @param name the name of the alert
52-
* @since TODO add version
52+
* @since 1.1.0
5353
*/
5454
public void setName(String name) {
5555
this.name = name;
@@ -59,7 +59,7 @@ public void setName(String name) {
5959
* Gets the name of the alert.
6060
*
6161
* @return the name of the alert
62-
* @deprecated (TODO add version) Use {@link #getName()} instead.
62+
* @deprecated (1.1.0) Use {@link #getName()} instead.
6363
*/
6464
@Deprecated
6565
public String getAlert() {
@@ -70,7 +70,7 @@ public String getAlert() {
7070
* Sets the name of the alert.
7171
*
7272
* @param name the name of the alert
73-
* @deprecated (TODO add version) Use {@link #setName(String)} instead.
73+
* @deprecated (1.1.0) Use {@link #setName(String)} instead.
7474
*/
7575
@Deprecated
7676
public void setAlert(String name) {

subprojects/zap-clientapi-ant/src/main/java/org/zaproxy/clientapi/ant/LoadSessionTask.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,11 @@
2424
public class LoadSessionTask extends ZapTask {
2525

2626
private String name;
27-
private String apikey;
2827

2928
@Override
3029
public void execute() throws BuildException {
3130
try {
32-
this.getClientApi().core.loadSession(apikey, name);
31+
this.getClientApi().core.loadSession(name);
3332

3433
} catch (Exception e) {
3534
throw new BuildException(e);
@@ -43,12 +42,4 @@ public String getName() {
4342
public void setName(String name) {
4443
this.name = name;
4544
}
46-
47-
public String getApikey() {
48-
return apikey;
49-
}
50-
51-
public void setApikey(String apikey) {
52-
this.apikey = apikey;
53-
}
5445
}

subprojects/zap-clientapi-ant/src/main/java/org/zaproxy/clientapi/ant/NewSessionTask.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,11 @@
2424
public class NewSessionTask extends ZapTask {
2525

2626
private String name;
27-
private String apikey;
2827

2928
@Override
3029
public void execute() throws BuildException {
3130
try {
32-
this.getClientApi().core.newSession(apikey, name, "true");
31+
this.getClientApi().core.newSession(name, "true");
3332

3433
} catch (Exception e) {
3534
throw new BuildException(e);
@@ -43,12 +42,4 @@ public String getName() {
4342
public void setName(String name) {
4443
this.name = name;
4544
}
46-
47-
public String getApikey() {
48-
return apikey;
49-
}
50-
51-
public void setApikey(String apikey) {
52-
this.apikey = apikey;
53-
}
5445
}

subprojects/zap-clientapi-ant/src/main/java/org/zaproxy/clientapi/ant/SaveSessionTask.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,11 @@
2424
public class SaveSessionTask extends ZapTask {
2525

2626
private String name;
27-
private String apikey;
2827

2928
@Override
3029
public void execute() throws BuildException {
3130
try {
32-
this.getClientApi().core.saveSession(apikey, name, "true");
31+
this.getClientApi().core.saveSession(name, "true");
3332

3433
} catch (Exception e) {
3534
throw new BuildException(e);
@@ -43,12 +42,4 @@ public String getName() {
4342
public void setName(String name) {
4443
this.name = name;
4544
}
46-
47-
public String getApikey() {
48-
return apikey;
49-
}
50-
51-
public void setApikey(String apikey) {
52-
this.apikey = apikey;
53-
}
5445
}

subprojects/zap-clientapi-ant/src/main/java/org/zaproxy/clientapi/ant/SpiderUrlTask.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,11 @@
2424
public class SpiderUrlTask extends ZapTask {
2525

2626
private String url;
27-
private String apikey;
2827

2928
@Override
3029
public void execute() throws BuildException {
3130
try {
32-
this.getClientApi().spider.scan(apikey, url, "", "", null, null);
31+
this.getClientApi().spider.scan(url, "", "", null, null);
3332

3433
} catch (Exception e) {
3534
throw new BuildException(e);
@@ -44,12 +43,4 @@ public void setUrl(String url) {
4443
this.url = url;
4544
}
4645

47-
public String getApikey() {
48-
return apikey;
49-
}
50-
51-
public void setApikey(String apikey) {
52-
this.apikey = apikey;
53-
}
54-
5546
}

subprojects/zap-clientapi-ant/src/main/java/org/zaproxy/clientapi/ant/StopZapTask.java

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,13 @@
2323

2424
public class StopZapTask extends ZapTask {
2525

26-
private String apikey;
27-
2826
@Override
2927
public void execute() throws BuildException {
3028
try {
31-
this.getClientApi().core.shutdown(apikey);
29+
this.getClientApi().core.shutdown();
3230
} catch (Exception e) {
33-
e.printStackTrace();
3431
throw new BuildException(e);
3532
}
3633
}
3734

38-
public String getApikey() {
39-
return apikey;
40-
}
41-
42-
public void setApikey(String apikey) {
43-
this.apikey = apikey;
44-
}
45-
4635
}

subprojects/zap-clientapi-ant/src/main/java/org/zaproxy/clientapi/ant/ZapTask.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ public abstract class ZapTask extends Task {
2626
private String zapAddress;
2727
private int zapPort;
2828
private boolean debug = false;
29+
private String apikey;
2930

3031
protected ClientApi getClientApi() {
31-
return new ClientApi(zapAddress, zapPort, debug);
32+
return new ClientApi(zapAddress, zapPort, apikey, debug);
3233
}
3334

3435
public String getZapAddress() {
@@ -51,4 +52,12 @@ public boolean isDebug() {
5152
public void setDebug(boolean debug) {
5253
this.debug = debug;
5354
}
55+
56+
public String getApikey() {
57+
return apikey;
58+
}
59+
60+
public void setApikey(String apikey) {
61+
this.apikey = apikey;
62+
}
5463
}

0 commit comments

Comments
 (0)